entropy_common.c:ZSTD_countTrailingZeros32:
   29|  1.34k|{
   30|  1.34k|    assert(val != 0);
  ------------------
  |  Branch (30:5): [True: 0, False: 1.34k]
  |  Branch (30:5): [True: 1.34k, False: 0]
  ------------------
   31|       |#if defined(_MSC_VER)
   32|       |#  if STATIC_BMI2
   33|       |    return (unsigned)_tzcnt_u32(val);
   34|       |#  else
   35|       |    if (val != 0) {
   36|       |        unsigned long r;
   37|       |        _BitScanForward(&r, val);
   38|       |        return (unsigned)r;
   39|       |    } else {
   40|       |        __assume(0); /* Should not reach this code path */
   41|       |    }
   42|       |#  endif
   43|       |#elif defined(__GNUC__) && (__GNUC__ >= 4)
   44|  1.34k|    return (unsigned)__builtin_ctz(val);
   45|       |#elif defined(__ICCARM__)
   46|       |    return (unsigned)__builtin_ctz(val);
   47|       |#else
   48|       |    return ZSTD_countTrailingZeros32_fallback(val);
   49|       |#endif
   50|  1.34k|}
entropy_common.c:ZSTD_highbit32:
  175|    749|{
  176|    749|    assert(val != 0);
  ------------------
  |  Branch (176:5): [True: 0, False: 749]
  |  Branch (176:5): [True: 749, False: 0]
  ------------------
  177|    749|    return 31 - ZSTD_countLeadingZeros32(val);
  178|    749|}
entropy_common.c:ZSTD_countLeadingZeros32:
   70|    749|{
   71|    749|    assert(val != 0);
  ------------------
  |  Branch (71:5): [True: 0, False: 749]
  |  Branch (71:5): [True: 749, False: 0]
  ------------------
   72|       |#if defined(_MSC_VER)
   73|       |#  if STATIC_BMI2
   74|       |    return (unsigned)_lzcnt_u32(val);
   75|       |#  else
   76|       |    if (val != 0) {
   77|       |        unsigned long r;
   78|       |        _BitScanReverse(&r, val);
   79|       |        return (unsigned)(31 - r);
   80|       |    } else {
   81|       |        __assume(0); /* Should not reach this code path */
   82|       |    }
   83|       |#  endif
   84|       |#elif defined(__GNUC__) && (__GNUC__ >= 4)
   85|    749|    return (unsigned)__builtin_clz(val);
   86|       |#elif defined(__ICCARM__)
   87|       |    return (unsigned)__builtin_clz(val);
   88|       |#else
   89|       |    return ZSTD_countLeadingZeros32_fallback(val);
   90|       |#endif
   91|    749|}

FSE_isError:
   32|     54|unsigned FSE_isError(size_t code) { return ERR_isError(code); }
FSE_readNCount_bmi2:
  212|    286|{
  213|    286|    if (ZSTD_USE_BMI2(bmi2)) {
  ------------------
  |  |   36|    286|#  define ZSTD_USE_BMI2(bmi2) (bmi2)
  |  |  ------------------
  |  |  |  Branch (36:31): [True: 0, False: 286]
  |  |  ------------------
  ------------------
  214|      0|        return FSE_readNCount_body_bmi2(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize);
  215|      0|    }
  216|    286|    (void)bmi2;
  217|    286|    return FSE_readNCount_body_default(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize);
  218|    286|}
FSE_readNCount:
  223|    286|{
  224|    286|    return FSE_readNCount_bmi2(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize, /* bmi2 */ 0);
  225|    286|}
