_Z16htole32_internalj:
   39|  4.46k|{
   40|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_32(host_32bits);
   41|  4.46k|        else return host_32bits;
   42|  4.46k|}
_Z16le32toh_internalj:
   49|  26.0M|{
   50|       |    if constexpr (std::endian::native == std::endian::big) return internal_bswap_32(little_endian_32bits);
   51|  26.0M|        else return little_endian_32bits;
   52|  26.0M|}

_Z9WriteLE32ITk8ByteTypehEvPT_j:
   51|  4.46k|{
   52|  4.46k|    uint32_t v = htole32_internal(x);
   53|  4.46k|    memcpy(ptr, &v, 4);
   54|  4.46k|}
_Z8ReadLE32ITk8ByteTypehEjPKT_:
   28|  26.0M|{
   29|  26.0M|    uint32_t x;
   30|  26.0M|    memcpy(&x, ptr, 4);
   31|  26.0M|    return le32toh_internal(x);
   32|  26.0M|}

_ZN14poly1305_donna13poly1305_initEPNS_16poly1305_contextEPKh:
   15|  1.11k|void poly1305_init(poly1305_context *st, const unsigned char key[32]) noexcept {
   16|       |    /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */
   17|  1.11k|    st->r[0] = (ReadLE32(&key[ 0])     ) & 0x3ffffff;
   18|  1.11k|    st->r[1] = (ReadLE32(&key[ 3]) >> 2) & 0x3ffff03;
   19|  1.11k|    st->r[2] = (ReadLE32(&key[ 6]) >> 4) & 0x3ffc0ff;
   20|  1.11k|    st->r[3] = (ReadLE32(&key[ 9]) >> 6) & 0x3f03fff;
   21|  1.11k|    st->r[4] = (ReadLE32(&key[12]) >> 8) & 0x00fffff;
   22|       |
   23|       |    /* h = 0 */
   24|  1.11k|    st->h[0] = 0;
   25|  1.11k|    st->h[1] = 0;
   26|  1.11k|    st->h[2] = 0;
   27|  1.11k|    st->h[3] = 0;
   28|  1.11k|    st->h[4] = 0;
   29|       |
   30|       |    /* save pad for later */
   31|  1.11k|    st->pad[0] = ReadLE32(&key[16]);
   32|  1.11k|    st->pad[1] = ReadLE32(&key[20]);
   33|  1.11k|    st->pad[2] = ReadLE32(&key[24]);
   34|  1.11k|    st->pad[3] = ReadLE32(&key[28]);
   35|       |
   36|  1.11k|    st->leftover = 0;
   37|  1.11k|    st->final = 0;
   38|  1.11k|}
_ZN14poly1305_donna15poly1305_finishEPNS_16poly1305_contextEPh:
  100|  1.11k|void poly1305_finish(poly1305_context *st, unsigned char mac[16]) noexcept {
  101|  1.11k|    uint32_t h0,h1,h2,h3,h4,c;
  102|  1.11k|    uint32_t g0,g1,g2,g3,g4;
  103|  1.11k|    uint64_t f;
  104|  1.11k|    uint32_t mask;
  105|       |
  106|       |    /* process the remaining block */
  107|  1.11k|    if (st->leftover) {
  ------------------
  |  Branch (107:9): [True: 750, False: 366]
  ------------------
  108|    750|        size_t i = st->leftover;
  109|    750|        st->buffer[i++] = 1;
  110|  6.64k|        for (; i < POLY1305_BLOCK_SIZE; i++) {
  ------------------
  |  |   14|  6.64k|#define POLY1305_BLOCK_SIZE 16
  ------------------
  |  Branch (110:16): [True: 5.89k, False: 750]
  ------------------
  111|  5.89k|            st->buffer[i] = 0;
  112|  5.89k|        }
  113|    750|        st->final = 1;
  114|    750|        poly1305_blocks(st, st->buffer, POLY1305_BLOCK_SIZE);
  ------------------
  |  |   14|    750|#define POLY1305_BLOCK_SIZE 16
  ------------------
  115|    750|    }
  116|       |
  117|       |    /* fully carry h */
  118|  1.11k|    h0 = st->h[0];
  119|  1.11k|    h1 = st->h[1];
  120|  1.11k|    h2 = st->h[2];
  121|  1.11k|    h3 = st->h[3];
  122|  1.11k|    h4 = st->h[4];
  123|       |
  124|  1.11k|                 c = h1 >> 26; h1 = h1 & 0x3ffffff;
  125|  1.11k|    h2 +=     c; c = h2 >> 26; h2 = h2 & 0x3ffffff;
  126|  1.11k|    h3 +=     c; c = h3 >> 26; h3 = h3 & 0x3ffffff;
  127|  1.11k|    h4 +=     c; c = h4 >> 26; h4 = h4 & 0x3ffffff;
  128|  1.11k|    h0 += c * 5; c = h0 >> 26; h0 = h0 & 0x3ffffff;
  129|  1.11k|    h1 +=     c;
  130|       |
  131|       |    /* compute h + -p */
  132|  1.11k|    g0 = h0 + 5; c = g0 >> 26; g0 &= 0x3ffffff;
  133|  1.11k|    g1 = h1 + c; c = g1 >> 26; g1 &= 0x3ffffff;
  134|  1.11k|    g2 = h2 + c; c = g2 >> 26; g2 &= 0x3ffffff;
  135|  1.11k|    g3 = h3 + c; c = g3 >> 26; g3 &= 0x3ffffff;
  136|  1.11k|    g4 = h4 + c - (1UL << 26);
  137|       |
  138|       |    /* select h if h < p, or h + -p if h >= p */
  139|  1.11k|    mask = (g4 >> ((sizeof(uint32_t) * 8) - 1)) - 1;
  140|  1.11k|    g0 &= mask;
  141|  1.11k|    g1 &= mask;
  142|  1.11k|    g2 &= mask;
  143|  1.11k|    g3 &= mask;
  144|  1.11k|    g4 &= mask;
  145|  1.11k|    mask = ~mask;
  146|  1.11k|    h0 = (h0 & mask) | g0;
  147|  1.11k|    h1 = (h1 & mask) | g1;
  148|  1.11k|    h2 = (h2 & mask) | g2;
  149|  1.11k|    h3 = (h3 & mask) | g3;
  150|  1.11k|    h4 = (h4 & mask) | g4;
  151|       |
  152|       |    /* h = h % (2^128) */
  153|  1.11k|    h0 = ((h0      ) | (h1 << 26)) & 0xffffffff;
  154|  1.11k|    h1 = ((h1 >>  6) | (h2 << 20)) & 0xffffffff;
  155|  1.11k|    h2 = ((h2 >> 12) | (h3 << 14)) & 0xffffffff;
  156|  1.11k|    h3 = ((h3 >> 18) | (h4 <<  8)) & 0xffffffff;
  157|       |
  158|       |    /* mac = (h + pad) % (2^128) */
  159|  1.11k|    f = (uint64_t)h0 + st->pad[0]            ; h0 = (uint32_t)f;
  160|  1.11k|    f = (uint64_t)h1 + st->pad[1] + (f >> 32); h1 = (uint32_t)f;
  161|  1.11k|    f = (uint64_t)h2 + st->pad[2] + (f >> 32); h2 = (uint32_t)f;
  162|  1.11k|    f = (uint64_t)h3 + st->pad[3] + (f >> 32); h3 = (uint32_t)f;
  163|       |
  164|  1.11k|    WriteLE32(mac +  0, h0);
  165|  1.11k|    WriteLE32(mac +  4, h1);
  166|  1.11k|    WriteLE32(mac +  8, h2);
  167|  1.11k|    WriteLE32(mac + 12, h3);
  168|       |
  169|       |    /* zero out the state */
  170|  1.11k|    st->h[0] = 0;
  171|  1.11k|    st->h[1] = 0;
  172|  1.11k|    st->h[2] = 0;
  173|  1.11k|    st->h[3] = 0;
  174|  1.11k|    st->h[4] = 0;
  175|  1.11k|    st->r[0] = 0;
  176|  1.11k|    st->r[1] = 0;
  177|  1.11k|    st->r[2] = 0;
  178|  1.11k|    st->r[3] = 0;
  179|  1.11k|    st->r[4] = 0;
  180|  1.11k|    st->pad[0] = 0;
  181|  1.11k|    st->pad[1] = 0;
  182|  1.11k|    st->pad[2] = 0;
  183|  1.11k|    st->pad[3] = 0;
  184|  1.11k|}