entropy_common.c:FSE_readNCount_body:
   45|    286|{
   46|    286|    const BYTE* const istart = (const BYTE*) headerBuffer;
   47|    286|    const BYTE* const iend = istart + hbSize;
   48|    286|    const BYTE* ip = istart;
   49|    286|    int nbBits;
   50|    286|    int remaining;
   51|    286|    int threshold;
   52|    286|    U32 bitStream;
   53|    286|    int bitCount;
   54|    286|    unsigned charnum = 0;
   55|    286|    unsigned const maxSV1 = *maxSVPtr + 1;
   56|    286|    int previous0 = 0;
   57|       |
   58|    286|    if (hbSize < 8) {
  ------------------
  |  Branch (58:9): [True: 54, False: 232]
  ------------------
   59|       |        /* This function only works when hbSize >= 8 */
   60|     54|        char buffer[8] = {0};
   61|     54|        ZSTD_memcpy(buffer, headerBuffer, hbSize);
  ------------------
  |  |   44|     54|# define ZSTD_memcpy(d,s,l) __builtin_memcpy((d),(s),(l))
  ------------------
   62|     54|        {   size_t const countSize = FSE_readNCount(normalizedCounter, maxSVPtr, tableLogPtr,
   63|     54|                                                    buffer, sizeof(buffer));
   64|     54|            if (FSE_isError(countSize)) return countSize;
  ------------------
  |  Branch (64:17): [True: 0, False: 54]
  ------------------
   65|     54|            if (countSize > hbSize) return ERROR(corruption_detected);
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (65:17): [True: 0, False: 54]
  ------------------
   66|     54|            return countSize;
   67|     54|    }   }
   68|    286|    assert(hbSize >= 8);
  ------------------
  |  Branch (68:5): [True: 0, False: 232]
  |  Branch (68:5): [True: 232, False: 0]
  ------------------
   69|       |
   70|       |    /* init */
   71|    232|    ZSTD_memset(normalizedCounter, 0, (*maxSVPtr+1) * sizeof(normalizedCounter[0]));   /* all symbols not present in NCount have a frequency of 0 */
  ------------------
  |  |   46|    232|# define ZSTD_memset(p,v,l) __builtin_memset((p),(v),(l))
  ------------------
   72|    232|    bitStream = MEM_readLE32(ip);
   73|    232|    nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG;   /* extract tableLog */
  ------------------
  |  |  616|    232|#define FSE_MIN_TABLELOG 5
  ------------------
   74|    232|    if (nbBits > FSE_TABLELOG_ABSOLUTE_MAX) return ERROR(tableLog_tooLarge);
  ------------------
  |  |  618|    232|#define FSE_TABLELOG_ABSOLUTE_MAX 15
  ------------------
                  if (nbBits > FSE_TABLELOG_ABSOLUTE_MAX) return ERROR(tableLog_tooLarge);
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (74:9): [True: 0, False: 232]
  ------------------
   75|    232|    bitStream >>= 4;
   76|    232|    bitCount = 4;
   77|    232|    *tableLogPtr = nbBits;
   78|    232|    remaining = (1<<nbBits)+1;
   79|    232|    threshold = 1<<nbBits;
   80|    232|    nbBits++;
   81|       |
   82|  11.5k|    for (;;) {
   83|  11.5k|        if (previous0) {
  ------------------
  |  Branch (83:13): [True: 1.06k, False: 10.5k]
  ------------------
   84|       |            /* Count the number of repeats. Each time the
   85|       |             * 2-bit repeat code is 0b11 there is another
   86|       |             * repeat.
   87|       |             * Avoid UB by setting the high bit to 1.
   88|       |             */
   89|  1.06k|            int repeats = ZSTD_countTrailingZeros32(~bitStream | 0x80000000) >> 1;
   90|  1.34k|            while (repeats >= 12) {
  ------------------
  |  Branch (90:20): [True: 284, False: 1.06k]
  ------------------
   91|    284|                charnum += 3 * 12;
   92|    284|                if (LIKELY(ip <= iend-7)) {
  ------------------
  |  |  195|    284|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (195:19): [True: 230, False: 54]
  |  |  ------------------
  ------------------
   93|    230|                    ip += 3;
   94|    230|                } else {
   95|     54|                    bitCount -= (int)(8 * (iend - 7 - ip));
   96|     54|                    bitCount &= 31;
   97|     54|                    ip = iend - 4;
   98|     54|                }
   99|    284|                bitStream = MEM_readLE32(ip) >> bitCount;
  100|    284|                repeats = ZSTD_countTrailingZeros32(~bitStream | 0x80000000) >> 1;
  101|    284|            }
  102|  1.06k|            charnum += 3 * repeats;
  103|  1.06k|            bitStream >>= 2 * repeats;
  104|  1.06k|            bitCount += 2 * repeats;
  105|       |
  106|       |            /* Add the final repeat which isn't 0b11. */
  107|  1.06k|            assert((bitStream & 3) < 3);
  ------------------
  |  Branch (107:13): [True: 0, False: 1.06k]
  |  Branch (107:13): [True: 1.06k, False: 0]
  ------------------
  108|  1.06k|            charnum += bitStream & 3;
  109|  1.06k|            bitCount += 2;
  110|       |
  111|       |            /* This is an error, but break and return an error
  112|       |             * at the end, because returning out of a loop makes
  113|       |             * it harder for the compiler to optimize.
  114|       |             */
  115|  1.06k|            if (charnum >= maxSV1) break;
  ------------------
  |  Branch (115:17): [True: 0, False: 1.06k]
  ------------------
  116|       |
  117|       |            /* We don't need to set the normalized count to 0
  118|       |             * because we already memset the whole buffer to 0.
  119|       |             */
  120|       |
  121|  1.06k|            if (LIKELY(ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) {
  ------------------
  |  |  195|  2.12k|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (195:19): [True: 897, False: 166]
  |  |  ------------------
  ------------------
  |  Branch (121:41): [True: 46, False: 120]
  ------------------
  122|    943|                assert((bitCount >> 3) <= 3); /* For first condition to work */
  ------------------
  |  Branch (122:17): [True: 0, False: 943]
  |  Branch (122:17): [True: 943, False: 0]
  ------------------
  123|    943|                ip += bitCount>>3;
  124|    943|                bitCount &= 7;
  125|    943|            } else {
  126|    120|                bitCount -= (int)(8 * (iend - 4 - ip));
  127|    120|                bitCount &= 31;
  128|    120|                ip = iend - 4;
  129|    120|            }
  130|  1.06k|            bitStream = MEM_readLE32(ip) >> bitCount;
  131|  1.06k|        }
  132|  11.5k|        {
  133|  11.5k|            int const max = (2*threshold-1) - remaining;
  134|  11.5k|            int count;
  135|       |
  136|  11.5k|            if ((bitStream & (threshold-1)) < (U32)max) {
  ------------------
  |  Branch (136:17): [True: 10.3k, False: 1.20k]
  ------------------
  137|  10.3k|                count = bitStream & (threshold-1);
  138|  10.3k|                bitCount += nbBits-1;
  139|  10.3k|            } else {
  140|  1.20k|                count = bitStream & (2*threshold-1);
  141|  1.20k|                if (count >= threshold) count -= max;
  ------------------
  |  Branch (141:21): [True: 290, False: 912]
  ------------------
  142|  1.20k|                bitCount += nbBits;
  143|  1.20k|            }
  144|       |
  145|  11.5k|            count--;   /* extra accuracy */
  146|       |            /* When it matters (small blocks), this is a
  147|       |             * predictable branch, because we don't use -1.
  148|       |             */
  149|  11.5k|            if (count >= 0) {
  ------------------
  |  Branch (149:17): [True: 2.46k, False: 9.12k]
  ------------------
  150|  2.46k|                remaining -= count;
  151|  9.12k|            } else {
  152|  9.12k|                assert(count == -1);
  ------------------
  |  Branch (152:17): [True: 0, False: 9.12k]
  |  Branch (152:17): [True: 9.12k, False: 0]
  ------------------
  153|  9.12k|                remaining += count;
  154|  9.12k|            }
  155|  11.5k|            normalizedCounter[charnum++] = (short)count;
  156|  11.5k|            previous0 = !count;
  157|       |
  158|  11.5k|            assert(threshold > 1);
  ------------------
  |  Branch (158:13): [True: 0, False: 11.5k]
  |  Branch (158:13): [True: 11.5k, False: 0]
  ------------------
  159|  11.5k|            if (remaining < threshold) {
  ------------------
  |  Branch (159:17): [True: 981, False: 10.6k]
  ------------------
  160|       |                /* This branch can be folded into the
  161|       |                 * threshold update condition because we
  162|       |                 * know that threshold > 1.
  163|       |                 */
  164|    981|                if (remaining <= 1) break;
  ------------------
  |  Branch (164:21): [True: 232, False: 749]
  ------------------
  165|    749|                nbBits = ZSTD_highbit32(remaining) + 1;
  166|    749|                threshold = 1 << (nbBits - 1);
  167|    749|            }
  168|  11.3k|            if (charnum >= maxSV1) break;
  ------------------
  |  Branch (168:17): [True: 0, False: 11.3k]
  ------------------
  169|       |
  170|  11.3k|            if (LIKELY(ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) {
  ------------------
  |  |  195|  22.7k|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (195:19): [True: 10.7k, False: 646]
  |  |  ------------------
  ------------------
  |  Branch (170:41): [True: 413, False: 233]
  ------------------
  171|  11.1k|                ip += bitCount>>3;
  172|  11.1k|                bitCount &= 7;
  173|  11.1k|            } else {
  174|    233|                bitCount -= (int)(8 * (iend - 4 - ip));
  175|    233|                bitCount &= 31;
  176|    233|                ip = iend - 4;
  177|    233|            }
  178|  11.3k|            bitStream = MEM_readLE32(ip) >> bitCount;
  179|  11.3k|    }   }
  180|    232|    if (remaining != 1) return ERROR(corruption_detected);
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (180:9): [True: 0, False: 232]
  ------------------
  181|       |    /* Only possible when there are too many zeros. */
  182|    232|    if (charnum > maxSV1) return ERROR(maxSymbolValue_tooSmall);
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (182:9): [True: 0, False: 232]
  ------------------
  183|    232|    if (bitCount > 32) return ERROR(corruption_detected);
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (183:9): [True: 0, False: 232]
  ------------------
  184|    232|    *maxSVPtr = charnum-1;
  185|       |
  186|    232|    ip += (bitCount+7)>>3;
  187|    232|    return ip-istart;
  188|    232|}
entropy_common.c:FSE_readNCount_body_default:
  194|    286|{
  195|    286|    return FSE_readNCount_body(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize);
  196|    286|}

entropy_common.c:ERR_isError:
   52|     54|ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxCode)); }
  ------------------
  |  |   49|     54|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|     54|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|     54|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
zstd_common.c:ERR_isError:
   52|    464|ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxCode)); }
  ------------------
  |  |   49|    464|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|    464|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|    464|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------

entropy_common.c:MEM_readLE32:
  322|  12.9k|{
  323|  12.9k|    if (MEM_isLittleEndian())
  ------------------
  |  Branch (323:9): [True: 12.9k, False: 0]
  ------------------
  324|  12.9k|        return MEM_read32(memPtr);
  325|      0|    else
  326|      0|        return MEM_swap32(MEM_read32(memPtr));
  327|  12.9k|}
entropy_common.c:MEM_isLittleEndian:
  141|  12.9k|{
  142|  12.9k|#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
  143|  12.9k|    return 1;
  144|       |#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
  145|       |    return 0;
  146|       |#elif defined(__clang__) && __LITTLE_ENDIAN__
  147|       |    return 1;
  148|       |#elif defined(__clang__) && __BIG_ENDIAN__
  149|       |    return 0;
  150|       |#elif defined(_MSC_VER) && (_M_X64 || _M_IX86)
  151|       |    return 1;
  152|       |#elif defined(__DMC__) && defined(_M_IX86)
  153|       |    return 1;
  154|       |#elif defined(__IAR_SYSTEMS_ICC__) && __LITTLE_ENDIAN__
  155|       |    return 1;
  156|       |#else
  157|       |    const union { U32 u; BYTE c[4]; } one = { 1 };   /* don't use static : performance detrimental  */
  158|       |    return one.c[0];
  159|       |#endif
  160|  12.9k|}