_ZN14poly1305_donna15poly1305_updateEPNS_16poly1305_contextEPKhm:
  186|  6.41k|void poly1305_update(poly1305_context *st, const unsigned char *m, size_t bytes) noexcept {
  187|  6.41k|    size_t i;
  188|       |
  189|       |    /* handle leftover */
  190|  6.41k|    if (st->leftover) {
  ------------------
  |  Branch (190:9): [True: 4.22k, False: 2.19k]
  ------------------
  191|  4.22k|        size_t want = (POLY1305_BLOCK_SIZE - st->leftover);
  ------------------
  |  |   14|  4.22k|#define POLY1305_BLOCK_SIZE 16
  ------------------
  192|  4.22k|        if (want > bytes) {
  ------------------
  |  Branch (192:13): [True: 1.86k, False: 2.35k]
  ------------------
  193|  1.86k|            want = bytes;
  194|  1.86k|        }
  195|  23.9k|        for (i = 0; i < want; i++) {
  ------------------
  |  Branch (195:21): [True: 19.7k, False: 4.22k]
  ------------------
  196|  19.7k|            st->buffer[st->leftover + i] = m[i];
  197|  19.7k|        }
  198|  4.22k|        bytes -= want;
  199|  4.22k|        m += want;
  200|  4.22k|        st->leftover += want;
  201|  4.22k|        if (st->leftover < POLY1305_BLOCK_SIZE) return;
  ------------------
  |  |   14|  4.22k|#define POLY1305_BLOCK_SIZE 16
  ------------------
  |  Branch (201:13): [True: 1.86k, False: 2.35k]
  ------------------
  202|  2.35k|        poly1305_blocks(st, st->buffer, POLY1305_BLOCK_SIZE);
  ------------------
  |  |   14|  2.35k|#define POLY1305_BLOCK_SIZE 16
  ------------------
  203|  2.35k|        st->leftover = 0;
  204|  2.35k|    }
  205|       |
  206|       |    /* process full blocks */
  207|  4.55k|    if (bytes >= POLY1305_BLOCK_SIZE) {
  ------------------
  |  |   14|  4.55k|#define POLY1305_BLOCK_SIZE 16
  ------------------
  |  Branch (207:9): [True: 2.18k, False: 2.36k]
  ------------------
  208|  2.18k|        size_t want = (bytes & ~(POLY1305_BLOCK_SIZE - 1));
  ------------------
  |  |   14|  2.18k|#define POLY1305_BLOCK_SIZE 16
  ------------------
  209|  2.18k|        poly1305_blocks(st, m, want);
  210|  2.18k|        m += want;
  211|  2.18k|        bytes -= want;
  212|  2.18k|    }
  213|       |
  214|       |    /* store leftover */
  215|  4.55k|    if (bytes) {
  ------------------
  |  Branch (215:9): [True: 3.10k, False: 1.44k]
  ------------------
  216|  26.4k|        for (i = 0; i < bytes; i++) {
  ------------------
  |  Branch (216:21): [True: 23.3k, False: 3.10k]
  ------------------
  217|  23.3k|            st->buffer[st->leftover + i] = m[i];
  218|  23.3k|        }
  219|  3.10k|        st->leftover += bytes;
  220|  3.10k|    }
  221|  4.55k|}