entropy_common.c:MEM_read32:
  202|  12.9k|{
  203|  12.9k|    U32 val; ZSTD_memcpy(&val, memPtr, sizeof(val)); return val;
  ------------------
  |  |   44|  12.9k|# define ZSTD_memcpy(d,s,l) __builtin_memcpy((d),(s),(l))
  ------------------
  204|  12.9k|}

ZSTD_isError:
   36|    464|unsigned ZSTD_isError(size_t code) { return ERR_isError(code); }

FSE_NCountWriteBound:
  224|    464|{
  225|    464|    size_t const maxHeaderSize = (((maxSymbolValue+1) * tableLog
  226|    464|                                   + 4 /* bitCount initialized at 4 */
  227|    464|                                   + 2 /* first two symbols may use one additional bit each */) / 8)
  228|    464|                                   + 1 /* round up to whole nb bytes */
  229|    464|                                   + 2 /* additional two bytes for bitstream flush */;
  230|    464|    return maxSymbolValue ? maxHeaderSize : FSE_NCOUNTBOUND;  /* maxSymbolValue==0 ? use default */
  ------------------
  |  |  235|     76|#define FSE_NCOUNTBOUND 512
  ------------------
  |  Branch (230:12): [True: 388, False: 76]
  ------------------
  231|    464|}
FSE_writeNCount:
  332|    232|{
  333|    232|    if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge);   /* Unsupported */
  ------------------
  |  |  612|    232|#define FSE_MAX_TABLELOG  (FSE_MAX_MEMORY_USAGE-2)
  |  |  ------------------
  |  |  |  |  582|    232|#  define FSE_MAX_MEMORY_USAGE 14
  |  |  ------------------
  ------------------
                  if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge);   /* Unsupported */
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (333:9): [True: 0, False: 232]
  ------------------
  334|    232|    if (tableLog < FSE_MIN_TABLELOG) return ERROR(GENERIC);   /* Unsupported */
  ------------------
  |  |  616|    232|#define FSE_MIN_TABLELOG 5
  ------------------
                  if (tableLog < FSE_MIN_TABLELOG) return ERROR(GENERIC);   /* Unsupported */
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (334:9): [True: 0, False: 232]
  ------------------
  335|       |
  336|    232|    if (bufferSize < FSE_NCountWriteBound(maxSymbolValue, tableLog))
  ------------------
  |  Branch (336:9): [True: 0, False: 232]
  ------------------
  337|      0|        return FSE_writeNCount_generic(buffer, bufferSize, normalizedCounter, maxSymbolValue, tableLog, 0);
  338|       |
  339|    232|    return FSE_writeNCount_generic(buffer, bufferSize, normalizedCounter, maxSymbolValue, tableLog, 1 /* write in buffer is safe */);
  340|    232|}
fse_compress.c:FSE_writeNCount_generic:
  237|    232|{
  238|    232|    BYTE* const ostart = (BYTE*) header;
  239|    232|    BYTE* out = ostart;
  240|    232|    BYTE* const oend = ostart + headerBufferSize;
  241|    232|    int nbBits;
  242|    232|    const int tableSize = 1 << tableLog;
  243|    232|    int remaining;
  244|    232|    int threshold;
  245|    232|    U32 bitStream = 0;
  246|    232|    int bitCount = 0;
  247|    232|    unsigned symbol = 0;
  248|    232|    unsigned const alphabetSize = maxSymbolValue + 1;
  249|    232|    int previousIs0 = 0;
  250|       |
  251|       |    /* Table Size */
  252|    232|    bitStream += (tableLog-FSE_MIN_TABLELOG) << bitCount;
  ------------------
  |  |  616|    232|#define FSE_MIN_TABLELOG 5
  ------------------
  253|    232|    bitCount  += 4;
  254|       |
  255|       |    /* Init */
  256|    232|    remaining = tableSize+1;   /* +1 for extra accuracy */
  257|    232|    threshold = tableSize;
  258|    232|    nbBits = (int)tableLog+1;
  259|       |
  260|  11.8k|    while ((symbol < alphabetSize) && (remaining>1)) {  /* stops at 1 */
  ------------------
  |  Branch (260:12): [True: 11.5k, False: 232]
  |  Branch (260:39): [True: 11.5k, False: 0]
  ------------------
  261|  11.5k|        if (previousIs0) {
  ------------------
  |  Branch (261:13): [True: 1.06k, False: 10.5k]
  ------------------
  262|  1.06k|            unsigned start = symbol;
  263|  14.7k|            while ((symbol < alphabetSize) && !normalizedCounter[symbol]) symbol++;
  ------------------
  |  Branch (263:20): [True: 14.7k, False: 0]
  |  Branch (263:47): [True: 13.7k, False: 1.06k]
  ------------------
  264|  1.06k|            if (symbol == alphabetSize) break;   /* incorrect distribution */
  ------------------
  |  Branch (264:17): [True: 0, False: 1.06k]
  ------------------
  265|  1.53k|            while (symbol >= start+24) {
  ------------------
  |  Branch (265:20): [True: 474, False: 1.06k]
  ------------------
  266|    474|                start+=24;
  267|    474|                bitStream += 0xFFFFU << bitCount;
  268|    474|                if ((!writeIsSafe) && (out > oend-2))
  ------------------
  |  Branch (268:21): [True: 0, False: 474]
  |  Branch (268:39): [True: 0, False: 0]
  ------------------
  269|      0|                    return ERROR(dstSize_tooSmall);   /* Buffer overflow */
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  270|    474|                out[0] = (BYTE) bitStream;
  271|    474|                out[1] = (BYTE)(bitStream>>8);
  272|    474|                out+=2;
  273|    474|                bitStream>>=16;
  274|    474|            }
  275|  1.78k|            while (symbol >= start+3) {
  ------------------
  |  Branch (275:20): [True: 723, False: 1.06k]
  ------------------
  276|    723|                start+=3;
  277|    723|                bitStream += 3U << bitCount;
  278|    723|                bitCount += 2;
  279|    723|            }
  280|  1.06k|            bitStream += (symbol-start) << bitCount;
  281|  1.06k|            bitCount += 2;
  282|  1.06k|            if (bitCount>16) {
  ------------------
  |  Branch (282:17): [True: 251, False: 812]
  ------------------
  283|    251|                if ((!writeIsSafe) && (out > oend - 2))
  ------------------
  |  Branch (283:21): [True: 0, False: 251]
  |  Branch (283:39): [True: 0, False: 0]
  ------------------
  284|      0|                    return ERROR(dstSize_tooSmall);   /* Buffer overflow */
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  285|    251|                out[0] = (BYTE)bitStream;
  286|    251|                out[1] = (BYTE)(bitStream>>8);
  287|    251|                out += 2;
  288|    251|                bitStream >>= 16;
  289|    251|                bitCount -= 16;
  290|    251|        }   }
  291|  11.5k|        {   int count = normalizedCounter[symbol++];
  292|  11.5k|            int const max = (2*threshold-1) - remaining;
  293|  11.5k|            remaining -= count < 0 ? -count : count;
  ------------------
  |  Branch (293:26): [True: 9.12k, False: 2.46k]
  ------------------
  294|  11.5k|            count++;   /* +1 for extra accuracy */
  295|  11.5k|            if (count>=threshold)
  ------------------
  |  Branch (295:17): [True: 290, False: 11.3k]
  ------------------
  296|    290|                count += max;   /* [0..max[ [max..threshold[ (...) [threshold+max 2*threshold[ */
  297|  11.5k|            bitStream += (U32)count << bitCount;
  298|  11.5k|            bitCount  += nbBits;
  299|  11.5k|            bitCount  -= (count<max);
  300|  11.5k|            previousIs0  = (count==1);
  301|  11.5k|            if (remaining<1) return ERROR(GENERIC);
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (301:17): [True: 0, False: 11.5k]
  ------------------
  302|  13.4k|            while (remaining<threshold) { nbBits--; threshold>>=1; }
  ------------------
  |  Branch (302:20): [True: 1.81k, False: 11.5k]
  ------------------
  303|  11.5k|        }
  304|  11.5k|        if (bitCount>16) {
  ------------------
  |  Branch (304:13): [True: 4.55k, False: 7.04k]
  ------------------
  305|  4.55k|            if ((!writeIsSafe) && (out > oend - 2))
  ------------------
  |  Branch (305:17): [True: 0, False: 4.55k]
  |  Branch (305:35): [True: 0, False: 0]
  ------------------
  306|      0|                return ERROR(dstSize_tooSmall);   /* Buffer overflow */
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  307|  4.55k|            out[0] = (BYTE)bitStream;
  308|  4.55k|            out[1] = (BYTE)(bitStream>>8);
  309|  4.55k|            out += 2;
  310|  4.55k|            bitStream >>= 16;
  311|  4.55k|            bitCount -= 16;
  312|  4.55k|    }   }
  313|       |
  314|    232|    if (remaining != 1)
  ------------------
  |  Branch (314:9): [True: 0, False: 232]
  ------------------
  315|      0|        return ERROR(GENERIC);  /* incorrect normalized distribution */
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  316|    232|    assert(symbol <= alphabetSize);
  ------------------
  |  Branch (316:5): [True: 0, False: 232]
  |  Branch (316:5): [True: 232, False: 0]
  ------------------
  317|       |
  318|       |    /* flush remaining bitStream */
  319|    232|    if ((!writeIsSafe) && (out > oend - 2))
  ------------------
  |  Branch (319:9): [True: 0, False: 232]
  |  Branch (319:27): [True: 0, False: 0]
  ------------------
  320|      0|        return ERROR(dstSize_tooSmall);   /* Buffer overflow */
  ------------------
  |  |   49|      0|#define ERROR(name) ZSTD_ERROR(name)
  |  |  ------------------
  |  |  |  |   50|      0|#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define PREFIX(name) ZSTD_error_##name
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  321|    232|    out[0] = (BYTE)bitStream;
  322|    232|    out[1] = (BYTE)(bitStream>>8);
  323|    232|    out+= (bitCount+7) /8;
  324|       |
  325|    232|    assert(out >= ostart);
  ------------------
  |  Branch (325:5): [True: 0, False: 232]
  |  Branch (325:5): [True: 232, False: 0]
  ------------------
  326|    232|    return (size_t)(out-ostart);
  327|    232|}