poly1305.cpp:_ZN14poly1305_donnaL15poly1305_blocksEPNS_16poly1305_contextEPKhm:
   40|  5.29k|static void poly1305_blocks(poly1305_context *st, const unsigned char *m, size_t bytes) noexcept {
   41|  5.29k|    const uint32_t hibit = (st->final) ? 0 : (1UL << 24); /* 1 << 128 */
  ------------------
  |  Branch (41:28): [True: 750, False: 4.54k]
  ------------------
   42|  5.29k|    uint32_t r0,r1,r2,r3,r4;
   43|  5.29k|    uint32_t s1,s2,s3,s4;
   44|  5.29k|    uint32_t h0,h1,h2,h3,h4;
   45|  5.29k|    uint64_t d0,d1,d2,d3,d4;
   46|  5.29k|    uint32_t c;
   47|       |
   48|  5.29k|    r0 = st->r[0];
   49|  5.29k|    r1 = st->r[1];
   50|  5.29k|    r2 = st->r[2];
   51|  5.29k|    r3 = st->r[3];
   52|  5.29k|    r4 = st->r[4];
   53|       |
   54|  5.29k|    s1 = r1 * 5;
   55|  5.29k|    s2 = r2 * 5;
   56|  5.29k|    s3 = r3 * 5;
   57|  5.29k|    s4 = r4 * 5;
   58|       |
   59|  5.29k|    h0 = st->h[0];
   60|  5.29k|    h1 = st->h[1];
   61|  5.29k|    h2 = st->h[2];
   62|  5.29k|    h3 = st->h[3];
   63|  5.29k|    h4 = st->h[4];
   64|       |
   65|  5.21M|    while (bytes >= POLY1305_BLOCK_SIZE) {
  ------------------
  |  |   14|  5.21M|#define POLY1305_BLOCK_SIZE 16
  ------------------
  |  Branch (65:12): [True: 5.21M, False: 5.29k]
  ------------------
   66|       |        /* h += m[i] */
   67|  5.21M|        h0 += (ReadLE32(m+ 0)     ) & 0x3ffffff;
   68|  5.21M|        h1 += (ReadLE32(m+ 3) >> 2) & 0x3ffffff;
   69|  5.21M|        h2 += (ReadLE32(m+ 6) >> 4) & 0x3ffffff;
   70|  5.21M|        h3 += (ReadLE32(m+ 9) >> 6) & 0x3ffffff;
   71|  5.21M|        h4 += (ReadLE32(m+12) >> 8) | hibit;
   72|       |
   73|       |        /* h *= r */
   74|  5.21M|        d0 = ((uint64_t)h0 * r0) + ((uint64_t)h1 * s4) + ((uint64_t)h2 * s3) + ((uint64_t)h3 * s2) + ((uint64_t)h4 * s1);
   75|  5.21M|        d1 = ((uint64_t)h0 * r1) + ((uint64_t)h1 * r0) + ((uint64_t)h2 * s4) + ((uint64_t)h3 * s3) + ((uint64_t)h4 * s2);
   76|  5.21M|        d2 = ((uint64_t)h0 * r2) + ((uint64_t)h1 * r1) + ((uint64_t)h2 * r0) + ((uint64_t)h3 * s4) + ((uint64_t)h4 * s3);
   77|  5.21M|        d3 = ((uint64_t)h0 * r3) + ((uint64_t)h1 * r2) + ((uint64_t)h2 * r1) + ((uint64_t)h3 * r0) + ((uint64_t)h4 * s4);
   78|  5.21M|        d4 = ((uint64_t)h0 * r4) + ((uint64_t)h1 * r3) + ((uint64_t)h2 * r2) + ((uint64_t)h3 * r1) + ((uint64_t)h4 * r0);
   79|       |
   80|       |        /* (partial) h %= p */
   81|  5.21M|                      c = (uint32_t)(d0 >> 26); h0 = (uint32_t)d0 & 0x3ffffff;
   82|  5.21M|        d1 += c;      c = (uint32_t)(d1 >> 26); h1 = (uint32_t)d1 & 0x3ffffff;
   83|  5.21M|        d2 += c;      c = (uint32_t)(d2 >> 26); h2 = (uint32_t)d2 & 0x3ffffff;
   84|  5.21M|        d3 += c;      c = (uint32_t)(d3 >> 26); h3 = (uint32_t)d3 & 0x3ffffff;
   85|  5.21M|        d4 += c;      c = (uint32_t)(d4 >> 26); h4 = (uint32_t)d4 & 0x3ffffff;
   86|  5.21M|        h0 += c * 5;  c =           (h0 >> 26); h0 =           h0 & 0x3ffffff;
   87|  5.21M|        h1 += c;
   88|       |
   89|  5.21M|        m += POLY1305_BLOCK_SIZE;
  ------------------
  |  |   14|  5.21M|#define POLY1305_BLOCK_SIZE 16
  ------------------
   90|  5.21M|        bytes -= POLY1305_BLOCK_SIZE;
  ------------------
  |  |   14|  5.21M|#define POLY1305_BLOCK_SIZE 16
  ------------------
   91|  5.21M|    }
   92|       |
   93|  5.29k|    st->h[0] = h0;
   94|  5.29k|    st->h[1] = h1;
   95|  5.29k|    st->h[2] = h2;
   96|  5.29k|    st->h[3] = h3;
   97|  5.29k|    st->h[4] = h4;
   98|  5.29k|}