LLVMFuzzerTestOneInput:
   29|    232|{
   30|    232|    FUZZ_dataProducer_t *producer = FUZZ_dataProducer_create(src, size);
   31|       |
   32|       |    /* Pick a random tableLog and maxSymbolValue */
   33|    232|    unsigned const tableLog = FUZZ_dataProducer_uint32Range(producer, FSE_MIN_TABLELOG, FSE_MAX_TABLELOG);
  ------------------
  |  |  616|    232|#define FSE_MIN_TABLELOG 5
  ------------------
                  unsigned const tableLog = FUZZ_dataProducer_uint32Range(producer, FSE_MIN_TABLELOG, FSE_MAX_TABLELOG);
  ------------------
  |  |  612|    232|#define FSE_MAX_TABLELOG  (FSE_MAX_MEMORY_USAGE-2)
  |  |  ------------------
  |  |  |  |  582|    232|#  define FSE_MAX_MEMORY_USAGE 14
  |  |  ------------------
  ------------------
   34|    232|    unsigned const maxSymbolValue = FUZZ_dataProducer_uint32Range(producer, 0, 255);
   35|       |
   36|    232|    unsigned remainingWeight = (1u << tableLog) - 1;
   37|    232|    size_t dataSize;
   38|    232|    BYTE data[512];
   39|    232|    short ncount[256];
   40|       |
   41|       |    /* Randomly fill the normalized count */
   42|    232|    memset(ncount, 0, sizeof(ncount));
   43|    232|    {
   44|    232|        unsigned s;
   45|  13.2k|        for (s = 0; s < maxSymbolValue && remainingWeight > 0; ++s) {
  ------------------
  |  Branch (45:21): [True: 13.1k, False: 91]
  |  Branch (45:43): [True: 13.0k, False: 141]
  ------------------
   46|  13.0k|            short n = (short)FUZZ_dataProducer_int32Range(producer, -1, remainingWeight);
   47|  13.0k|            ncount[s] = n;
   48|  13.0k|            if (n < 0) {
  ------------------
  |  Branch (48:17): [True: 9.11k, False: 3.92k]
  ------------------
   49|  9.11k|                remainingWeight -= 1;
   50|  9.11k|            } else {
   51|  3.92k|                assert((unsigned)n <= remainingWeight);
  ------------------
  |  Branch (51:17): [True: 0, False: 3.92k]
  |  Branch (51:17): [True: 3.92k, False: 0]
  ------------------
   52|  3.92k|                remainingWeight -= n;
   53|  3.92k|            }
   54|  13.0k|        }
   55|       |        /* Ensure ncount[maxSymbolValue] != 0 and the sum is (1<<tableLog) */
   56|    232|        ncount[maxSymbolValue] = remainingWeight + 1;
   57|    232|        if (ncount[maxSymbolValue] == 1 && FUZZ_dataProducer_uint32Range(producer, 0, 1) == 1) {
  ------------------
  |  Branch (57:13): [True: 143, False: 89]
  |  Branch (57:44): [True: 13, False: 130]
  ------------------
   58|     13|            ncount[maxSymbolValue] = -1;
   59|     13|        }
   60|    232|    }
   61|       |    /* Write the normalized count */
   62|    232|    {
   63|    232|        FUZZ_ASSERT(sizeof(data) >= FSE_NCountWriteBound(maxSymbolValue, tableLog));
  ------------------
  |  |   45|    232|#define FUZZ_ASSERT(cond) FUZZ_ASSERT_MSG((cond), "");
  |  |  ------------------
  |  |  |  |   41|    232|  ((cond) ? (void)0                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 232, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   42|    232|          : (fprintf(stderr, "%s: %u: Assertion: `%s' failed. %s\n", __FILE__, \
  |  |  |  |   43|      0|                     __LINE__, FUZZ_QUOTE(cond), (msg)),                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define FUZZ_QUOTE(str) FUZZ_QUOTE_IMPL(str)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|      0|#define FUZZ_QUOTE_IMPL(str) #str
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   44|      0|             abort()))
  |  |  ------------------
  ------------------
   64|    232|        dataSize = FSE_writeNCount(data, sizeof(data), ncount, maxSymbolValue, tableLog);
   65|    232|        FUZZ_ZASSERT(dataSize);
  ------------------
  |  |   47|    232|  FUZZ_ASSERT_MSG(!ZSTD_isError(code), ZSTD_getErrorName(code))
  |  |  ------------------
  |  |  |  |   41|    232|  ((cond) ? (void)0                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 232, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   42|    232|          : (fprintf(stderr, "%s: %u: Assertion: `%s' failed. %s\n", __FILE__, \
  |  |  |  |   43|      0|                     __LINE__, FUZZ_QUOTE(cond), (msg)),                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define FUZZ_QUOTE(str) FUZZ_QUOTE_IMPL(str)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|      0|#define FUZZ_QUOTE_IMPL(str) #str
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   44|      0|             abort()))
  |  |  ------------------
  ------------------
   66|    232|    }
   67|       |    /* Read & validate the normalized count */
   68|    232|    {
   69|    232|        short rtNcount[256];
   70|    232|        unsigned rtMaxSymbolValue = 255;
   71|    232|        unsigned rtTableLog;
   72|       |        /* Copy into a buffer with a random amount of random data at the end */
   73|    232|        size_t const buffSize = (size_t)FUZZ_dataProducer_uint32Range(producer, dataSize, sizeof(data));
   74|    232|        BYTE* const buff = FUZZ_malloc(buffSize);
   75|    232|        size_t rtDataSize;
   76|    232|        memcpy(buff, data, dataSize); 
   77|    232|        {
   78|    232|            size_t b;
   79|  11.3k|            for (b = dataSize; b < buffSize; ++b) {
  ------------------
  |  Branch (79:32): [True: 11.1k, False: 232]
  ------------------
   80|  11.1k|                buff[b] = (BYTE)FUZZ_dataProducer_uint32Range(producer, 0, 255);
   81|  11.1k|            }
   82|    232|        }
   83|       |
   84|    232|        rtDataSize = FSE_readNCount(rtNcount, &rtMaxSymbolValue, &rtTableLog, buff, buffSize);
   85|    232|        FUZZ_ZASSERT(rtDataSize);
  ------------------
  |  |   47|    232|  FUZZ_ASSERT_MSG(!ZSTD_isError(code), ZSTD_getErrorName(code))
  |  |  ------------------
  |  |  |  |   41|    232|  ((cond) ? (void)0                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 232, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   42|    232|          : (fprintf(stderr, "%s: %u: Assertion: `%s' failed. %s\n", __FILE__, \
  |  |  |  |   43|      0|                     __LINE__, FUZZ_QUOTE(cond), (msg)),                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define FUZZ_QUOTE(str) FUZZ_QUOTE_IMPL(str)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|      0|#define FUZZ_QUOTE_IMPL(str) #str
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   44|      0|             abort()))
  |  |  ------------------
  ------------------
   86|    232|        FUZZ_ASSERT(rtDataSize == dataSize);
  ------------------
  |  |   45|    232|#define FUZZ_ASSERT(cond) FUZZ_ASSERT_MSG((cond), "");
  |  |  ------------------
  |  |  |  |   41|    232|  ((cond) ? (void)0                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 232, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   42|    232|          : (fprintf(stderr, "%s: %u: Assertion: `%s' failed. %s\n", __FILE__, \
  |  |  |  |   43|      0|                     __LINE__, FUZZ_QUOTE(cond), (msg)),                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define FUZZ_QUOTE(str) FUZZ_QUOTE_IMPL(str)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|      0|#define FUZZ_QUOTE_IMPL(str) #str
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   44|      0|             abort()))
  |  |  ------------------
  ------------------
   87|    232|        FUZZ_ASSERT(rtMaxSymbolValue == maxSymbolValue);
  ------------------
  |  |   45|    232|#define FUZZ_ASSERT(cond) FUZZ_ASSERT_MSG((cond), "");
  |  |  ------------------
  |  |  |  |   41|    232|  ((cond) ? (void)0                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 232, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   42|    232|          : (fprintf(stderr, "%s: %u: Assertion: `%s' failed. %s\n", __FILE__, \
  |  |  |  |   43|      0|                     __LINE__, FUZZ_QUOTE(cond), (msg)),                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define FUZZ_QUOTE(str) FUZZ_QUOTE_IMPL(str)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|      0|#define FUZZ_QUOTE_IMPL(str) #str
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   44|      0|             abort()))
  |  |  ------------------
  ------------------
   88|    232|        FUZZ_ASSERT(rtTableLog == tableLog);
  ------------------
  |  |   45|    232|#define FUZZ_ASSERT(cond) FUZZ_ASSERT_MSG((cond), "");
  |  |  ------------------
  |  |  |  |   41|    232|  ((cond) ? (void)0                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 232, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   42|    232|          : (fprintf(stderr, "%s: %u: Assertion: `%s' failed. %s\n", __FILE__, \
  |  |  |  |   43|      0|                     __LINE__, FUZZ_QUOTE(cond), (msg)),                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define FUZZ_QUOTE(str) FUZZ_QUOTE_IMPL(str)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|      0|#define FUZZ_QUOTE_IMPL(str) #str
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   44|      0|             abort()))
  |  |  ------------------
  ------------------
   89|    232|        {
   90|    232|            unsigned s;
   91|  25.5k|            for (s = 0; s <= maxSymbolValue; ++s) {
  ------------------
  |  Branch (91:25): [True: 25.3k, False: 232]
  ------------------
   92|  25.3k|                FUZZ_ASSERT(ncount[s] == rtNcount[s]);
  ------------------
  |  |   45|  25.3k|#define FUZZ_ASSERT(cond) FUZZ_ASSERT_MSG((cond), "");
  |  |  ------------------
  |  |  |  |   41|  25.3k|  ((cond) ? (void)0                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 25.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   42|  25.3k|          : (fprintf(stderr, "%s: %u: Assertion: `%s' failed. %s\n", __FILE__, \
  |  |  |  |   43|      0|                     __LINE__, FUZZ_QUOTE(cond), (msg)),                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define FUZZ_QUOTE(str) FUZZ_QUOTE_IMPL(str)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|      0|#define FUZZ_QUOTE_IMPL(str) #str
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   44|      0|             abort()))
  |  |  ------------------
  ------------------
   93|  25.3k|            }
   94|    232|        }
   95|    232|        free(buff);
   96|    232|    }
   97|       |
   98|      0|    FUZZ_dataProducer_free(producer);
   99|    232|    return 0;
  100|    232|}

FUZZ_dataProducer_create:
   19|    232|FUZZ_dataProducer_t *FUZZ_dataProducer_create(const uint8_t *data, size_t size) {
   20|    232|    FUZZ_dataProducer_t *producer = FUZZ_malloc(sizeof(FUZZ_dataProducer_t));
   21|       |
   22|    232|    producer->data = data;
   23|    232|    producer->size = size;
   24|    232|    return producer;
   25|    232|}
FUZZ_dataProducer_free:
   27|    232|void FUZZ_dataProducer_free(FUZZ_dataProducer_t *producer) { free(producer); }
FUZZ_dataProducer_uint32Range:
   30|  25.0k|                                  uint32_t max) {
   31|  25.0k|    uint32_t range = max - min;
   32|  25.0k|    uint32_t rolling = range;
   33|  25.0k|    uint32_t result = 0;
   34|       |
   35|  25.0k|    FUZZ_ASSERT(min <= max);
  ------------------
  |  |   45|  25.0k|#define FUZZ_ASSERT(cond) FUZZ_ASSERT_MSG((cond), "");
  |  |  ------------------
  |  |  |  |   41|  25.0k|  ((cond) ? (void)0                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 25.0k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   42|  25.0k|          : (fprintf(stderr, "%s: %u: Assertion: `%s' failed. %s\n", __FILE__, \
  |  |  |  |   43|      0|                     __LINE__, FUZZ_QUOTE(cond), (msg)),                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define FUZZ_QUOTE(str) FUZZ_QUOTE_IMPL(str)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|      0|#define FUZZ_QUOTE_IMPL(str) #str
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   44|      0|             abort()))
  |  |  ------------------
  ------------------
   36|       |
   37|  36.4k|    while (rolling > 0 && producer->size > 0) {
  ------------------
  |  Branch (37:12): [True: 25.5k, False: 10.9k]
  |  Branch (37:27): [True: 11.4k, False: 14.0k]
  ------------------
   38|  11.4k|      uint8_t next = *(producer->data + producer->size - 1);
   39|  11.4k|      producer->size -= 1;
   40|  11.4k|      result = (result << 8) | next;
   41|  11.4k|      rolling >>= 8;
   42|  11.4k|    }
   43|       |
   44|  25.0k|    if (range == 0xffffffff) {
  ------------------
  |  Branch (44:9): [True: 0, False: 25.0k]
  ------------------
   45|      0|      return result;
   46|      0|    }
   47|       |
   48|  25.0k|    return min + result % (range + 1);
   49|  25.0k|}