_ZN8Poly1305C2E4SpanIKSt4byteE:
   50|  1.11k|    {
   51|  1.11k|        assert(key.size() == KEYLEN);
   52|  1.11k|        poly1305_donna::poly1305_init(&m_ctx, UCharCast(key.data()));
   53|  1.11k|    }
_ZN8Poly13056UpdateE4SpanIKSt4byteE:
   57|  6.41k|    {
   58|  6.41k|        poly1305_donna::poly1305_update(&m_ctx, UCharCast(msg.data()), msg.size());
   59|  6.41k|        return *this;
   60|  6.41k|    }
_ZN8Poly13058FinalizeE4SpanISt4byteE:
   64|  1.11k|    {
   65|  1.11k|        assert(out.size() == TAGLEN);
   66|  1.11k|        poly1305_donna::poly1305_finish(&m_ctx, UCharCast(out.data()));
   67|  1.11k|    }

_Z9UCharCastPSt4byte:
  283|  1.11k|inline unsigned char* UCharCast(std::byte* c) { return reinterpret_cast<unsigned char*>(c); }
_Z9UCharCastPKSt4byte:
  287|  7.52k|inline const unsigned char* UCharCast(const std::byte* c) { return reinterpret_cast<const unsigned char*>(c); }
_ZNK4SpanIKSt4byteE4sizeEv:
  187|  7.52k|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanIKSt4byteE4dataEv:
  174|  7.52k|    constexpr C* data() const noexcept { return m_data; }
_ZNK4SpanISt4byteE4sizeEv:
  187|  1.11k|    constexpr std::size_t size() const noexcept { return m_size; }
_ZNK4SpanISt4byteE4dataEv:
  174|  1.11k|    constexpr C* data() const noexcept { return m_data; }
_ZN4SpanIKSt4byteEC2INSt3__16vectorIS0_NS4_9allocatorIS0_EEEEEERT_NS4_9enable_ifIXaaaantsr7is_SpanIS9_EE5valuesr3std14is_convertibleIPA_NS4_14remove_pointerIDTcldtclsr3stdE7declvalISA_EE4dataEEE4typeEPA_S1_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalISA_EE4sizeEEmEE5valueEDnE4typeE:
  165|  7.52k|        : m_data(other.data()), m_size(other.size()){}
_ZN4SpanISt4byteEC2INSt3__15arrayIS0_Lm16EEEEERT_NS3_9enable_ifIXaaaantsr7is_SpanIS6_EE5valuesr3std14is_convertibleIPA_NS3_14remove_pointerIDTcldtclsr3stdE7declvalIS7_EE4dataEEE4typeEPA_S0_EE5valuesr3std14is_convertibleIDTcldtclsr3stdE7declvalIS7_EE4sizeEEmEE5valueEDnE4typeE:
  165|  1.11k|        : m_data(other.data()), m_size(other.size()){}

_ZN18FuzzedDataProviderC2EPKhm:
   37|    558|      : data_ptr_(data), remaining_bytes_(size) {}
_ZN18FuzzedDataProvider15remaining_bytesEv:
   85|  6.41k|  size_t remaining_bytes() { return remaining_bytes_; }