FUZZ_dataProducer_int32Range:
   57|  13.0k|{
   58|  13.0k|    FUZZ_ASSERT(min <= max);
  ------------------
  |  |   45|  13.0k|#define FUZZ_ASSERT(cond) FUZZ_ASSERT_MSG((cond), "");
  |  |  ------------------
  |  |  |  |   41|  13.0k|  ((cond) ? (void)0                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 13.0k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   42|  13.0k|          : (fprintf(stderr, "%s: %u: Assertion: `%s' failed. %s\n", __FILE__, \
  |  |  |  |   43|      0|                     __LINE__, FUZZ_QUOTE(cond), (msg)),                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define FUZZ_QUOTE(str) FUZZ_QUOTE_IMPL(str)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|      0|#define FUZZ_QUOTE_IMPL(str) #str
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   44|      0|             abort()))
  |  |  ------------------
  ------------------
   59|       |
   60|  13.0k|    if (min < 0)
  ------------------
  |  Branch (60:9): [True: 13.0k, False: 0]
  ------------------
   61|  13.0k|      return (int)FUZZ_dataProducer_uint32Range(producer, 0, max - min) + min;
   62|       |
   63|      0|    return FUZZ_dataProducer_uint32Range(producer, min, max);
   64|  13.0k|}

FUZZ_malloc:
   17|    464|{
   18|    464|    if (size > 0) {
  ------------------
  |  Branch (18:9): [True: 464, False: 0]
  ------------------
   19|    464|        void* const mem = malloc(size);
   20|    464|        FUZZ_ASSERT(mem);
  ------------------
  |  |   45|    464|#define FUZZ_ASSERT(cond) FUZZ_ASSERT_MSG((cond), "");
  |  |  ------------------
  |  |  |  |   41|    464|  ((cond) ? (void)0                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 464, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   42|    464|          : (fprintf(stderr, "%s: %u: Assertion: `%s' failed. %s\n", __FILE__, \
  |  |  |  |   43|      0|                     __LINE__, FUZZ_QUOTE(cond), (msg)),                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define FUZZ_QUOTE(str) FUZZ_QUOTE_IMPL(str)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|      0|#define FUZZ_QUOTE_IMPL(str) #str
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   44|      0|             abort()))
  |  |  ------------------
  ------------------
   21|    464|        return mem;
   22|    464|    }
   23|      0|    return NULL;
   24|    464|}