_ZN18FuzzedDataProvider25ConsumeRandomLengthStringEm:
  153|  5.85k|FuzzedDataProvider::ConsumeRandomLengthString(size_t max_length) {
  154|       |  // Reads bytes from the start of |data_ptr_|. Maps "\\" to "\", and maps "\"
  155|       |  // followed by anything else to the end of the string. As a result of this
  156|       |  // logic, a fuzzer can insert characters into the string, and the string
  157|       |  // will be lengthened to include those new characters, resulting in a more
  158|       |  // stable fuzzer than picking the length of a string independently from
  159|       |  // picking its contents.
  160|  5.85k|  std::string result;
  161|       |
  162|       |  // Reserve the anticipated capacity to prevent several reallocations.
  163|  5.85k|  result.reserve(std::min(max_length, remaining_bytes_));
  164|  41.7M|  for (size_t i = 0; i < max_length && remaining_bytes_ != 0; ++i) {
  ------------------
  |  Branch (164:22): [True: 41.7M, False: 417]
  |  Branch (164:40): [True: 41.7M, False: 30]
  ------------------
  165|  41.7M|    char next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
  166|  41.7M|    Advance(1);
  167|  41.7M|    if (next == '\\' && remaining_bytes_ != 0) {
  ------------------
  |  Branch (167:9): [True: 7.14k, False: 41.6M]
  |  Branch (167:25): [True: 7.10k, False: 44]
  ------------------
  168|  7.10k|      next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
  169|  7.10k|      Advance(1);
  170|  7.10k|      if (next != '\\')
  ------------------
  |  Branch (170:11): [True: 5.40k, False: 1.69k]
  ------------------
  171|  5.40k|        break;
  172|  7.10k|    }
  173|  41.6M|    result += next;
  174|  41.6M|  }
  175|       |
  176|  5.85k|  result.shrink_to_fit();
  177|  5.85k|  return result;
  178|  5.85k|}
_ZN18FuzzedDataProvider25ConsumeRandomLengthStringEv:
  181|  5.85k|inline std::string FuzzedDataProvider::ConsumeRandomLengthString() {
  182|  5.85k|  return ConsumeRandomLengthString(remaining_bytes_);
  183|  5.85k|}
_ZN18FuzzedDataProvider14CopyAndAdvanceEPvm:
  339|    558|                                               size_t num_bytes) {
  340|    558|  std::memcpy(destination, data_ptr_, num_bytes);
  341|    558|  Advance(num_bytes);
  342|    558|}
_ZN18FuzzedDataProvider7AdvanceEm:
  344|  41.7M|inline void FuzzedDataProvider::Advance(size_t num_bytes) {
  345|  41.7M|  if (num_bytes > remaining_bytes_)
  ------------------
  |  Branch (345:7): [True: 0, False: 41.7M]
  ------------------
  346|      0|    abort();
  347|       |
  348|  41.7M|  data_ptr_ += num_bytes;
  349|  41.7M|  remaining_bytes_ -= num_bytes;
  350|  41.7M|}
_ZN18FuzzedDataProvider23ConvertUnsignedToSignedIchEET_T0_:
  379|  41.7M|TS FuzzedDataProvider::ConvertUnsignedToSigned(TU value) {
  380|  41.7M|  static_assert(sizeof(TS) == sizeof(TU), "Incompatible data types.");
  381|  41.7M|  static_assert(!std::numeric_limits<TU>::is_signed,
  382|  41.7M|                "Source type must be unsigned.");
  383|       |
  384|       |  // TODO(Dor1s): change to `if constexpr` once C++17 becomes mainstream.
  385|  41.7M|  if (std::numeric_limits<TS>::is_modulo)
  ------------------
  |  Branch (385:7): [Folded - Ignored]
  ------------------
  386|      0|    return static_cast<TS>(value);
  387|       |
  388|       |  // Avoid using implementation-defined unsigned to signed conversions.
  389|       |  // To learn more, see https://stackoverflow.com/questions/13150449.
  390|  41.7M|  if (value <= std::numeric_limits<TS>::max()) {
  ------------------
  |  Branch (390:7): [True: 39.0M, False: 2.62M]
  ------------------
  391|  39.0M|    return static_cast<TS>(value);
  392|  39.0M|  } else {
  393|  2.62M|    constexpr auto TS_min = std::numeric_limits<TS>::min();
  394|  2.62M|    return TS_min + static_cast<TS>(value - TS_min);
  395|  2.62M|  }
  396|  41.7M|}
_ZN18FuzzedDataProvider12ConsumeBytesISt4byteEENSt3__16vectorIT_NS2_9allocatorIS4_EEEEm:
  109|    558|std::vector<T> FuzzedDataProvider::ConsumeBytes(size_t num_bytes) {
  110|    558|  num_bytes = std::min(num_bytes, remaining_bytes_);
  111|    558|  return ConsumeBytes<T>(num_bytes, num_bytes);
  112|    558|}
_ZN18FuzzedDataProvider12ConsumeBytesISt4byteEENSt3__16vectorIT_NS2_9allocatorIS4_EEEEmm:
  353|    558|std::vector<T> FuzzedDataProvider::ConsumeBytes(size_t size, size_t num_bytes) {
  354|    558|  static_assert(sizeof(T) == sizeof(uint8_t), "Incompatible data type.");
  355|       |
  356|       |  // The point of using the size-based constructor below is to increase the
  357|       |  // odds of having a vector object with capacity being equal to the length.
  358|       |  // That part is always implementation specific, but at least both libc++ and
  359|       |  // libstdc++ allocate the requested number of bytes in that constructor,
  360|       |  // which seems to be a natural choice for other implementations as well.
  361|       |  // To increase the odds even more, we also call |shrink_to_fit| below.
  362|    558|  std::vector<T> result(size);
  363|    558|  if (size == 0) {
  ------------------
  |  Branch (363:7): [True: 0, False: 558]
  ------------------
  364|      0|    if (num_bytes != 0)
  ------------------
  |  Branch (364:9): [True: 0, False: 0]
  ------------------
  365|      0|      abort();
  366|      0|    return result;
  367|      0|  }
  368|       |
  369|    558|  CopyAndAdvance(result.data(), num_bytes);
  370|       |
  371|       |  // Even though |shrink_to_fit| is also implementation specific, we expect it
  372|       |  // to provide an additional assurance in case vector's constructor allocated
  373|       |  // a buffer which is larger than the actual amount of data we put inside it.
  374|    558|  result.shrink_to_fit();
  375|    558|  return result;
  376|    558|}

_Z33crypto_poly1305_split_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEE:
   25|    558|{
   26|    558|    FuzzedDataProvider provider{buffer.data(), buffer.size()};
   27|       |
   28|       |    // Read key and instantiate two Poly1305 objects with it.
   29|    558|    auto key = provider.ConsumeBytes<std::byte>(Poly1305::KEYLEN);
   30|    558|    key.resize(Poly1305::KEYLEN);
   31|    558|    Poly1305 poly_full{key}, poly_split{key};
   32|       |
   33|       |    // Vector that holds all bytes processed so far.
   34|    558|    std::vector<std::byte> total_input;
   35|       |
   36|       |    // Process input in pieces.
   37|  5.85k|    LIMITED_WHILE(provider.remaining_bytes(), 100) {
  ------------------
  |  |   23|  6.41k|    for (unsigned _count{limit}; (condition) && _count; --_count)
  |  |  ------------------
  |  |  |  Branch (23:34): [True: 5.86k, False: 549]
  |  |  |  Branch (23:49): [True: 5.85k, False: 9]
  |  |  ------------------
  ------------------
   38|  5.85k|        auto in = ConsumeRandomLengthByteVector<std::byte>(provider);
   39|  5.85k|        poly_split.Update(in);
   40|       |        // Update total_input to match what was processed.
   41|  5.85k|        total_input.insert(total_input.end(), in.begin(), in.end());
   42|  5.85k|    }
   43|       |
   44|       |    // Process entire input at once.
   45|    558|    poly_full.Update(total_input);
   46|       |
   47|       |    // Verify both agree.
   48|    558|    std::array<std::byte, Poly1305::TAGLEN> tag_split, tag_full;
   49|    558|    poly_split.Finalize(tag_split);
   50|    558|    poly_full.Finalize(tag_full);
   51|    558|    assert(tag_full == tag_split);
   52|    558|}

LLVMFuzzerTestOneInput:
  222|    558|{
  223|    558|    test_one_input({data, size});
  224|    558|    return 0;
  225|    558|}
fuzz.cpp:_ZL14test_one_inputNSt3__14spanIKhLm18446744073709551615EEE:
   83|    558|{
   84|    558|    CheckGlobals check{};
   85|    558|    (*Assert(g_test_one_input))(buffer);
  ------------------
  |  |   85|    558|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   86|    558|}

_Z29ConsumeRandomLengthByteVectorISt4byteENSt3__16vectorIT_NS1_9allocatorIS3_EEEER18FuzzedDataProviderRKNS1_8optionalImEE:
   58|  5.85k|{
   59|  5.85k|    static_assert(sizeof(B) == 1);
   60|  5.85k|    const std::string s = max_length ?
  ------------------
  |  Branch (60:27): [True: 0, False: 5.85k]
  ------------------
   61|      0|                              fuzzed_data_provider.ConsumeRandomLengthString(*max_length) :
   62|  5.85k|                              fuzzed_data_provider.ConsumeRandomLengthString();
   63|  5.85k|    std::vector<B> ret(s.size());
   64|  5.85k|    std::copy(s.begin(), s.end(), reinterpret_cast<char*>(ret.data()));
   65|  5.85k|    return ret;
   66|  5.85k|}

_ZN12CheckGlobalsC2Ev:
   56|    558|CheckGlobals::CheckGlobals() : m_impl(std::make_unique<CheckGlobalsImpl>()) {}
_ZN12CheckGlobalsD2Ev:
   57|    558|CheckGlobals::~CheckGlobals() = default;
_ZN16CheckGlobalsImplC2Ev:
   17|    558|    {
   18|    558|        g_used_g_prng = false;
   19|    558|        g_seeded_g_prng_zero = false;
   20|    558|        g_used_system_time = false;
   21|    558|        SetMockTime(0s);
   22|    558|    }
_ZN16CheckGlobalsImplD2Ev:
   24|    558|    {
   25|    558|        if (g_used_g_prng && !g_seeded_g_prng_zero) {
  ------------------
  |  Branch (25:13): [True: 0, False: 558]
  |  Branch (25:30): [True: 0, False: 0]
  ------------------
   26|      0|            std::cerr << "\n\n"
   27|      0|                         "The current fuzz target used the global random state.\n\n"
   28|       |
   29|      0|                         "This is acceptable, but requires the fuzz target to call \n"
   30|      0|                         "SeedRandomStateForTest(SeedRand::ZEROS) in the first line \n"
   31|      0|                         "of the FUZZ_TARGET function.\n\n"
   32|       |
   33|      0|                         "An alternative solution would be to avoid any use of globals.\n\n"
   34|       |
   35|      0|                         "Without a solution, fuzz instability and non-determinism can lead \n"
   36|      0|                         "to non-reproducible bugs or inefficient fuzzing.\n\n"
   37|      0|                      << std::endl;
   38|      0|            std::abort(); // Abort, because AFL may try to recover from a std::exit
   39|      0|        }
   40|       |
   41|    558|        if (g_used_system_time) {
  ------------------
  |  Branch (41:13): [True: 0, False: 558]
  ------------------
   42|      0|            std::cerr << "\n\n"
   43|      0|                         "The current fuzz target accessed system time.\n\n"
   44|       |
   45|      0|                         "This is acceptable, but requires the fuzz target to call \n"
   46|      0|                         "SetMockTime() at the beginning of processing the fuzz input.\n\n"
   47|       |
   48|      0|                         "Without setting mock time, time-dependent behavior can lead \n"
   49|      0|                         "to non-reproducible bugs or inefficient fuzzing.\n\n"
   50|      0|                      << std::endl;
   51|      0|            std::abort();
   52|      0|        }
   53|    558|    }

_Z22inline_assertion_checkILb1EbEOT0_S1_PKciS3_S3_:
   52|    558|{
   53|    558|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|    558|    ) {
   58|    558|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 558]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|    558|    }
   62|    558|    return std::forward<T>(val);
   63|    558|}
_Z22inline_assertion_checkILb1ERPKNSt3__18functionIFvNS0_4spanIKhLm18446744073709551615EEEEEEEOT0_SB_PKciSD_SD_:
   52|    558|{
   53|    558|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|    558|    ) {
   58|    558|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 558]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|    558|    }
   62|    558|    return std::forward<T>(val);
   63|    558|}

_Z11SetMockTimeNSt3__16chrono8durationIxNS_5ratioILl1ELl1EEEEE:
   42|    558|{
   43|    558|    Assert(mock_time_in >= 0s);
  ------------------
  |  |   85|    558|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   44|    558|    g_mock_time.store(mock_time_in, std::memory_order_relaxed);
   45|    558|}

