test_dict_deflate:
   28|  3.87k|{
   29|  3.87k|    z_stream c_stream; /* compression stream */
   30|  3.87k|    int err;
   31|  3.87k|    int level = data[0] % 11 - 1; /* [-1..9]
   32|       |      compression levels
   33|       |      #define Z_NO_COMPRESSION         0
   34|       |      #define Z_BEST_SPEED             1
   35|       |      #define Z_BEST_COMPRESSION       9
   36|       |      #define Z_DEFAULT_COMPRESSION  (-1) */
   37|       |
   38|  3.87k|    int method = Z_DEFLATED; /* The deflate compression method (the only one
  ------------------
  |  |  213|  3.87k|#define Z_DEFLATED   8
  ------------------
   39|       |                                supported in this version) */
   40|  3.87k|    int windowBits = 8 + data[0] % 8; /* The windowBits parameter is the base
   41|       |      two logarithm of the window size (the size of the history buffer).  It
   42|       |      should be in the range 8..15 for this version of the library. */
   43|  3.87k|    int memLevel = 1 + data[0] % 9;   /* memLevel=1 uses minimum memory but is
   44|       |      slow and reduces compression ratio; memLevel=9 uses maximum memory for
   45|       |      optimal speed. */
   46|  3.87k|    int strategy = data[0] % 5;       /* [0..4]
   47|       |      #define Z_FILTERED            1
   48|       |      #define Z_HUFFMAN_ONLY        2
   49|       |      #define Z_RLE                 3
   50|       |      #define Z_FIXED               4
   51|       |      #define Z_DEFAULT_STRATEGY    0 */
   52|       |
   53|       |    /* deflate would fail for no-compression or for speed levels. */
   54|  3.87k|    if (level == 0 || level == 1)
  ------------------
  |  Branch (54:9): [True: 251, False: 3.62k]
  |  Branch (54:23): [True: 335, False: 3.28k]
  ------------------
   55|    586|      level = -1;
   56|       |
   57|  3.87k|    c_stream.zalloc = zalloc;
   58|  3.87k|    c_stream.zfree = zfree;
   59|  3.87k|    c_stream.opaque = (void *)0;
   60|       |
   61|  3.87k|    err = deflateInit2(&c_stream, level, method, windowBits, memLevel, strategy);
  ------------------
  |  | 1947|  3.87k|          deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
  |  | 1948|  3.87k|                        (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
  |  |  ------------------
  |  |  |  |   44|  3.87k|#define ZLIB_VERSION "1.4"
  |  |  ------------------
  ------------------
   62|  3.87k|    CHECK_ERR(err, "deflateInit");
  ------------------
  |  |   10|  3.87k|#define CHECK_ERR(err, msg) { \
  |  |   11|  3.87k|    if (err != Z_OK) { \
  |  |  ------------------
  |  |  |  |  181|  7.74k|#define Z_OK            0
  |  |  ------------------
  |  |  |  Branch (11:9): [True: 0, False: 3.87k]
  |  |  ------------------
  |  |   12|      0|        fprintf(stderr, "%s error: %d\n", msg, err); \
  |  |   13|      0|        return 0; \
  |  |   14|      0|    } \
  |  |   15|  3.87k|}
  ------------------
   63|       |
   64|  3.87k|    err = deflateSetDictionary(
   65|  3.87k|        &c_stream, (const unsigned char *)data, dictionaryLen);
   66|  3.87k|    CHECK_ERR(err, "deflateSetDictionary");
  ------------------
  |  |   10|  3.87k|#define CHECK_ERR(err, msg) { \
  |  |   11|  3.87k|    if (err != Z_OK) { \
  |  |  ------------------
  |  |  |  |  181|  7.74k|#define Z_OK            0
  |  |  ------------------
  |  |  |  Branch (11:9): [True: 0, False: 3.87k]
  |  |  ------------------
  |  |   12|      0|        fprintf(stderr, "%s error: %d\n", msg, err); \
  |  |   13|      0|        return 0; \
  |  |   14|      0|    } \
  |  |   15|  3.87k|}
  ------------------
   67|       |
   68|       |    /* deflateBound does not provide enough space for low compression levels. */
   69|  3.87k|    *comprLen = 100 + 2 * deflateBound(&c_stream, dataLen);
   70|  3.87k|    *compr = (uint8_t *)calloc(1, *comprLen);
   71|       |
   72|  3.87k|    dictId = c_stream.adler;
   73|  3.87k|    c_stream.next_out = *compr;
   74|  3.87k|    c_stream.avail_out = (unsigned int)(*comprLen);
   75|       |
   76|  3.87k|    c_stream.next_in = (Bytef *)data;
   77|  3.87k|    c_stream.avail_in = dataLen;
   78|       |
   79|  3.87k|    err = deflate(&c_stream, Z_FINISH);
  ------------------
  |  |  176|  3.87k|#define Z_FINISH        4
  ------------------
   80|  3.87k|    if (err != Z_STREAM_END) {
  ------------------
  |  |  182|  3.87k|#define Z_STREAM_END    1
  ------------------
  |  Branch (80:9): [True: 0, False: 3.87k]
  ------------------
   81|      0|        fprintf(stderr, "deflate dict should report Z_STREAM_END\n");
   82|      0|        return 0;
   83|      0|    }
   84|  3.87k|    err = deflateEnd(&c_stream);
   85|  3.87k|    CHECK_ERR(err, "deflateEnd");
  ------------------
  |  |   10|  3.87k|#define CHECK_ERR(err, msg) { \
  |  |   11|  3.87k|    if (err != Z_OK) { \
  |  |  ------------------
  |  |  |  |  181|  7.74k|#define Z_OK            0
  |  |  ------------------
  |  |  |  Branch (11:9): [True: 0, False: 3.87k]
  |  |  ------------------
  |  |   12|      0|        fprintf(stderr, "%s error: %d\n", msg, err); \
  |  |   13|      0|        return 0; \
  |  |   14|      0|    } \
  |  |   15|  3.87k|}
  ------------------
   86|  3.87k|    return 0;
   87|  3.87k|}
test_dict_inflate:
   92|  3.87k|int test_dict_inflate(unsigned char *compr, size_t comprLen) {
   93|  3.87k|  int err;
   94|  3.87k|  z_stream d_stream; /* decompression stream */
   95|  3.87k|  unsigned char *uncompr;
   96|       |
   97|  3.87k|  d_stream.zalloc = zalloc;
   98|  3.87k|  d_stream.zfree = zfree;
   99|  3.87k|  d_stream.opaque = (void *)0;
  100|       |
  101|  3.87k|  d_stream.next_in = compr;
  102|  3.87k|  d_stream.avail_in = (unsigned int)comprLen;
  103|       |
  104|  3.87k|  err = inflateInit(&d_stream);
  ------------------
  |  | 1945|  3.87k|          inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
  |  |  ------------------
  |  |  |  |   44|  3.87k|#define ZLIB_VERSION "1.4"
  |  |  ------------------
  ------------------
  105|  3.87k|  CHECK_ERR(err, "inflateInit");
  ------------------
  |  |   10|  3.87k|#define CHECK_ERR(err, msg) { \
  |  |   11|  3.87k|    if (err != Z_OK) { \
  |  |  ------------------
  |  |  |  |  181|  7.74k|#define Z_OK            0
  |  |  ------------------
  |  |  |  Branch (11:9): [True: 0, False: 3.87k]
  |  |  ------------------
  |  |   12|      0|        fprintf(stderr, "%s error: %d\n", msg, err); \
  |  |   13|      0|        return 0; \
  |  |   14|      0|    } \
  |  |   15|  3.87k|}
  ------------------
  106|       |
  107|  3.87k|  uncompr = (uint8_t *)calloc(1, dataLen);
  108|  3.87k|  d_stream.next_out = uncompr;
  109|  3.87k|  d_stream.avail_out = (unsigned int)dataLen;
  110|       |
  111|  7.49k|  for (;;) {
  112|  7.49k|    err = inflate(&d_stream, Z_NO_FLUSH);
  ------------------
  |  |  172|  7.49k|#define Z_NO_FLUSH      0
  ------------------
  113|  7.49k|    if (err == Z_STREAM_END)
  ------------------
  |  |  182|  7.49k|#define Z_STREAM_END    1
  ------------------
  |  Branch (113:9): [True: 3.87k, False: 3.62k]
  ------------------
  114|  3.87k|      break;
  115|  3.62k|    if (err == Z_NEED_DICT) {
  ------------------
  |  |  183|  3.62k|#define Z_NEED_DICT     2
  ------------------
  |  Branch (115:9): [True: 3.62k, False: 0]
  ------------------
  116|  3.62k|      if (d_stream.adler != dictId) {
  ------------------
  |  Branch (116:11): [True: 0, False: 3.62k]
  ------------------
  117|      0|        fprintf(stderr, "unexpected dictionary");
  118|      0|        return 0;
  119|      0|      }
  120|  3.62k|      err = inflateSetDictionary(
  121|  3.62k|          &d_stream, (const unsigned char *)data, dictionaryLen);
  122|  3.62k|    }
  123|  3.62k|    CHECK_ERR(err, "inflate with dict");
  ------------------
  |  |   10|  3.62k|#define CHECK_ERR(err, msg) { \
  |  |   11|  3.62k|    if (err != Z_OK) { \
  |  |  ------------------
  |  |  |  |  181|  7.25k|#define Z_OK            0
  |  |  ------------------
  |  |  |  Branch (11:9): [True: 0, False: 3.62k]
  |  |  ------------------
  |  |   12|      0|        fprintf(stderr, "%s error: %d\n", msg, err); \
  |  |   13|      0|        return 0; \
  |  |   14|      0|    } \
  |  |   15|  3.62k|}
  ------------------
  124|  3.62k|  }
  125|       |
  126|  3.87k|  err = inflateEnd(&d_stream);
  127|  3.87k|  CHECK_ERR(err, "inflateEnd");
  ------------------
  |  |   10|  3.87k|#define CHECK_ERR(err, msg) { \
  |  |   11|  3.87k|    if (err != Z_OK) { \
  |  |  ------------------
  |  |  |  |  181|  7.74k|#define Z_OK            0
  |  |  ------------------
  |  |  |  Branch (11:9): [True: 0, False: 3.87k]
  |  |  ------------------
  |  |   12|      0|        fprintf(stderr, "%s error: %d\n", msg, err); \
  |  |   13|      0|        return 0; \
  |  |   14|      0|    } \
  |  |   15|  3.87k|}
  ------------------
  128|       |
  129|  3.87k|  if (memcmp(uncompr, data, dataLen)) {
  ------------------
  |  Branch (129:7): [True: 0, False: 3.87k]
  ------------------
  130|      0|    fprintf(stderr, "bad inflate with dict\n");
  131|      0|    return 0;
  132|      0|  }
  133|       |
  134|  3.87k|  free(uncompr);
  135|  3.87k|  return 0;
  136|  3.87k|}
LLVMFuzzerTestOneInput:
  138|  3.88k|int LLVMFuzzerTestOneInput(const uint8_t *d, size_t size) {
  139|  3.88k|  size_t comprLen = 0;
  140|  3.88k|  uint8_t *compr;
  141|       |
  142|       |  /* Discard inputs larger than 100Kb. */
  143|  3.88k|  static size_t kMaxSize = 100 * 1024;
  144|       |
  145|  3.88k|  if (size < 1 || size > kMaxSize)
  ------------------
  |  Branch (145:7): [True: 0, False: 3.88k]
  |  Branch (145:19): [True: 9, False: 3.87k]
  ------------------
  146|      9|    return 0;
  147|       |
  148|  3.87k|  data = d;
  149|  3.87k|  dataLen = size;
  150|       |
  151|       |  /* Set up the contents of the dictionary.  The size of the dictionary is
  152|       |     intentionally selected to be of unusual size.  To help cover more corner
  153|       |     cases, the size of the dictionary is read from the input data.  */
  154|  3.87k|  dictionaryLen = data[0];
  155|  3.87k|  if (dictionaryLen > dataLen)
  ------------------
  |  Branch (155:7): [True: 1.00k, False: 2.86k]
  ------------------
  156|  1.00k|    dictionaryLen = dataLen;
  157|       |
  158|  3.87k|  test_dict_deflate(&compr, &comprLen);
  159|  3.87k|  test_dict_inflate(compr, comprLen);
  160|       |
  161|  3.87k|  free(compr);
  162|       |
  163|       |  /* This function must return 0. */
  164|  3.87k|  return 0;
  165|  3.88k|}

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

deflateInit2_:
  389|  3.87k|                          const char *version, int stream_size) {
  390|  3.87k|    deflate_state *s;
  391|  3.87k|    int wrap = 1;
  392|  3.87k|    static const char my_version[] = ZLIB_VERSION;
  ------------------
  |  |   44|  3.87k|#define ZLIB_VERSION "1.4"
  ------------------
  393|       |
  394|  3.87k|    if (version == Z_NULL || version[0] != my_version[0] ||
  ------------------
  |  |  216|  7.74k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (394:9): [True: 0, False: 3.87k]
  |  Branch (394:30): [True: 0, False: 3.87k]
  ------------------
  395|  3.87k|        stream_size != sizeof(z_stream)) {
  ------------------
  |  Branch (395:9): [True: 0, False: 3.87k]
  ------------------
  396|      0|        return Z_VERSION_ERROR;
  ------------------
  |  |  189|      0|#define Z_VERSION_ERROR (-6)
  ------------------
  397|      0|    }
  398|  3.87k|    if (strm == Z_NULL) return Z_STREAM_ERROR;
  ------------------
  |  |  216|  3.87k|#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 (398:9): [True: 0, False: 3.87k]
  ------------------
  399|       |
  400|  3.87k|    strm->msg = Z_NULL;
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  401|  3.87k|    if (strm->zalloc == (alloc_func)0) {
  ------------------
  |  Branch (401:9): [True: 3.87k, False: 0]
  ------------------
  402|       |#ifdef Z_SOLO
  403|       |        return Z_STREAM_ERROR;
  404|       |#else
  405|  3.87k|        strm->zalloc = zcalloc;
  406|  3.87k|        strm->opaque = (voidpf)0;
  407|  3.87k|#endif
  408|  3.87k|    }
  409|  3.87k|    if (strm->zfree == (free_func)0)
  ------------------
  |  Branch (409:9): [True: 3.87k, False: 0]
  ------------------
  410|       |#ifdef Z_SOLO
  411|       |        return Z_STREAM_ERROR;
  412|       |#else
  413|  3.87k|        strm->zfree = zcfree;
  414|  3.87k|#endif
  415|       |
  416|       |#ifdef FASTEST
  417|       |    if (level != 0) level = 1;
  418|       |#else
  419|  3.87k|    if (level == Z_DEFAULT_COMPRESSION) level = 6;
  ------------------
  |  |  197|  3.87k|#define Z_DEFAULT_COMPRESSION  (-1)
  ------------------
  |  Branch (419:9): [True: 1.17k, False: 2.70k]
  ------------------
  420|  3.87k|#endif
  421|       |
  422|  3.87k|    if (windowBits < 0) { /* suppress zlib wrapper */
  ------------------
  |  Branch (422:9): [True: 0, False: 3.87k]
  ------------------
  423|      0|        wrap = 0;
  424|      0|        if (windowBits < -15)
  ------------------
  |  Branch (424:13): [True: 0, False: 0]
  ------------------
  425|      0|            return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  426|      0|        windowBits = -windowBits;
  427|      0|    }
  428|  3.87k|#ifdef GZIP
  429|  3.87k|    else if (windowBits > 15) {
  ------------------
  |  Branch (429:14): [True: 0, False: 3.87k]
  ------------------
  430|      0|        wrap = 2;       /* write gzip wrapper instead */
  431|      0|        windowBits -= 16;
  432|      0|    }
  433|  3.87k|#endif
  434|  3.87k|    if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
  ------------------
  |  |  277|  7.74k|#    define MAX_MEM_LEVEL 9
  ------------------
                  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
  ------------------
  |  |  213|  7.74k|#define Z_DEFLATED   8
  ------------------
  |  Branch (434:9): [True: 0, False: 3.87k]
  |  Branch (434:25): [True: 0, False: 3.87k]
  |  Branch (434:53): [True: 0, False: 3.87k]
  ------------------
  435|  3.87k|        windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
  ------------------
  |  Branch (435:9): [True: 0, False: 3.87k]
  |  Branch (435:27): [True: 0, False: 3.87k]
  |  Branch (435:46): [True: 0, False: 3.87k]
  |  Branch (435:59): [True: 0, False: 3.87k]
  ------------------
  436|  3.87k|        strategy < 0 || strategy > Z_FIXED || (windowBits == 8 && wrap != 1)) {
  ------------------
  |  |  203|  7.74k|#define Z_FIXED               4
  ------------------
  |  Branch (436:9): [True: 0, False: 3.87k]
  |  Branch (436:25): [True: 0, False: 3.87k]
  |  Branch (436:48): [True: 700, False: 3.17k]
  |  Branch (436:67): [True: 0, False: 700]
  ------------------
  437|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  438|      0|    }
  439|  3.87k|    if (windowBits == 8) windowBits = 9;  /* until 256-byte window bug fixed */
  ------------------
  |  Branch (439:9): [True: 700, False: 3.17k]
  ------------------
  440|  3.87k|    s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
  ------------------
  |  |  253|  3.87k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  441|  3.87k|    if (s == Z_NULL) return Z_MEM_ERROR;
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (s == Z_NULL) return Z_MEM_ERROR;
  ------------------
  |  |  187|      0|#define Z_MEM_ERROR    (-4)
  ------------------
  |  Branch (441:9): [True: 0, False: 3.87k]
  ------------------
  442|  3.87k|    zmemzero(s, sizeof(deflate_state));
  ------------------
  |  |  218|  3.87k|#    define zmemzero(dest, len) memset(dest, 0, len)
  ------------------
  443|  3.87k|    strm->state = (struct internal_state FAR *)s;
  444|  3.87k|    s->strm = strm;
  445|  3.87k|    s->status = INIT_STATE;     /* to pass state test in deflateReset() */
  ------------------
  |  |   58|  3.87k|#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
  ------------------
  446|       |
  447|  3.87k|    s->wrap = wrap;
  448|  3.87k|    s->w_bits = (uInt)windowBits;
  449|  3.87k|    s->w_size = 1 << s->w_bits;
  450|  3.87k|    s->w_mask = s->w_size - 1;
  451|       |
  452|  3.87k|    s->hash_bits = (uInt)memLevel + 7;
  453|  3.87k|    s->hash_size = 1 << s->hash_bits;
  454|  3.87k|    s->hash_mask = s->hash_size - 1;
  455|  3.87k|    s->hash_shift =  ((s->hash_bits + MIN_MATCH-1) / MIN_MATCH);
  ------------------
  |  |   92|  3.87k|#define MIN_MATCH  3
  ------------------
                  s->hash_shift =  ((s->hash_bits + MIN_MATCH-1) / MIN_MATCH);
  ------------------
  |  |   92|  3.87k|#define MIN_MATCH  3
  ------------------
  456|       |
  457|  3.87k|    s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
  ------------------
  |  |  253|  3.87k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  458|  3.87k|    s->prev   = (Posf *)  ZALLOC(strm, s->w_size, sizeof(Pos));
  ------------------
  |  |  253|  3.87k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  459|  3.87k|    s->head   = (Posf *)  ZALLOC(strm, s->hash_size, sizeof(Pos));
  ------------------
  |  |  253|  3.87k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  460|       |
  461|  3.87k|    s->high_water = 0;      /* nothing written to s->window yet */
  462|       |
  463|  3.87k|    s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
  464|       |
  465|       |    /* We overlay pending_buf and sym_buf. This works since the average size
  466|       |     * for length/distance pairs over any compressed block is assured to be 31
  467|       |     * bits or less.
  468|       |     *
  469|       |     * Analysis: The longest fixed codes are a length code of 8 bits plus 5
  470|       |     * extra bits, for lengths 131 to 257. The longest fixed distance codes are
  471|       |     * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest
  472|       |     * possible fixed-codes length/distance pair is then 31 bits total.
  473|       |     *
  474|       |     * sym_buf starts one-fourth of the way into pending_buf. So there are
  475|       |     * three bytes in sym_buf for every four bytes in pending_buf. Each symbol
  476|       |     * in sym_buf is three bytes -- two for the distance and one for the
  477|       |     * literal/length. As each symbol is consumed, the pointer to the next
  478|       |     * sym_buf value to read moves forward three bytes. From that symbol, up to
  479|       |     * 31 bits are written to pending_buf. The closest the written pending_buf
  480|       |     * bits gets to the next sym_buf symbol to read is just before the last
  481|       |     * code is written. At that time, 31*(n - 2) bits have been written, just
  482|       |     * after 24*(n - 2) bits have been consumed from sym_buf. sym_buf starts at
  483|       |     * 8*n bits into pending_buf. (Note that the symbol buffer fills when n - 1
  484|       |     * symbols are written.) The closest the writing gets to what is unread is
  485|       |     * then n + 14 bits. Here n is lit_bufsize, which is 16384 by default, and
  486|       |     * can range from 128 to 32768.
  487|       |     *
  488|       |     * Therefore, at a minimum, there are 142 bits of space between what is
  489|       |     * written and what is read in the overlain buffers, so the symbols cannot
  490|       |     * be overwritten by the compressed data. That space is actually 139 bits,
  491|       |     * due to the three-bit fixed-code block header.
  492|       |     *
  493|       |     * That covers the case where either Z_FIXED is specified, forcing fixed
  494|       |     * codes, or when the use of fixed codes is chosen, because that choice
  495|       |     * results in a smaller compressed block than dynamic codes. That latter
  496|       |     * condition then assures that the above analysis also covers all dynamic
  497|       |     * blocks. A dynamic-code block will only be chosen to be emitted if it has
  498|       |     * fewer bits than a fixed-code block would for the same set of symbols.
  499|       |     * Therefore its average symbol length is assured to be less than 31. So
  500|       |     * the compressed data for a dynamic block also cannot overwrite the
  501|       |     * symbols from which it is being constructed.
  502|       |     */
  503|       |
  504|  3.87k|    s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, LIT_BUFS);
  ------------------
  |  |  253|  3.87k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  505|  3.87k|    s->pending_buf_size = (ulg)s->lit_bufsize * 4;
  506|       |
  507|  3.87k|    if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
  ------------------
  |  |  216|  7.74k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
  ------------------
  |  |  216|  7.74k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
  ------------------
  |  |  216|  7.74k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (507:9): [True: 0, False: 3.87k]
  |  Branch (507:32): [True: 0, False: 3.87k]
  |  Branch (507:53): [True: 0, False: 3.87k]
  ------------------
  508|  3.87k|        s->pending_buf == Z_NULL) {
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (508:9): [True: 0, False: 3.87k]
  ------------------
  509|      0|        s->status = FINISH_STATE;
  ------------------
  |  |   67|      0|#define FINISH_STATE 666    /* stream complete */
  ------------------
  510|      0|        strm->msg = ERR_MSG(Z_MEM_ERROR);
  ------------------
  |  |   65|      0|#define ERR_MSG(err) z_errmsg[(err) < -6 || (err) > 2 ? 9 : 2 - (err)]
  |  |  ------------------
  |  |  |  Branch (65:31): [Folded, False: 0]
  |  |  |  Branch (65:45): [Folded, False: 0]
  |  |  ------------------
  ------------------
  511|      0|        deflateEnd (strm);
  512|      0|        return Z_MEM_ERROR;
  ------------------
  |  |  187|      0|#define Z_MEM_ERROR    (-4)
  ------------------
  513|      0|    }
  514|       |#ifdef LIT_MEM
  515|       |    s->d_buf = (ushf *)(s->pending_buf + (s->lit_bufsize << 1));
  516|       |    s->l_buf = s->pending_buf + (s->lit_bufsize << 2);
  517|       |    s->sym_end = s->lit_bufsize - 1;
  518|       |#else
  519|  3.87k|    s->sym_buf = s->pending_buf + s->lit_bufsize;
  520|  3.87k|    s->sym_end = (s->lit_bufsize - 1) * 3;
  521|  3.87k|#endif
  522|       |    /* We avoid equality with lit_bufsize*3 because of wraparound at 64K
  523|       |     * on 16 bit machines and because stored blocks are restricted to
  524|       |     * 64K-1 bytes.
  525|       |     */
  526|       |
  527|  3.87k|    s->level = level;
  528|  3.87k|    s->strategy = strategy;
  529|  3.87k|    s->method = (Byte)method;
  530|       |
  531|  3.87k|    return deflateReset(strm);
  532|  3.87k|}
deflateSetDictionary:
  559|  3.87k|                                 uInt  dictLength) {
  560|  3.87k|    deflate_state *s;
  561|  3.87k|    uInt str, n;
  562|  3.87k|    int wrap;
  563|  3.87k|    unsigned avail;
  564|  3.87k|    z_const unsigned char *next;
  565|       |
  566|  3.87k|    if (deflateStateCheck(strm) || dictionary == Z_NULL)
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (566:9): [True: 0, False: 3.87k]
  |  Branch (566:36): [True: 0, False: 3.87k]
  ------------------
  567|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  568|  3.87k|    s = strm->state;
  569|  3.87k|    wrap = s->wrap;
  570|  3.87k|    if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead ||
  ------------------
  |  |   58|  3.87k|#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
  ------------------
  |  Branch (570:9): [True: 0, False: 3.87k]
  |  Branch (570:23): [True: 3.87k, False: 0]
  |  Branch (570:36): [True: 0, False: 3.87k]
  |  Branch (570:64): [True: 0, False: 3.87k]
  ------------------
  571|  3.87k|        (wrap == 0 && (long)s->strstart != s->block_start))
  ------------------
  |  Branch (571:10): [True: 0, False: 3.87k]
  |  Branch (571:23): [True: 0, False: 0]
  ------------------
  572|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  573|       |
  574|       |    /* when using zlib wrappers, compute Adler-32 for provided dictionary */
  575|  3.87k|    if (wrap == 1)
  ------------------
  |  Branch (575:9): [True: 3.87k, False: 0]
  ------------------
  576|  3.87k|        strm->adler = adler32(strm->adler, dictionary, dictLength);
  577|  3.87k|    s->wrap = 0;                    /* avoid computing Adler-32 in read_buf */
  578|       |
  579|       |    /* if dictionary would fill window, just replace the history */
  580|  3.87k|    if (dictLength >= s->w_size) {
  ------------------
  |  Branch (580:9): [True: 0, False: 3.87k]
  ------------------
  581|      0|        if (wrap == 0) {            /* already empty otherwise */
  ------------------
  |  Branch (581:13): [True: 0, False: 0]
  ------------------
  582|      0|            CLEAR_HASH(s);
  ------------------
  |  |  171|      0|    do { \
  |  |  172|      0|        s->head[s->hash_size - 1] = NIL; \
  |  |  ------------------
  |  |  |  |   85|      0|#define NIL 0
  |  |  ------------------
  |  |  173|      0|        zmemzero(s->head, (unsigned)(s->hash_size - 1)*sizeof(*s->head)); \
  |  |  ------------------
  |  |  |  |  218|      0|#    define zmemzero(dest, len) memset(dest, 0, len)
  |  |  ------------------
  |  |  174|      0|        s->slid = 0; \
  |  |  175|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (175:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  583|      0|            s->strstart = 0;
  584|      0|            s->block_start = 0L;
  585|      0|            s->insert = 0;
  586|      0|        }
  587|      0|        dictionary += dictLength - s->w_size;  /* use the tail */
  588|      0|        dictLength = s->w_size;
  589|      0|    }
  590|       |
  591|       |    /* insert dictionary into window and hash */
  592|  3.87k|    avail = strm->avail_in;
  593|  3.87k|    next = strm->next_in;
  594|  3.87k|    strm->avail_in = dictLength;
  595|  3.87k|    strm->next_in = (z_const Bytef *)dictionary;
  596|  3.87k|    fill_window(s);
  597|  7.32k|    while (s->lookahead >= MIN_MATCH) {
  ------------------
  |  |   92|  7.32k|#define MIN_MATCH  3
  ------------------
  |  Branch (597:12): [True: 3.45k, False: 3.87k]
  ------------------
  598|  3.45k|        str = s->strstart;
  599|  3.45k|        n = s->lookahead - (MIN_MATCH-1);
  ------------------
  |  |   92|  3.45k|#define MIN_MATCH  3
  ------------------
  600|   338k|        do {
  601|   338k|            UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]);
  ------------------
  |  |  141|   338k|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  ------------------
  602|   338k|#ifndef FASTEST
  603|   338k|            s->prev[str & s->w_mask] = s->head[s->ins_h];
  604|   338k|#endif
  605|   338k|            s->head[s->ins_h] = (Pos)str;
  606|   338k|            str++;
  607|   338k|        } while (--n);
  ------------------
  |  Branch (607:18): [True: 334k, False: 3.45k]
  ------------------
  608|  3.45k|        s->strstart = str;
  609|  3.45k|        s->lookahead = MIN_MATCH-1;
  ------------------
  |  |   92|  3.45k|#define MIN_MATCH  3
  ------------------
  610|  3.45k|        fill_window(s);
  611|  3.45k|    }
  612|  3.87k|    s->strstart += s->lookahead;
  613|  3.87k|    s->block_start = (long)s->strstart;
  614|  3.87k|    s->insert = s->lookahead;
  615|  3.87k|    s->lookahead = 0;
  616|  3.87k|    s->match_length = s->prev_length = MIN_MATCH-1;
  ------------------
  |  |   92|  3.87k|#define MIN_MATCH  3
  ------------------
  617|  3.87k|    s->match_available = 0;
  618|  3.87k|    strm->next_in = next;
  619|  3.87k|    strm->avail_in = avail;
  620|  3.87k|    s->wrap = wrap;
  621|  3.87k|    return Z_OK;
  ------------------
  |  |  181|  3.87k|#define Z_OK            0
  ------------------
  622|  3.87k|}
deflateResetKeep:
  644|  3.87k|int ZEXPORT deflateResetKeep(z_streamp strm) {
  645|  3.87k|    deflate_state *s;
  646|       |
  647|  3.87k|    if (deflateStateCheck(strm)) {
  ------------------
  |  Branch (647:9): [True: 0, False: 3.87k]
  ------------------
  648|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  649|      0|    }
  650|       |
  651|  3.87k|    strm->total_in = strm->total_out = 0;
  652|  3.87k|    strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  653|  3.87k|    strm->data_type = Z_UNKNOWN;
  ------------------
  |  |  210|  3.87k|#define Z_UNKNOWN  2
  ------------------
  654|       |
  655|  3.87k|    s = (deflate_state *)strm->state;
  656|  3.87k|    s->pending = 0;
  657|  3.87k|    s->pending_out = s->pending_buf;
  658|       |
  659|  3.87k|    if (s->wrap < 0) {
  ------------------
  |  Branch (659:9): [True: 0, False: 3.87k]
  ------------------
  660|      0|        s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
  661|      0|    }
  662|  3.87k|    s->status =
  663|  3.87k|#ifdef GZIP
  664|  3.87k|        s->wrap == 2 ? GZIP_STATE :
  ------------------
  |  |   60|      0|#  define GZIP_STATE  57    /* gzip header -> BUSY_STATE | EXTRA_STATE */
  ------------------
  |  Branch (664:9): [True: 0, False: 3.87k]
  ------------------
  665|  3.87k|#endif
  666|  3.87k|        INIT_STATE;
  ------------------
  |  |   58|  7.74k|#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
  ------------------
  667|  3.87k|    strm->adler =
  668|  3.87k|#ifdef GZIP
  669|  3.87k|        s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (669:9): [True: 0, False: 3.87k]
  ------------------
  670|  3.87k|#endif
  671|  3.87k|        adler32(0L, Z_NULL, 0);
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  672|  3.87k|    s->last_flush = -2;
  673|       |
  674|  3.87k|    s->gzhead = Z_NULL;
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  675|       |
  676|  3.87k|    {
  677|       |        /* Retain the hash work done for level 0. */
  678|  3.87k|        uInt matches = s->level == 0 ? s->matches : 0;
  ------------------
  |  Branch (678:24): [True: 0, False: 3.87k]
  ------------------
  679|  3.87k|        _tr_init(s);
  680|  3.87k|        s->matches = matches;
  681|  3.87k|    }
  682|       |
  683|       |    /* Keep the window and the hash, but drop what was left unfinished */
  684|  3.87k|    s->block_start = (long)s->strstart;
  685|  3.87k|    s->lookahead = 0;
  686|  3.87k|    s->match_length = s->prev_length = MIN_MATCH-1;
  ------------------
  |  |   92|  3.87k|#define MIN_MATCH  3
  ------------------
  687|  3.87k|    s->match_available = 0;
  688|       |
  689|  3.87k|    return Z_OK;
  ------------------
  |  |  181|  3.87k|#define Z_OK            0
  ------------------
  690|  3.87k|}
deflateReset:
  718|  3.87k|int ZEXPORT deflateReset(z_streamp strm) {
  719|  3.87k|    int ret;
  720|       |
  721|  3.87k|    ret = deflateResetKeep(strm);
  722|  3.87k|    if (ret == Z_OK)
  ------------------
  |  |  181|  3.87k|#define Z_OK            0
  ------------------
  |  Branch (722:9): [True: 3.87k, False: 0]
  ------------------
  723|  3.87k|        lm_init(strm->state);
  724|  3.87k|    return ret;
  725|  3.87k|}
deflateBound_z:
  875|  3.87k|z_size_t ZEXPORT deflateBound_z(z_streamp strm, z_size_t sourceLen) {
  876|  3.87k|    deflate_state *s;
  877|  3.87k|    z_size_t fixedlen, storelen, wraplen, bound;
  878|       |
  879|       |    /* upper bound for fixed blocks with 9-bit literals and length 255
  880|       |       (memLevel == 2, which is the lowest that may not use stored blocks) --
  881|       |       ~13% overhead plus a small constant */
  882|  3.87k|    fixedlen = sourceLen + (sourceLen >> 3) + (sourceLen >> 8) +
  883|  3.87k|               (sourceLen >> 9) + 4;
  884|  3.87k|    if (fixedlen < sourceLen)
  ------------------
  |  Branch (884:9): [True: 0, False: 3.87k]
  ------------------
  885|      0|        fixedlen = (z_size_t)-1;
  886|       |
  887|       |    /* upper bound for stored blocks with length 127 (memLevel == 1) --
  888|       |       ~4% overhead plus a small constant */
  889|  3.87k|    storelen = sourceLen + (sourceLen >> 5) + (sourceLen >> 7) +
  890|  3.87k|               (sourceLen >> 11) + 7;
  891|  3.87k|    if (storelen < sourceLen)
  ------------------
  |  Branch (891:9): [True: 0, False: 3.87k]
  ------------------
  892|      0|        storelen = (z_size_t)-1;
  893|       |
  894|       |    /* if can't get parameters, return larger bound plus a wrapper */
  895|  3.87k|    if (deflateStateCheck(strm)) {
  ------------------
  |  Branch (895:9): [True: 0, False: 3.87k]
  ------------------
  896|      0|        bound = fixedlen > storelen ? fixedlen : storelen;
  ------------------
  |  Branch (896:17): [True: 0, False: 0]
  ------------------
  897|      0|        return bound + 18 < bound ? (z_size_t)-1 : bound + 18;
  ------------------
  |  Branch (897:16): [True: 0, False: 0]
  ------------------
  898|      0|    }
  899|       |
  900|       |    /* compute wrapper length */
  901|  3.87k|    s = strm->state;
  902|  3.87k|    switch (s->wrap < 0 ? -s->wrap : s->wrap) {
  ------------------
  |  Branch (902:13): [True: 0, False: 3.87k]
  ------------------
  903|      0|    case 0:                                 /* raw deflate */
  ------------------
  |  Branch (903:5): [True: 0, False: 3.87k]
  ------------------
  904|      0|        wraplen = 0;
  905|      0|        break;
  906|  3.87k|    case 1:                                 /* zlib wrapper */
  ------------------
  |  Branch (906:5): [True: 3.87k, False: 0]
  ------------------
  907|  3.87k|        wraplen = 6 + (s->strstart ? 4 : 0);
  ------------------
  |  Branch (907:24): [True: 3.62k, False: 247]
  ------------------
  908|  3.87k|        break;
  909|      0|#ifdef GZIP
  910|      0|    case 2:                                 /* gzip wrapper */
  ------------------
  |  Branch (910:5): [True: 0, False: 3.87k]
  ------------------
  911|      0|        wraplen = 18;
  912|      0|        if (s->gzhead != Z_NULL) {          /* user-supplied gzip header */
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (912:13): [True: 0, False: 0]
  ------------------
  913|      0|            Bytef *str;
  914|      0|            if (s->gzhead->extra != Z_NULL)
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (914:17): [True: 0, False: 0]
  ------------------
  915|      0|                wraplen += 2 + s->gzhead->extra_len;
  916|      0|            str = s->gzhead->name;
  917|      0|            if (str != Z_NULL)
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (917:17): [True: 0, False: 0]
  ------------------
  918|      0|                do {
  919|      0|                    wraplen++;
  920|      0|                } while (*str++);
  ------------------
  |  Branch (920:26): [True: 0, False: 0]
  ------------------
  921|      0|            str = s->gzhead->comment;
  922|      0|            if (str != Z_NULL)
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (922:17): [True: 0, False: 0]
  ------------------
  923|      0|                do {
  924|      0|                    wraplen++;
  925|      0|                } while (*str++);
  ------------------
  |  Branch (925:26): [True: 0, False: 0]
  ------------------
  926|      0|            if (s->gzhead->hcrc)
  ------------------
  |  Branch (926:17): [True: 0, False: 0]
  ------------------
  927|      0|                wraplen += 2;
  928|      0|        }
  929|      0|        break;
  930|      0|#endif
  931|      0|    default:                                /* for compiler happiness */
  ------------------
  |  Branch (931:5): [True: 0, False: 3.87k]
  ------------------
  932|      0|        wraplen = 18;
  933|  3.87k|    }
  934|       |
  935|       |    /* if not default parameters, return one of the conservative bounds */
  936|  3.87k|    if (s->w_bits != 15 || s->hash_bits != 8 + 7) {
  ------------------
  |  Branch (936:9): [True: 3.32k, False: 543]
  |  Branch (936:28): [True: 488, False: 55]
  ------------------
  937|  3.81k|        bound = s->w_bits <= s->hash_bits && s->level ? fixedlen :
  ------------------
  |  Branch (937:17): [True: 1.89k, False: 1.92k]
  |  Branch (937:46): [True: 1.89k, False: 0]
  ------------------
  938|  3.81k|                                                        storelen;
  939|  3.81k|        return bound + wraplen < bound ? (z_size_t)-1 : bound + wraplen;
  ------------------
  |  Branch (939:16): [True: 0, False: 3.81k]
  ------------------
  940|  3.81k|    }
  941|       |
  942|       |    /* default settings: return tight bound for that case -- ~0.03% overhead
  943|       |       plus a small constant */
  944|     55|    bound = sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
  945|     55|            (sourceLen >> 25) + 13 - 6 + wraplen;
  946|     55|    return bound < sourceLen ? (z_size_t)-1 : bound;
  ------------------
  |  Branch (946:12): [True: 0, False: 55]
  ------------------
  947|  3.87k|}
deflateBound:
  948|  3.87k|uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen) {
  949|  3.87k|    z_size_t bound = deflateBound_z(strm, sourceLen);
  950|  3.87k|    return (uLong)bound != bound ? (uLong)-1 : (uLong)bound;
  ------------------
  |  Branch (950:12): [True: 0, False: 3.87k]
  ------------------
  951|  3.87k|}
deflate:
 1000|  3.87k|int ZEXPORT deflate(z_streamp strm, int flush) {
 1001|  3.87k|    int old_flush; /* value of flush param for previous deflate call */
 1002|  3.87k|    deflate_state *s;
 1003|       |
 1004|  3.87k|    if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) {
  ------------------
  |  |  177|  7.74k|#define Z_BLOCK         5
  ------------------
  |  Branch (1004:9): [True: 0, False: 3.87k]
  |  Branch (1004:36): [True: 0, False: 3.87k]
  |  Branch (1004:55): [True: 0, False: 3.87k]
  ------------------
 1005|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
 1006|      0|    }
 1007|  3.87k|    s = strm->state;
 1008|       |
 1009|  3.87k|    if (strm->next_out == Z_NULL ||
  ------------------
  |  |  216|  7.74k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1009:9): [True: 0, False: 3.87k]
  ------------------
 1010|  3.87k|        (strm->avail_in != 0 && strm->next_in == Z_NULL) ||
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1010:10): [True: 3.87k, False: 0]
  |  Branch (1010:33): [True: 0, False: 3.87k]
  ------------------
 1011|  3.87k|        (s->status == FINISH_STATE && flush != Z_FINISH)) {
  ------------------
  |  |   67|  7.74k|#define FINISH_STATE 666    /* stream complete */
  ------------------
                      (s->status == FINISH_STATE && flush != Z_FINISH)) {
  ------------------
  |  |  176|      0|#define Z_FINISH        4
  ------------------
  |  Branch (1011:10): [True: 0, False: 3.87k]
  |  Branch (1011:39): [True: 0, False: 0]
  ------------------
 1012|      0|        ERR_RETURN(strm, Z_STREAM_ERROR);
  ------------------
  |  |   68|      0|  return (strm->msg = ERR_MSG(err), (err))
  |  |  ------------------
  |  |  |  |   65|      0|#define ERR_MSG(err) z_errmsg[(err) < -6 || (err) > 2 ? 9 : 2 - (err)]
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (65:31): [Folded, False: 0]
  |  |  |  |  |  Branch (65:45): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1013|      0|    }
 1014|  3.87k|    if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
  ------------------
  |  |   68|      0|  return (strm->msg = ERR_MSG(err), (err))
  |  |  ------------------
  |  |  |  |   65|      0|#define ERR_MSG(err) z_errmsg[(err) < -6 || (err) > 2 ? 9 : 2 - (err)]
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (65:31): [Folded, False: 0]
  |  |  |  |  |  Branch (65:45): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1014:9): [True: 0, False: 3.87k]
  ------------------
 1015|       |
 1016|  3.87k|    old_flush = s->last_flush;
 1017|  3.87k|    s->last_flush = flush;
 1018|       |
 1019|       |    /* Flush as much pending output as possible */
 1020|  3.87k|    if (s->pending != 0) {
  ------------------
  |  Branch (1020:9): [True: 0, False: 3.87k]
  ------------------
 1021|      0|        flush_pending(strm);
 1022|      0|        if (strm->avail_out == 0) {
  ------------------
  |  Branch (1022:13): [True: 0, False: 0]
  ------------------
 1023|       |            /* Since avail_out is 0, deflate will be called again with
 1024|       |             * more output space, but possibly with both pending and
 1025|       |             * avail_in equal to zero. There won't be anything to do,
 1026|       |             * but this is not an error situation so make sure we
 1027|       |             * return OK instead of BUF_ERROR at next call of deflate:
 1028|       |             */
 1029|      0|            s->last_flush = -1;
 1030|      0|            return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1031|      0|        }
 1032|       |
 1033|       |    /* Make sure there is something to do and avoid duplicate consecutive
 1034|       |     * flushes. For repeated and useless calls with Z_FINISH, we keep
 1035|       |     * returning Z_STREAM_END instead of Z_BUF_ERROR.
 1036|       |     */
 1037|  3.87k|    } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) &&
  ------------------
  |  |  133|      0|#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0))
  |  |  ------------------
  |  |  |  Branch (133:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) &&
  ------------------
  |  |  133|  3.87k|#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0))
  |  |  ------------------
  |  |  |  Branch (133:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1037:16): [True: 0, False: 3.87k]
  |  Branch (1037:39): [True: 0, False: 0]
  ------------------
 1038|      0|               flush != Z_FINISH) {
  ------------------
  |  |  176|      0|#define Z_FINISH        4
  ------------------
  |  Branch (1038:16): [True: 0, False: 0]
  ------------------
 1039|      0|        ERR_RETURN(strm, Z_BUF_ERROR);
  ------------------
  |  |   68|      0|  return (strm->msg = ERR_MSG(err), (err))
  |  |  ------------------
  |  |  |  |   65|      0|#define ERR_MSG(err) z_errmsg[(err) < -6 || (err) > 2 ? 9 : 2 - (err)]
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (65:31): [Folded, False: 0]
  |  |  |  |  |  Branch (65:45): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|      0|    }
 1041|       |
 1042|       |    /* User must not provide more input after the first FINISH: */
 1043|  3.87k|    if (s->status == FINISH_STATE && strm->avail_in != 0) {
  ------------------
  |  |   67|  7.74k|#define FINISH_STATE 666    /* stream complete */
  ------------------
  |  Branch (1043:9): [True: 0, False: 3.87k]
  |  Branch (1043:38): [True: 0, False: 0]
  ------------------
 1044|      0|        ERR_RETURN(strm, Z_BUF_ERROR);
  ------------------
  |  |   68|      0|  return (strm->msg = ERR_MSG(err), (err))
  |  |  ------------------
  |  |  |  |   65|      0|#define ERR_MSG(err) z_errmsg[(err) < -6 || (err) > 2 ? 9 : 2 - (err)]
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (65:31): [Folded, False: 0]
  |  |  |  |  |  Branch (65:45): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1045|      0|    }
 1046|       |
 1047|       |    /* Write the header */
 1048|  3.87k|    if (s->status == INIT_STATE && s->wrap == 0)
  ------------------
  |  |   58|  7.74k|#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
  ------------------
  |  Branch (1048:9): [True: 3.87k, False: 0]
  |  Branch (1048:36): [True: 0, False: 3.87k]
  ------------------
 1049|      0|        s->status = BUSY_STATE;
  ------------------
  |  |   66|      0|#define BUSY_STATE   113    /* deflate -> FINISH_STATE */
  ------------------
 1050|  3.87k|    if (s->status == INIT_STATE) {
  ------------------
  |  |   58|  3.87k|#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
  ------------------
  |  Branch (1050:9): [True: 3.87k, False: 0]
  ------------------
 1051|       |        /* zlib header */
 1052|  3.87k|        uInt header = (Z_DEFLATED + ((s->w_bits - 8) << 4)) << 8;
  ------------------
  |  |  213|  3.87k|#define Z_DEFLATED   8
  ------------------
 1053|  3.87k|        uInt level_flags;
 1054|       |
 1055|  3.87k|        if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
  ------------------
  |  |  201|  7.74k|#define Z_HUFFMAN_ONLY        2
  ------------------
  |  Branch (1055:13): [True: 2.42k, False: 1.44k]
  |  Branch (1055:46): [True: 0, False: 1.44k]
  ------------------
 1056|  2.42k|            level_flags = 0;
 1057|  1.44k|        else if (s->level < 6)
  ------------------
  |  Branch (1057:18): [True: 773, False: 675]
  ------------------
 1058|    773|            level_flags = 1;
 1059|    675|        else if (s->level == 6)
  ------------------
  |  Branch (1059:18): [True: 540, False: 135]
  ------------------
 1060|    540|            level_flags = 2;
 1061|    135|        else
 1062|    135|            level_flags = 3;
 1063|  3.87k|        header |= (level_flags << 6);
 1064|  3.87k|        if (s->strstart != 0) header |= PRESET_DICT;
  ------------------
  |  |   96|  3.62k|#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
  ------------------
  |  Branch (1064:13): [True: 3.62k, False: 247]
  ------------------
 1065|  3.87k|        header += 31 - (header % 31);
 1066|       |
 1067|  3.87k|        putShortMSB(s, header);
 1068|       |
 1069|       |        /* Save the adler32 of the preset dictionary: */
 1070|  3.87k|        if (s->strstart != 0) {
  ------------------
  |  Branch (1070:13): [True: 3.62k, False: 247]
  ------------------
 1071|  3.62k|            putShortMSB(s, (uInt)(strm->adler >> 16));
 1072|  3.62k|            putShortMSB(s, (uInt)(strm->adler & 0xffff));
 1073|  3.62k|        }
 1074|  3.87k|        strm->adler = adler32(0L, Z_NULL, 0);
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
 1075|  3.87k|        s->status = BUSY_STATE;
  ------------------
  |  |   66|  3.87k|#define BUSY_STATE   113    /* deflate -> FINISH_STATE */
  ------------------
 1076|       |
 1077|       |        /* Compression must start with an empty pending buffer */
 1078|  3.87k|        flush_pending(strm);
 1079|  3.87k|        if (s->pending != 0) {
  ------------------
  |  Branch (1079:13): [True: 0, False: 3.87k]
  ------------------
 1080|      0|            s->last_flush = -1;
 1081|      0|            return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1082|      0|        }
 1083|  3.87k|    }
 1084|  3.87k|#ifdef GZIP
 1085|  3.87k|    if (s->status == GZIP_STATE) {
  ------------------
  |  |   60|  3.87k|#  define GZIP_STATE  57    /* gzip header -> BUSY_STATE | EXTRA_STATE */
  ------------------
  |  Branch (1085:9): [True: 0, False: 3.87k]
  ------------------
 1086|       |        /* gzip header */
 1087|      0|        strm->adler = crc32(0L, Z_NULL, 0);
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
 1088|      0|        put_byte(s, 31);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1089|      0|        put_byte(s, 139);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1090|      0|        put_byte(s, 8);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1091|      0|        if (s->gzhead == Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1091:13): [True: 0, False: 0]
  ------------------
 1092|      0|            put_byte(s, 0);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1093|      0|            put_byte(s, 0);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1094|      0|            put_byte(s, 0);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1095|      0|            put_byte(s, 0);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1096|      0|            put_byte(s, 0);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1097|      0|            put_byte(s, s->level == 9 ? 2 :
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  |  Branch (293:64): [True: 0, False: 0]
  |  |  |  Branch (293:64): [True: 0, False: 0]
  |  |  |  Branch (293:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1098|      0|                     (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
 1099|      0|                      4 : 0));
 1100|      0|            put_byte(s, OS_CODE);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1101|      0|            s->status = BUSY_STATE;
  ------------------
  |  |   66|      0|#define BUSY_STATE   113    /* deflate -> FINISH_STATE */
  ------------------
 1102|       |
 1103|       |            /* Compression must start with an empty pending buffer */
 1104|      0|            flush_pending(strm);
 1105|      0|            if (s->pending != 0) {
  ------------------
  |  Branch (1105:17): [True: 0, False: 0]
  ------------------
 1106|      0|                s->last_flush = -1;
 1107|      0|                return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1108|      0|            }
 1109|      0|        }
 1110|      0|        else {
 1111|      0|            put_byte(s, (s->gzhead->text ? 1 : 0) +
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  |  Branch (293:64): [True: 0, False: 0]
  |  |  |  Branch (293:64): [True: 0, False: 0]
  |  |  |  Branch (293:64): [True: 0, False: 0]
  |  |  |  Branch (293:64): [True: 0, False: 0]
  |  |  |  Branch (293:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1112|      0|                     (s->gzhead->hcrc ? 2 : 0) +
 1113|      0|                     (s->gzhead->extra == Z_NULL ? 0 : 4) +
 1114|      0|                     (s->gzhead->name == Z_NULL ? 0 : 8) +
 1115|      0|                     (s->gzhead->comment == Z_NULL ? 0 : 16)
 1116|      0|                     );
 1117|      0|            put_byte(s, (Byte)(s->gzhead->time & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1118|      0|            put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1119|      0|            put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1120|      0|            put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1121|      0|            put_byte(s, s->level == 9 ? 2 :
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  |  Branch (293:64): [True: 0, False: 0]
  |  |  |  Branch (293:64): [True: 0, False: 0]
  |  |  |  Branch (293:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1122|      0|                     (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
 1123|      0|                      4 : 0));
 1124|      0|            put_byte(s, s->gzhead->os & 0xff);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1125|      0|            if (s->gzhead->extra != Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1125:17): [True: 0, False: 0]
  ------------------
 1126|      0|                put_byte(s, s->gzhead->extra_len & 0xff);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1127|      0|                put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1128|      0|            }
 1129|      0|            if (s->gzhead->hcrc)
  ------------------
  |  Branch (1129:17): [True: 0, False: 0]
  ------------------
 1130|      0|                strm->adler = crc32_z(strm->adler, s->pending_buf,
 1131|      0|                                      s->pending);
 1132|      0|            s->gzindex = 0;
 1133|      0|            s->status = EXTRA_STATE;
  ------------------
  |  |   62|      0|#define EXTRA_STATE   69    /* gzip extra block -> NAME_STATE */
  ------------------
 1134|      0|        }
 1135|      0|    }
 1136|  3.87k|    if (s->status == EXTRA_STATE) {
  ------------------
  |  |   62|  3.87k|#define EXTRA_STATE   69    /* gzip extra block -> NAME_STATE */
  ------------------
  |  Branch (1136:9): [True: 0, False: 3.87k]
  ------------------
 1137|      0|        if (s->gzhead->extra != Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1137:13): [True: 0, False: 0]
  ------------------
 1138|      0|            ulg beg = s->pending;   /* start of bytes to update crc */
 1139|      0|            ulg left = (s->gzhead->extra_len & 0xffff) - s->gzindex;
 1140|      0|            while (s->pending + left > s->pending_buf_size) {
  ------------------
  |  Branch (1140:20): [True: 0, False: 0]
  ------------------
 1141|      0|                ulg copy = s->pending_buf_size - s->pending;
 1142|      0|                zmemcpy(s->pending_buf + s->pending,
  ------------------
  |  |  216|      0|#    define zmemcpy memcpy
  ------------------
 1143|      0|                        s->gzhead->extra + s->gzindex, copy);
 1144|      0|                s->pending = s->pending_buf_size;
 1145|      0|                HCRC_UPDATE(beg);
  ------------------
  |  |  993|      0|    do { \
  |  |  994|      0|        if (s->gzhead->hcrc && s->pending > (beg)) \
  |  |  ------------------
  |  |  |  Branch (994:13): [True: 0, False: 0]
  |  |  |  Branch (994:32): [True: 0, False: 0]
  |  |  ------------------
  |  |  995|      0|            strm->adler = crc32_z(strm->adler, s->pending_buf + (beg), \
  |  |  996|      0|                                  s->pending - (beg)); \
  |  |  997|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (997:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1146|      0|                s->gzindex += copy;
 1147|      0|                flush_pending(strm);
 1148|      0|                if (s->pending != 0) {
  ------------------
  |  Branch (1148:21): [True: 0, False: 0]
  ------------------
 1149|      0|                    s->last_flush = -1;
 1150|      0|                    return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1151|      0|                }
 1152|      0|                beg = 0;
 1153|      0|                left -= copy;
 1154|      0|            }
 1155|      0|            zmemcpy(s->pending_buf + s->pending,
  ------------------
  |  |  216|      0|#    define zmemcpy memcpy
  ------------------
 1156|      0|                    s->gzhead->extra + s->gzindex, left);
 1157|      0|            s->pending += left;
 1158|      0|            HCRC_UPDATE(beg);
  ------------------
  |  |  993|      0|    do { \
  |  |  994|      0|        if (s->gzhead->hcrc && s->pending > (beg)) \
  |  |  ------------------
  |  |  |  Branch (994:13): [True: 0, False: 0]
  |  |  |  Branch (994:32): [True: 0, False: 0]
  |  |  ------------------
  |  |  995|      0|            strm->adler = crc32_z(strm->adler, s->pending_buf + (beg), \
  |  |  996|      0|                                  s->pending - (beg)); \
  |  |  997|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (997:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1159|      0|            s->gzindex = 0;
 1160|      0|        }
 1161|      0|        s->status = NAME_STATE;
  ------------------
  |  |   63|      0|#define NAME_STATE    73    /* gzip file name -> COMMENT_STATE */
  ------------------
 1162|      0|    }
 1163|  3.87k|    if (s->status == NAME_STATE) {
  ------------------
  |  |   63|  3.87k|#define NAME_STATE    73    /* gzip file name -> COMMENT_STATE */
  ------------------
  |  Branch (1163:9): [True: 0, False: 3.87k]
  ------------------
 1164|      0|        if (s->gzhead->name != Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1164:13): [True: 0, False: 0]
  ------------------
 1165|      0|            ulg beg = s->pending;   /* start of bytes to update crc */
 1166|      0|            int val;
 1167|      0|            do {
 1168|      0|                if (s->pending == s->pending_buf_size) {
  ------------------
  |  Branch (1168:21): [True: 0, False: 0]
  ------------------
 1169|      0|                    HCRC_UPDATE(beg);
  ------------------
  |  |  993|      0|    do { \
  |  |  994|      0|        if (s->gzhead->hcrc && s->pending > (beg)) \
  |  |  ------------------
  |  |  |  Branch (994:13): [True: 0, False: 0]
  |  |  |  Branch (994:32): [True: 0, False: 0]
  |  |  ------------------
  |  |  995|      0|            strm->adler = crc32_z(strm->adler, s->pending_buf + (beg), \
  |  |  996|      0|                                  s->pending - (beg)); \
  |  |  997|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (997:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1170|      0|                    flush_pending(strm);
 1171|      0|                    if (s->pending != 0) {
  ------------------
  |  Branch (1171:25): [True: 0, False: 0]
  ------------------
 1172|      0|                        s->last_flush = -1;
 1173|      0|                        return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1174|      0|                    }
 1175|      0|                    beg = 0;
 1176|      0|                }
 1177|      0|                val = s->gzhead->name[s->gzindex++];
 1178|      0|                put_byte(s, val);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1179|      0|            } while (val != 0);
  ------------------
  |  Branch (1179:22): [True: 0, False: 0]
  ------------------
 1180|      0|            HCRC_UPDATE(beg);
  ------------------
  |  |  993|      0|    do { \
  |  |  994|      0|        if (s->gzhead->hcrc && s->pending > (beg)) \
  |  |  ------------------
  |  |  |  Branch (994:13): [True: 0, False: 0]
  |  |  |  Branch (994:32): [True: 0, False: 0]
  |  |  ------------------
  |  |  995|      0|            strm->adler = crc32_z(strm->adler, s->pending_buf + (beg), \
  |  |  996|      0|                                  s->pending - (beg)); \
  |  |  997|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (997:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1181|      0|            s->gzindex = 0;
 1182|      0|        }
 1183|      0|        s->status = COMMENT_STATE;
  ------------------
  |  |   64|      0|#define COMMENT_STATE 91    /* gzip comment -> HCRC_STATE */
  ------------------
 1184|      0|    }
 1185|  3.87k|    if (s->status == COMMENT_STATE) {
  ------------------
  |  |   64|  3.87k|#define COMMENT_STATE 91    /* gzip comment -> HCRC_STATE */
  ------------------
  |  Branch (1185:9): [True: 0, False: 3.87k]
  ------------------
 1186|      0|        if (s->gzhead->comment != Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1186:13): [True: 0, False: 0]
  ------------------
 1187|      0|            ulg beg = s->pending;   /* start of bytes to update crc */
 1188|      0|            int val;
 1189|      0|            do {
 1190|      0|                if (s->pending == s->pending_buf_size) {
  ------------------
  |  Branch (1190:21): [True: 0, False: 0]
  ------------------
 1191|      0|                    HCRC_UPDATE(beg);
  ------------------
  |  |  993|      0|    do { \
  |  |  994|      0|        if (s->gzhead->hcrc && s->pending > (beg)) \
  |  |  ------------------
  |  |  |  Branch (994:13): [True: 0, False: 0]
  |  |  |  Branch (994:32): [True: 0, False: 0]
  |  |  ------------------
  |  |  995|      0|            strm->adler = crc32_z(strm->adler, s->pending_buf + (beg), \
  |  |  996|      0|                                  s->pending - (beg)); \
  |  |  997|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (997:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1192|      0|                    flush_pending(strm);
 1193|      0|                    if (s->pending != 0) {
  ------------------
  |  Branch (1193:25): [True: 0, False: 0]
  ------------------
 1194|      0|                        s->last_flush = -1;
 1195|      0|                        return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1196|      0|                    }
 1197|      0|                    beg = 0;
 1198|      0|                }
 1199|      0|                val = s->gzhead->comment[s->gzindex++];
 1200|      0|                put_byte(s, val);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1201|      0|            } while (val != 0);
  ------------------
  |  Branch (1201:22): [True: 0, False: 0]
  ------------------
 1202|      0|            HCRC_UPDATE(beg);
  ------------------
  |  |  993|      0|    do { \
  |  |  994|      0|        if (s->gzhead->hcrc && s->pending > (beg)) \
  |  |  ------------------
  |  |  |  Branch (994:13): [True: 0, False: 0]
  |  |  |  Branch (994:32): [True: 0, False: 0]
  |  |  ------------------
  |  |  995|      0|            strm->adler = crc32_z(strm->adler, s->pending_buf + (beg), \
  |  |  996|      0|                                  s->pending - (beg)); \
  |  |  997|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (997:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1203|      0|        }
 1204|      0|        s->status = HCRC_STATE;
  ------------------
  |  |   65|      0|#define HCRC_STATE   103    /* gzip header CRC -> BUSY_STATE */
  ------------------
 1205|      0|    }
 1206|  3.87k|    if (s->status == HCRC_STATE) {
  ------------------
  |  |   65|  3.87k|#define HCRC_STATE   103    /* gzip header CRC -> BUSY_STATE */
  ------------------
  |  Branch (1206:9): [True: 0, False: 3.87k]
  ------------------
 1207|      0|        if (s->gzhead->hcrc) {
  ------------------
  |  Branch (1207:13): [True: 0, False: 0]
  ------------------
 1208|      0|            if (s->pending + 2 > s->pending_buf_size) {
  ------------------
  |  Branch (1208:17): [True: 0, False: 0]
  ------------------
 1209|      0|                flush_pending(strm);
 1210|      0|                if (s->pending != 0) {
  ------------------
  |  Branch (1210:21): [True: 0, False: 0]
  ------------------
 1211|      0|                    s->last_flush = -1;
 1212|      0|                    return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1213|      0|                }
 1214|      0|            }
 1215|      0|            put_byte(s, (Byte)(strm->adler & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1216|      0|            put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1217|      0|            strm->adler = crc32(0L, Z_NULL, 0);
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
 1218|      0|        }
 1219|      0|        s->status = BUSY_STATE;
  ------------------
  |  |   66|      0|#define BUSY_STATE   113    /* deflate -> FINISH_STATE */
  ------------------
 1220|       |
 1221|       |        /* Compression must start with an empty pending buffer */
 1222|      0|        flush_pending(strm);
 1223|      0|        if (s->pending != 0) {
  ------------------
  |  Branch (1223:13): [True: 0, False: 0]
  ------------------
 1224|      0|            s->last_flush = -1;
 1225|      0|            return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1226|      0|        }
 1227|      0|    }
 1228|  3.87k|#endif
 1229|       |
 1230|       |    /* Start a new block or continue the current one.
 1231|       |     */
 1232|  3.87k|    if (strm->avail_in != 0 || s->lookahead != 0 ||
  ------------------
  |  Branch (1232:9): [True: 3.87k, False: 0]
  |  Branch (1232:32): [True: 0, False: 0]
  ------------------
 1233|  3.87k|        (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
  ------------------
  |  |  172|      0|#define Z_NO_FLUSH      0
  ------------------
                      (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
  ------------------
  |  |   67|      0|#define FINISH_STATE 666    /* stream complete */
  ------------------
  |  Branch (1233:10): [True: 0, False: 0]
  |  Branch (1233:33): [True: 0, False: 0]
  ------------------
 1234|  3.87k|        block_state bstate;
 1235|       |
 1236|  3.87k|        bstate = s->level == 0 ? deflate_stored(s, flush) :
  ------------------
  |  Branch (1236:18): [True: 0, False: 3.87k]
  ------------------
 1237|  3.87k|                 s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :
  ------------------
  |  |  201|  3.87k|#define Z_HUFFMAN_ONLY        2
  ------------------
  |  Branch (1237:18): [True: 1.00k, False: 2.87k]
  ------------------
 1238|  3.87k|                 s->strategy == Z_RLE ? deflate_rle(s, flush) :
  ------------------
  |  |  202|  2.87k|#define Z_RLE                 3
  ------------------
  |  Branch (1238:18): [True: 841, False: 2.02k]
  ------------------
 1239|  2.87k|                 (*(configuration_table[s->level].func))(s, flush);
 1240|       |
 1241|  3.87k|        if (bstate == finish_started || bstate == finish_done) {
  ------------------
  |  Branch (1241:13): [True: 0, False: 3.87k]
  |  Branch (1241:41): [True: 3.87k, False: 0]
  ------------------
 1242|  3.87k|            s->status = FINISH_STATE;
  ------------------
  |  |   67|  3.87k|#define FINISH_STATE 666    /* stream complete */
  ------------------
 1243|  3.87k|        }
 1244|  3.87k|        if (bstate == need_more || bstate == finish_started) {
  ------------------
  |  Branch (1244:13): [True: 0, False: 3.87k]
  |  Branch (1244:36): [True: 0, False: 3.87k]
  ------------------
 1245|      0|            if (strm->avail_out == 0) {
  ------------------
  |  Branch (1245:17): [True: 0, False: 0]
  ------------------
 1246|      0|                s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
 1247|      0|            }
 1248|      0|            return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1249|       |            /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
 1250|       |             * of deflate should use the same flush parameter to make sure
 1251|       |             * that the flush is complete. So we don't have to output an
 1252|       |             * empty block here, this will be done at next call. This also
 1253|       |             * ensures that for a very small output buffer, we emit at most
 1254|       |             * one empty block.
 1255|       |             */
 1256|      0|        }
 1257|  3.87k|        if (bstate == block_done) {
  ------------------
  |  Branch (1257:13): [True: 0, False: 3.87k]
  ------------------
 1258|      0|            if (flush == Z_PARTIAL_FLUSH) {
  ------------------
  |  |  173|      0|#define Z_PARTIAL_FLUSH 1
  ------------------
  |  Branch (1258:17): [True: 0, False: 0]
  ------------------
 1259|      0|                _tr_align(s);
 1260|      0|            } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */
  ------------------
  |  |  177|      0|#define Z_BLOCK         5
  ------------------
  |  Branch (1260:24): [True: 0, False: 0]
  ------------------
 1261|      0|                _tr_stored_block(s, (char*)0, 0L, 0);
 1262|       |                /* For a full flush, this empty block will be recognized
 1263|       |                 * as a special marker by inflate_sync().
 1264|       |                 */
 1265|      0|                if (flush == Z_FULL_FLUSH) {
  ------------------
  |  |  175|      0|#define Z_FULL_FLUSH    3
  ------------------
  |  Branch (1265:21): [True: 0, False: 0]
  ------------------
 1266|      0|                    CLEAR_HASH(s);             /* forget history */
  ------------------
  |  |  171|      0|    do { \
  |  |  172|      0|        s->head[s->hash_size - 1] = NIL; \
  |  |  ------------------
  |  |  |  |   85|      0|#define NIL 0
  |  |  ------------------
  |  |  173|      0|        zmemzero(s->head, (unsigned)(s->hash_size - 1)*sizeof(*s->head)); \
  |  |  ------------------
  |  |  |  |  218|      0|#    define zmemzero(dest, len) memset(dest, 0, len)
  |  |  ------------------
  |  |  174|      0|        s->slid = 0; \
  |  |  175|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (175:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1267|      0|                    if (s->lookahead == 0) {
  ------------------
  |  Branch (1267:25): [True: 0, False: 0]
  ------------------
 1268|      0|                        s->strstart = 0;
 1269|      0|                        s->block_start = 0L;
 1270|      0|                        s->insert = 0;
 1271|      0|                    }
 1272|      0|                }
 1273|      0|            }
 1274|      0|            flush_pending(strm);
 1275|      0|            if (strm->avail_out == 0) {
  ------------------
  |  Branch (1275:17): [True: 0, False: 0]
  ------------------
 1276|      0|              s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
 1277|      0|              return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1278|      0|            }
 1279|      0|        }
 1280|  3.87k|    }
 1281|       |
 1282|  3.87k|    if (flush != Z_FINISH) return Z_OK;
  ------------------
  |  |  176|  3.87k|#define Z_FINISH        4
  ------------------
                  if (flush != Z_FINISH) return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
  |  Branch (1282:9): [True: 0, False: 3.87k]
  ------------------
 1283|  3.87k|    if (s->wrap <= 0) return Z_STREAM_END;
  ------------------
  |  |  182|      0|#define Z_STREAM_END    1
  ------------------
  |  Branch (1283:9): [True: 0, False: 3.87k]
  ------------------
 1284|       |
 1285|       |    /* Write the trailer */
 1286|  3.87k|#ifdef GZIP
 1287|  3.87k|    if (s->wrap == 2) {
  ------------------
  |  Branch (1287:9): [True: 0, False: 3.87k]
  ------------------
 1288|      0|        put_byte(s, (Byte)(strm->adler & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1289|      0|        put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1290|      0|        put_byte(s, (Byte)((strm->adler >> 16) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1291|      0|        put_byte(s, (Byte)((strm->adler >> 24) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1292|      0|        put_byte(s, (Byte)(strm->total_in & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1293|      0|        put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1294|      0|        put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1295|      0|        put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1296|      0|    }
 1297|  3.87k|    else
 1298|  3.87k|#endif
 1299|  3.87k|    {
 1300|  3.87k|        putShortMSB(s, (uInt)(strm->adler >> 16));
 1301|  3.87k|        putShortMSB(s, (uInt)(strm->adler & 0xffff));
 1302|  3.87k|    }
 1303|  3.87k|    flush_pending(strm);
 1304|       |    /* If avail_out is zero, the application will call deflate again
 1305|       |     * to flush the rest.
 1306|       |     */
 1307|  3.87k|    if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */
  ------------------
  |  Branch (1307:9): [True: 3.87k, False: 0]
  ------------------
 1308|  3.87k|    return s->pending != 0 ? Z_OK : Z_STREAM_END;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
                  return s->pending != 0 ? Z_OK : Z_STREAM_END;
  ------------------
  |  |  182|  3.87k|#define Z_STREAM_END    1
  ------------------
  |  Branch (1308:12): [True: 0, False: 3.87k]
  ------------------
 1309|  3.87k|}
deflateEnd:
 1312|  3.87k|int ZEXPORT deflateEnd(z_streamp strm) {
 1313|  3.87k|    int status;
 1314|       |
 1315|  3.87k|    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (1315:9): [True: 0, False: 3.87k]
  ------------------
 1316|       |
 1317|  3.87k|    status = strm->state->status;
 1318|       |
 1319|       |    /* Deallocate in reverse order of allocations: */
 1320|  3.87k|    TRY_FREE(strm, strm->state->pending_buf);
  ------------------
  |  |  255|  3.87k|#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
  |  |  ------------------
  |  |  |  |  254|  3.87k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  |  |  ------------------
  |  |  |  Branch (255:29): [True: 3.87k, False: 0]
  |  |  ------------------
  ------------------
 1321|  3.87k|    TRY_FREE(strm, strm->state->head);
  ------------------
  |  |  255|  3.87k|#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
  |  |  ------------------
  |  |  |  |  254|  3.87k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  |  |  ------------------
  |  |  |  Branch (255:29): [True: 3.87k, False: 0]
  |  |  ------------------
  ------------------
 1322|  3.87k|    TRY_FREE(strm, strm->state->prev);
  ------------------
  |  |  255|  3.87k|#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
  |  |  ------------------
  |  |  |  |  254|  3.87k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  |  |  ------------------
  |  |  |  Branch (255:29): [True: 3.87k, False: 0]
  |  |  ------------------
  ------------------
 1323|  3.87k|    TRY_FREE(strm, strm->state->window);
  ------------------
  |  |  255|  3.87k|#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
  |  |  ------------------
  |  |  |  |  254|  3.87k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  |  |  ------------------
  |  |  |  Branch (255:29): [True: 3.87k, False: 0]
  |  |  ------------------
  ------------------
 1324|       |
 1325|  3.87k|    ZFREE(strm, strm->state);
  ------------------
  |  |  254|  3.87k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
 1326|  3.87k|    strm->state = Z_NULL;
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
 1327|       |
 1328|  3.87k|    return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
  ------------------
  |  |   66|  3.87k|#define BUSY_STATE   113    /* deflate -> FINISH_STATE */
  ------------------
                  return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
  ------------------
  |  |  186|      0|#define Z_DATA_ERROR   (-3)
  ------------------
                  return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
  ------------------
  |  |  181|  3.87k|#define Z_OK            0
  ------------------
  |  Branch (1328:12): [True: 0, False: 3.87k]
  ------------------
 1329|  3.87k|}
deflate.c:deflateStateCheck:
  537|  19.3k|local int deflateStateCheck(z_streamp strm) {
  538|  19.3k|    deflate_state *s;
  539|  19.3k|    if (strm == Z_NULL ||
  ------------------
  |  |  216|  38.7k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (539:9): [True: 0, False: 19.3k]
  ------------------
  540|  19.3k|        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
  ------------------
  |  Branch (540:9): [True: 0, False: 19.3k]
  |  Branch (540:42): [True: 0, False: 19.3k]
  ------------------
  541|      0|        return 1;
  542|  19.3k|    s = strm->state;
  543|  19.3k|    if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE &&
  ------------------
  |  |  216|  38.7k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE &&
  ------------------
  |  |   58|  38.7k|#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
  ------------------
  |  Branch (543:9): [True: 0, False: 19.3k]
  |  Branch (543:24): [True: 0, False: 19.3k]
  |  Branch (543:44): [True: 3.87k, False: 15.4k]
  ------------------
  544|  3.87k|#ifdef GZIP
  545|  3.87k|                                           s->status != GZIP_STATE &&
  ------------------
  |  |   60|  23.2k|#  define GZIP_STATE  57    /* gzip header -> BUSY_STATE | EXTRA_STATE */
  ------------------
  |  Branch (545:44): [True: 3.87k, False: 0]
  ------------------
  546|  3.87k|#endif
  547|  3.87k|                                           s->status != EXTRA_STATE &&
  ------------------
  |  |   62|  23.2k|#define EXTRA_STATE   69    /* gzip extra block -> NAME_STATE */
  ------------------
  |  Branch (547:44): [True: 3.87k, False: 0]
  ------------------
  548|  3.87k|                                           s->status != NAME_STATE &&
  ------------------
  |  |   63|  23.2k|#define NAME_STATE    73    /* gzip file name -> COMMENT_STATE */
  ------------------
  |  Branch (548:44): [True: 3.87k, False: 0]
  ------------------
  549|  3.87k|                                           s->status != COMMENT_STATE &&
  ------------------
  |  |   64|  23.2k|#define COMMENT_STATE 91    /* gzip comment -> HCRC_STATE */
  ------------------
  |  Branch (549:44): [True: 3.87k, False: 0]
  ------------------
  550|  3.87k|                                           s->status != HCRC_STATE &&
  ------------------
  |  |   65|  23.2k|#define HCRC_STATE   103    /* gzip header CRC -> BUSY_STATE */
  ------------------
  |  Branch (550:44): [True: 3.87k, False: 0]
  ------------------
  551|  3.87k|                                           s->status != BUSY_STATE &&
  ------------------
  |  |   66|  23.2k|#define BUSY_STATE   113    /* deflate -> FINISH_STATE */
  ------------------
  |  Branch (551:44): [True: 3.87k, False: 0]
  ------------------
  552|  3.87k|                                           s->status != FINISH_STATE))
  ------------------
  |  |   67|  3.87k|#define FINISH_STATE 666    /* stream complete */
  ------------------
  |  Branch (552:44): [True: 0, False: 3.87k]
  ------------------
  553|      0|        return 1;
  554|  19.3k|    return 0;
  555|  19.3k|}
deflate.c:fill_window:
  252|   279k|local void fill_window(deflate_state *s) {
  253|   279k|    unsigned n;
  254|   279k|    unsigned more;    /* Amount of free space at the end of the window. */
  255|   279k|    uInt wsize = s->w_size;
  256|       |
  257|   279k|    Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
  258|       |
  259|   279k|    do {
  260|   279k|        more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
  261|       |
  262|       |        /* Deal with !@#$% 64K limit: */
  263|       |#ifdef _MSC_VER
  264|       |#pragma warning(push)
  265|       |#pragma warning(disable: 4127)
  266|       |#endif
  267|   279k|        if (sizeof(int) <= 2) {
  ------------------
  |  Branch (267:13): [Folded, False: 279k]
  ------------------
  268|       |#ifdef _MSC_VER
  269|       |#pragma warning(pop)
  270|       |#endif
  271|      0|            if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
  ------------------
  |  Branch (271:17): [True: 0, False: 0]
  |  Branch (271:30): [True: 0, False: 0]
  |  Branch (271:50): [True: 0, False: 0]
  ------------------
  272|      0|                more = wsize;
  273|       |
  274|      0|            } else if (more == (unsigned)(-1)) {
  ------------------
  |  Branch (274:24): [True: 0, False: 0]
  ------------------
  275|       |                /* Very unlikely, but possible on 16 bit machine if
  276|       |                 * strstart == 0 && lookahead == 1 (input done a byte at time)
  277|       |                 */
  278|      0|                more--;
  279|      0|            }
  280|      0|        }
  281|       |
  282|       |        /* If the window is almost full and there is insufficient lookahead,
  283|       |         * move the upper half to the lower one to make room in the upper half.
  284|       |         */
  285|   279k|        if (s->strstart >= wsize + MAX_DIST(s)) {
  ------------------
  |  |  301|   279k|#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
  |  |  ------------------
  |  |  |  |  296|   279k|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|   279k|#define MAX_MATCH  258
  |  |  |  |  ------------------
  |  |  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|   279k|#define MIN_MATCH  3
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (285:13): [True: 18.6k, False: 260k]
  ------------------
  286|       |
  287|  18.6k|            zmemcpy(s->window, s->window + wsize, (unsigned)wsize - more);
  ------------------
  |  |  216|  18.6k|#    define zmemcpy memcpy
  ------------------
  288|  18.6k|            s->match_start -= wsize;
  289|  18.6k|            s->strstart    -= wsize; /* we now have strstart >= MAX_DIST */
  290|  18.6k|            s->block_start -= (long) wsize;
  291|  18.6k|            if (s->insert > s->strstart)
  ------------------
  |  Branch (291:17): [True: 0, False: 18.6k]
  ------------------
  292|      0|                s->insert = s->strstart;
  293|  18.6k|            slide_hash(s);
  294|  18.6k|            more += wsize;
  295|  18.6k|        }
  296|   279k|        if (s->strm->avail_in == 0) break;
  ------------------
  |  Branch (296:13): [True: 253k, False: 25.6k]
  ------------------
  297|       |
  298|       |        /* If there was no sliding:
  299|       |         *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
  300|       |         *    more == window_size - lookahead - strstart
  301|       |         * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
  302|       |         * => more >= window_size - 2*WSIZE + 2
  303|       |         * In the BIG_MEM or MMAP case (not yet supported),
  304|       |         *   window_size == input_size + MIN_LOOKAHEAD  &&
  305|       |         *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
  306|       |         * Otherwise, window_size == 2*WSIZE so more >= 2.
  307|       |         * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
  308|       |         */
  309|  25.6k|        Assert(more >= 2, "more < 2");
  310|       |
  311|  25.6k|        n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
  312|  25.6k|        s->lookahead += n;
  313|       |
  314|       |        /* Initialize the hash value now that we have some input: */
  315|  25.6k|        if (s->lookahead + s->insert >= MIN_MATCH) {
  ------------------
  |  |   92|  25.6k|#define MIN_MATCH  3
  ------------------
  |  Branch (315:13): [True: 25.3k, False: 230]
  ------------------
  316|  25.3k|            uInt str = s->strstart - s->insert;
  317|  25.3k|            s->ins_h = s->window[str];
  318|  25.3k|            UPDATE_HASH(s, s->ins_h, s->window[str + 1]);
  ------------------
  |  |  141|  25.3k|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  ------------------
  319|       |#if MIN_MATCH != 3
  320|       |            Call UPDATE_HASH() MIN_MATCH-3 more times
  321|       |#endif
  322|  32.4k|            while (s->insert) {
  ------------------
  |  Branch (322:20): [True: 7.08k, False: 25.3k]
  ------------------
  323|  7.08k|                UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]);
  ------------------
  |  |  141|  7.08k|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  ------------------
  324|  7.08k|#ifndef FASTEST
  325|  7.08k|                s->prev[str & s->w_mask] = s->head[s->ins_h];
  326|  7.08k|#endif
  327|  7.08k|                s->head[s->ins_h] = (Pos)str;
  328|  7.08k|                str++;
  329|  7.08k|                s->insert--;
  330|  7.08k|                if (s->lookahead + s->insert < MIN_MATCH)
  ------------------
  |  |   92|  7.08k|#define MIN_MATCH  3
  ------------------
  |  Branch (330:21): [True: 24, False: 7.05k]
  ------------------
  331|     24|                    break;
  332|  7.08k|            }
  333|  25.3k|        }
  334|       |        /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
  335|       |         * but this is not important since only literal bytes will be emitted.
  336|       |         */
  337|       |
  338|  25.6k|    } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
  ------------------
  |  |  296|  51.2k|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   93|  25.6k|#define MAX_MATCH  258
  |  |  ------------------
  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   92|  25.6k|#define MIN_MATCH  3
  |  |  ------------------
  ------------------
  |  Branch (338:14): [True: 5.72k, False: 19.8k]
  |  Branch (338:46): [True: 0, False: 5.72k]
  ------------------
  339|       |
  340|       |    /* If the WIN_INIT bytes after the end of the current data have never been
  341|       |     * written, then zero those bytes in order to avoid memory check reports of
  342|       |     * the use of uninitialized (or uninitialised as Julian writes) bytes by
  343|       |     * the longest match routines.  Update the high water mark for the next
  344|       |     * time through here.  WIN_INIT is set to MAX_MATCH since the longest match
  345|       |     * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
  346|       |     */
  347|   279k|    if (s->high_water < s->window_size) {
  ------------------
  |  Branch (347:9): [True: 166k, False: 112k]
  ------------------
  348|   166k|        ulg curr = s->strstart + (ulg)(s->lookahead);
  349|   166k|        ulg init;
  350|       |
  351|   166k|        if (s->high_water < curr) {
  ------------------
  |  Branch (351:13): [True: 5.62k, False: 161k]
  ------------------
  352|       |            /* Previous high water mark below current data -- zero WIN_INIT
  353|       |             * bytes or up to end of window, whichever is less.
  354|       |             */
  355|  5.62k|            init = s->window_size - curr;
  356|  5.62k|            if (init > WIN_INIT)
  ------------------
  |  |  306|  5.62k|#define WIN_INIT MAX_MATCH
  |  |  ------------------
  |  |  |  |   93|  5.62k|#define MAX_MATCH  258
  |  |  ------------------
  ------------------
  |  Branch (356:17): [True: 4.72k, False: 895]
  ------------------
  357|  4.72k|                init = WIN_INIT;
  ------------------
  |  |  306|  4.72k|#define WIN_INIT MAX_MATCH
  |  |  ------------------
  |  |  |  |   93|  4.72k|#define MAX_MATCH  258
  |  |  ------------------
  ------------------
  358|  5.62k|            zmemzero(s->window + curr, (unsigned)init);
  ------------------
  |  |  218|  5.62k|#    define zmemzero(dest, len) memset(dest, 0, len)
  ------------------
  359|  5.62k|            s->high_water = curr + init;
  360|  5.62k|        }
  361|   161k|        else if (s->high_water < (ulg)curr + WIN_INIT) {
  ------------------
  |  |  306|   161k|#define WIN_INIT MAX_MATCH
  |  |  ------------------
  |  |  |  |   93|   161k|#define MAX_MATCH  258
  |  |  ------------------
  ------------------
  |  Branch (361:18): [True: 2.12k, False: 159k]
  ------------------
  362|       |            /* High water mark at or above current data, but below current data
  363|       |             * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
  364|       |             * to end of window, whichever is less.
  365|       |             */
  366|  2.12k|            init = (ulg)curr + WIN_INIT - s->high_water;
  ------------------
  |  |  306|  2.12k|#define WIN_INIT MAX_MATCH
  |  |  ------------------
  |  |  |  |   93|  2.12k|#define MAX_MATCH  258
  |  |  ------------------
  ------------------
  367|  2.12k|            if (init > s->window_size - s->high_water)
  ------------------
  |  Branch (367:17): [True: 0, False: 2.12k]
  ------------------
  368|      0|                init = s->window_size - s->high_water;
  369|  2.12k|            zmemzero(s->window + s->high_water, (unsigned)init);
  ------------------
  |  |  218|  2.12k|#    define zmemzero(dest, len) memset(dest, 0, len)
  ------------------
  370|  2.12k|            s->high_water += init;
  371|  2.12k|        }
  372|   166k|    }
  373|       |
  374|   279k|    Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
  375|   279k|           "not enough room for search");
  376|   279k|}
deflate.c:read_buf:
  219|  25.6k|local unsigned read_buf(z_streamp strm, Bytef *buf, unsigned size) {
  220|  25.6k|    unsigned len = strm->avail_in;
  221|       |
  222|  25.6k|    if (len > size) len = size;
  ------------------
  |  Branch (222:9): [True: 18.1k, False: 7.49k]
  ------------------
  223|  25.6k|    if (len == 0) return 0;
  ------------------
  |  Branch (223:9): [True: 0, False: 25.6k]
  ------------------
  224|       |
  225|  25.6k|    strm->avail_in  -= len;
  226|       |
  227|  25.6k|    zmemcpy(buf, strm->next_in, len);
  ------------------
  |  |  216|  25.6k|#    define zmemcpy memcpy
  ------------------
  228|  25.6k|    if (strm->state->wrap == 1) {
  ------------------
  |  Branch (228:9): [True: 21.9k, False: 3.62k]
  ------------------
  229|  21.9k|        strm->adler = adler32(strm->adler, buf, len);
  230|  21.9k|    }
  231|  3.62k|#ifdef GZIP
  232|  3.62k|    else if (strm->state->wrap == 2) {
  ------------------
  |  Branch (232:14): [True: 0, False: 3.62k]
  ------------------
  233|      0|        strm->adler = crc32(strm->adler, buf, len);
  234|      0|    }
  235|  25.6k|#endif
  236|  25.6k|    strm->next_in  += len;
  237|  25.6k|    strm->total_in += len;
  238|       |
  239|  25.6k|    return len;
  240|  25.6k|}
deflate.c:lm_init:
  695|  3.87k|local void lm_init(deflate_state *s) {
  696|  3.87k|    s->window_size = (ulg)2L*s->w_size;
  697|       |
  698|  3.87k|    CLEAR_HASH(s);
  ------------------
  |  |  171|  3.87k|    do { \
  |  |  172|  3.87k|        s->head[s->hash_size - 1] = NIL; \
  |  |  ------------------
  |  |  |  |   85|  3.87k|#define NIL 0
  |  |  ------------------
  |  |  173|  3.87k|        zmemzero(s->head, (unsigned)(s->hash_size - 1)*sizeof(*s->head)); \
  |  |  ------------------
  |  |  |  |  218|  3.87k|#    define zmemzero(dest, len) memset(dest, 0, len)
  |  |  ------------------
  |  |  174|  3.87k|        s->slid = 0; \
  |  |  175|  3.87k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (175:14): [Folded, False: 3.87k]
  |  |  ------------------
  ------------------
  699|  3.87k|    s->matches = 0;             /* the hash is clear */
  700|       |
  701|       |    /* Set the default configuration parameters:
  702|       |     */
  703|  3.87k|    s->max_lazy_match   = configuration_table[s->level].max_lazy;
  704|  3.87k|    s->good_match       = configuration_table[s->level].good_length;
  705|  3.87k|    s->nice_match       = configuration_table[s->level].nice_length;
  706|  3.87k|    s->max_chain_length = configuration_table[s->level].max_chain;
  707|       |
  708|  3.87k|    s->strstart = 0;
  709|  3.87k|    s->block_start = 0L;
  710|  3.87k|    s->lookahead = 0;
  711|  3.87k|    s->insert = 0;
  712|  3.87k|    s->match_length = s->prev_length = MIN_MATCH-1;
  ------------------
  |  |   92|  3.87k|#define MIN_MATCH  3
  ------------------
  713|  3.87k|    s->match_available = 0;
  714|  3.87k|    s->ins_h = 0;
  715|  3.87k|}
deflate.c:deflate_fast:
 1892|    762|local block_state deflate_fast(deflate_state *s, int flush) {
 1893|    762|    IPos hash_head;       /* head of the hash chain */
 1894|    762|    int bflush;           /* set if current block must be flushed */
 1895|       |
 1896|  1.35M|    for (;;) {
 1897|       |        /* Make sure that we always have enough lookahead, except
 1898|       |         * at the end of the input file. We need MAX_MATCH bytes
 1899|       |         * for the next match, plus MIN_MATCH bytes to insert the
 1900|       |         * string following the next match.
 1901|       |         */
 1902|  1.35M|        if (s->lookahead < MIN_LOOKAHEAD) {
  ------------------
  |  |  296|  1.35M|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   93|  1.35M|#define MAX_MATCH  258
  |  |  ------------------
  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   92|  1.35M|#define MIN_MATCH  3
  |  |  ------------------
  ------------------
  |  Branch (1902:13): [True: 57.5k, False: 1.29M]
  ------------------
 1903|  57.5k|            fill_window(s);
 1904|  57.5k|            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
  ------------------
  |  |  296|   115k|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   93|  57.5k|#define MAX_MATCH  258
  |  |  ------------------
  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   92|  57.5k|#define MIN_MATCH  3
  |  |  ------------------
  ------------------
                          if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
  ------------------
  |  |  172|  53.5k|#define Z_NO_FLUSH      0
  ------------------
  |  Branch (1904:17): [True: 53.5k, False: 3.95k]
  |  Branch (1904:49): [True: 0, False: 53.5k]
  ------------------
 1905|      0|                return need_more;
 1906|      0|            }
 1907|  57.5k|            if (s->lookahead == 0) break; /* flush the current block */
  ------------------
  |  Branch (1907:17): [True: 762, False: 56.7k]
  ------------------
 1908|  57.5k|        }
 1909|       |
 1910|       |        /* Insert the string window[strstart .. strstart + 2] in the
 1911|       |         * dictionary, and set hash_head to the head of the hash chain:
 1912|       |         */
 1913|  1.35M|        hash_head = NIL;
  ------------------
  |  |   85|  1.35M|#define NIL 0
  ------------------
 1914|  1.35M|        if (s->lookahead >= MIN_MATCH) {
  ------------------
  |  |   92|  1.35M|#define MIN_MATCH  3
  ------------------
  |  Branch (1914:13): [True: 1.35M, False: 710]
  ------------------
 1915|  1.35M|            INSERT_STRING(s, s->strstart, hash_head);
  ------------------
  |  |  161|  1.35M|   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
  |  |  ------------------
  |  |  |  |  141|  1.35M|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  |  |  ------------------
  |  |  162|  1.35M|    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
  |  |  163|  1.35M|    s->head[s->ins_h] = (Pos)(str))
  ------------------
 1916|  1.35M|        }
 1917|       |
 1918|       |        /* Find the longest match, discarding those <= prev_length.
 1919|       |         * At this point we have always match_length < MIN_MATCH
 1920|       |         */
 1921|  1.35M|        if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
  ------------------
  |  |   85|  2.70M|#define NIL 0
  ------------------
                      if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
  ------------------
  |  |  301|   650k|#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
  |  |  ------------------
  |  |  |  |  296|   650k|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|   650k|#define MAX_MATCH  258
  |  |  |  |  ------------------
  |  |  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|   650k|#define MIN_MATCH  3
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1921:13): [True: 650k, False: 704k]
  |  Branch (1921:33): [True: 534k, False: 115k]
  ------------------
 1922|       |            /* To simplify the code, we prevent matches with the string
 1923|       |             * of window index 0 (in particular we have to avoid a match
 1924|       |             * of the string with itself at the start of the input file).
 1925|       |             */
 1926|   534k|            s->match_length = longest_match (s, hash_head);
 1927|       |            /* longest_match() sets match_start */
 1928|   534k|        }
 1929|  1.35M|        if (s->match_length >= MIN_MATCH) {
  ------------------
  |  |   92|  1.35M|#define MIN_MATCH  3
  ------------------
  |  Branch (1929:13): [True: 170k, False: 1.18M]
  ------------------
 1930|   170k|            check_match(s, s->strstart, s->match_start, (int)s->match_length);
 1931|       |
 1932|   170k|            _tr_tally_dist(s, s->strstart - s->match_start,
  ------------------
  |  |  366|   170k|  { uch len = (uch)(length); \
  |  |  367|   170k|    ush dist = (ush)(distance); \
  |  |  368|   170k|    s->sym_buf[s->sym_next++] = (uch)dist; \
  |  |  369|   170k|    s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \
  |  |  370|   170k|    s->sym_buf[s->sym_next++] = len; \
  |  |  371|   170k|    dist--; \
  |  |  372|   170k|    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
  |  |  ------------------
  |  |  |  |   37|   170k|#define LITERALS  256
  |  |  ------------------
  |  |                   s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
  |  |  ------------------
  |  |  |  |   83|   170k|#define Freq fc.freq
  |  |  ------------------
  |  |  373|   170k|    s->dyn_dtree[d_code(dist)].Freq++; \
  |  |  ------------------
  |  |  |  |  321|   170k|   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 98.4k, False: 72.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   s->dyn_dtree[d_code(dist)].Freq++; \
  |  |  ------------------
  |  |  |  |   83|   170k|#define Freq fc.freq
  |  |  ------------------
  |  |  374|   170k|    flush = (s->sym_next == s->sym_end); \
  |  |  375|   170k|  }
  ------------------
 1933|   170k|                           s->match_length - MIN_MATCH, bflush);
 1934|       |
 1935|   170k|            s->lookahead -= s->match_length;
 1936|       |
 1937|       |            /* Insert new strings in the hash table only if the match length
 1938|       |             * is not too large. This saves time but degrades compression.
 1939|       |             */
 1940|   170k|#ifndef FASTEST
 1941|   170k|            if (s->match_length <= s->max_insert_length &&
  ------------------
  |  |  186|   341k|#   define max_insert_length  max_lazy_match
  ------------------
  |  Branch (1941:17): [True: 96.6k, False: 74.2k]
  ------------------
 1942|  96.6k|                s->lookahead >= MIN_MATCH) {
  ------------------
  |  |   92|  96.6k|#define MIN_MATCH  3
  ------------------
  |  Branch (1942:17): [True: 96.3k, False: 354]
  ------------------
 1943|  96.3k|                s->match_length--; /* string at strstart already in table */
 1944|   259k|                do {
 1945|   259k|                    s->strstart++;
 1946|   259k|                    INSERT_STRING(s, s->strstart, hash_head);
  ------------------
  |  |  161|   259k|   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
  |  |  ------------------
  |  |  |  |  141|   259k|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  |  |  ------------------
  |  |  162|   259k|    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
  |  |  163|   259k|    s->head[s->ins_h] = (Pos)(str))
  ------------------
 1947|       |                    /* strstart never exceeds WSIZE-MAX_MATCH, so there are
 1948|       |                     * always MIN_MATCH bytes ahead.
 1949|       |                     */
 1950|   259k|                } while (--s->match_length != 0);
  ------------------
  |  Branch (1950:26): [True: 163k, False: 96.3k]
  ------------------
 1951|  96.3k|                s->strstart++;
 1952|  96.3k|            } else
 1953|  74.6k|#endif
 1954|  74.6k|            {
 1955|  74.6k|                s->strstart += s->match_length;
 1956|  74.6k|                s->match_length = 0;
 1957|  74.6k|                s->ins_h = s->window[s->strstart];
 1958|  74.6k|                UPDATE_HASH(s, s->ins_h, s->window[s->strstart + 1]);
  ------------------
  |  |  141|  74.6k|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  ------------------
 1959|       |#if MIN_MATCH != 3
 1960|       |                Call UPDATE_HASH() MIN_MATCH-3 more times
 1961|       |#endif
 1962|       |                /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
 1963|       |                 * matter since it will be recomputed at next deflate call.
 1964|       |                 */
 1965|  74.6k|            }
 1966|  1.18M|        } else {
 1967|       |            /* No match, output a literal byte */
 1968|  1.18M|            Tracevv((stderr,"%c", s->window[s->strstart]));
 1969|  1.18M|            _tr_tally_lit(s, s->window[s->strstart], bflush);
  ------------------
  |  |  358|  1.18M|  { uch cc = (c); \
  |  |  359|  1.18M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  360|  1.18M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  361|  1.18M|    s->sym_buf[s->sym_next++] = cc; \
  |  |  362|  1.18M|    s->dyn_ltree[cc].Freq++; \
  |  |  ------------------
  |  |  |  |   83|  1.18M|#define Freq fc.freq
  |  |  ------------------
  |  |  363|  1.18M|    flush = (s->sym_next == s->sym_end); \
  |  |  364|  1.18M|   }
  ------------------
 1970|  1.18M|            s->lookahead--;
 1971|  1.18M|            s->strstart++;
 1972|  1.18M|        }
 1973|  1.35M|        if (bflush) FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1671|  2.68k|#define FLUSH_BLOCK(s, last) { \
  |  | 1672|  2.68k|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1659|  2.68k|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1660|  2.68k|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1660:24): [True: 2.27k, False: 410]
  |  |  |  |  ------------------
  |  |  |  | 1661|  2.68k|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1662|  2.68k|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    410|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1663|  2.68k|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1664|  2.68k|                (last)); \
  |  |  |  | 1665|  2.68k|   s->block_start = s->strstart; \
  |  |  |  | 1666|  2.68k|   flush_pending(s->strm); \
  |  |  |  | 1667|  2.68k|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1668|  2.68k|}
  |  |  ------------------
  |  | 1673|  2.68k|   if (s->strm->avail_out == 0) { \
  |  |  ------------------
  |  |  |  Branch (1673:8): [True: 0, False: 2.68k]
  |  |  ------------------
  |  | 1674|      0|      if (!(last)) return need_more; \
  |  |  ------------------
  |  |  |  Branch (1674:11): [True: 0, Folded]
  |  |  ------------------
  |  | 1675|      0|      if (s->pending != 0 || s->wrap != 0) return finish_started; \
  |  |  ------------------
  |  |  |  Branch (1675:11): [True: 0, False: 0]
  |  |  |  Branch (1675:30): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|   } \
  |  | 1677|  2.68k|}
  ------------------
  |  Branch (1973:13): [True: 2.68k, False: 1.35M]
  ------------------
 1974|  1.35M|    }
 1975|    762|    s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
  ------------------
  |  |   92|    762|#define MIN_MATCH  3
  ------------------
                  s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
  ------------------
  |  |   92|    762|#define MIN_MATCH  3
  ------------------
  |  Branch (1975:17): [True: 0, False: 762]
  ------------------
 1976|    762|    if (flush == Z_FINISH) {
  ------------------
  |  |  176|    762|#define Z_FINISH        4
  ------------------
  |  Branch (1976:9): [True: 762, False: 0]
  ------------------
 1977|    762|        FLUSH_BLOCK(s, 1);
  ------------------
  |  | 1671|    762|#define FLUSH_BLOCK(s, last) { \
  |  | 1672|    762|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1659|    762|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1660|    762|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1660:24): [True: 692, False: 70]
  |  |  |  |  ------------------
  |  |  |  | 1661|    762|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1662|    762|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|     70|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1663|    762|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1664|    762|                (last)); \
  |  |  |  | 1665|    762|   s->block_start = s->strstart; \
  |  |  |  | 1666|    762|   flush_pending(s->strm); \
  |  |  |  | 1667|    762|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1668|    762|}
  |  |  ------------------
  |  | 1673|    762|   if (s->strm->avail_out == 0) { \
  |  |  ------------------
  |  |  |  Branch (1673:8): [True: 0, False: 762]
  |  |  ------------------
  |  | 1674|      0|      if (!(last)) return need_more; \
  |  |  ------------------
  |  |  |  Branch (1674:11): [Folded, False: 0]
  |  |  ------------------
  |  | 1675|      0|      if (s->pending != 0 || s->wrap != 0) return finish_started; \
  |  |  ------------------
  |  |  |  Branch (1675:11): [True: 0, False: 0]
  |  |  |  Branch (1675:30): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|   } \
  |  | 1677|    762|}
  ------------------
 1978|    762|        return finish_done;
 1979|    762|    }
 1980|      0|    if (s->sym_next)
  ------------------
  |  Branch (1980:9): [True: 0, False: 0]
  ------------------
 1981|      0|        FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1671|      0|#define FLUSH_BLOCK(s, last) { \
  |  | 1672|      0|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1659|      0|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1660|      0|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1660:24): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1661|      0|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1662|      0|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1663|      0|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1664|      0|                (last)); \
  |  |  |  | 1665|      0|   s->block_start = s->strstart; \
  |  |  |  | 1666|      0|   flush_pending(s->strm); \
  |  |  |  | 1667|      0|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1668|      0|}
  |  |  ------------------
  |  | 1673|      0|   if (s->strm->avail_out == 0) { \
  |  |  ------------------
  |  |  |  Branch (1673:8): [True: 0, False: 0]
  |  |  ------------------
  |  | 1674|      0|      if (!(last)) return need_more; \
  |  |  ------------------
  |  |  |  Branch (1674:11): [True: 0, Folded]
  |  |  ------------------
  |  | 1675|      0|      if (s->pending != 0 || s->wrap != 0) return finish_started; \
  |  |  ------------------
  |  |  |  Branch (1675:11): [True: 0, False: 0]
  |  |  |  Branch (1675:30): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|   } \
  |  | 1677|      0|}
  ------------------
 1982|      0|    return block_done;
 1983|      0|}
deflate.c:longest_match:
 1418|  1.39M|local uInt longest_match(deflate_state *s, IPos cur_match) {
 1419|  1.39M|    unsigned chain_length = s->max_chain_length;/* max hash chain length */
 1420|  1.39M|    Bytef *scan = s->window + s->strstart;      /* current string */
 1421|  1.39M|    Bytef *match;                               /* matched string */
 1422|  1.39M|    int len;                                    /* length of current match */
 1423|  1.39M|    int best_len = (int)s->prev_length;         /* best match length so far */
 1424|  1.39M|    int nice_match = s->nice_match;             /* stop if match long enough */
 1425|  1.39M|    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
  ------------------
  |  |  301|  1.39M|#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
  |  |  ------------------
  |  |  |  |  296|  1.39M|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|  1.39M|#define MAX_MATCH  258
  |  |  |  |  ------------------
  |  |  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|  1.39M|#define MIN_MATCH  3
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1425:18): [True: 917k, False: 473k]
  ------------------
 1426|   917k|        s->strstart - (IPos)MAX_DIST(s) : NIL;
  ------------------
  |  |  301|   917k|#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
  |  |  ------------------
  |  |  |  |  296|   917k|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|   917k|#define MAX_MATCH  258
  |  |  |  |  ------------------
  |  |  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|   917k|#define MIN_MATCH  3
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      s->strstart - (IPos)MAX_DIST(s) : NIL;
  ------------------
  |  |   85|   473k|#define NIL 0
  ------------------
 1427|       |    /* Stop when cur_match becomes <= limit. To simplify the code,
 1428|       |     * we prevent matches with the string of window index 0.
 1429|       |     */
 1430|  1.39M|    Posf *prev = s->prev;
 1431|  1.39M|    uInt wmask = s->w_mask;
 1432|       |
 1433|       |#ifdef UNALIGNED_OK
 1434|       |    /* Compare two bytes at a time. Note: this is not always beneficial.
 1435|       |     * Try with and without -DUNALIGNED_OK to check.
 1436|       |     */
 1437|       |    Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
 1438|       |    ush scan_start = *(ushf*)scan;
 1439|       |    ush scan_end   = *(ushf*)(scan + best_len - 1);
 1440|       |#else
 1441|  1.39M|    Bytef *strend = s->window + s->strstart + MAX_MATCH;
  ------------------
  |  |   93|  1.39M|#define MAX_MATCH  258
  ------------------
 1442|  1.39M|    Byte scan_end1  = scan[best_len - 1];
 1443|  1.39M|    Byte scan_end   = scan[best_len];
 1444|  1.39M|#endif
 1445|       |
 1446|       |    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
 1447|       |     * It is easy to get rid of this optimization if necessary.
 1448|       |     */
 1449|  1.39M|    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
 1450|       |
 1451|       |    /* Do not waste too much time if we already have a good match: */
 1452|  1.39M|    if (s->prev_length >= s->good_match) {
  ------------------
  |  Branch (1452:9): [True: 30.5k, False: 1.36M]
  ------------------
 1453|  30.5k|        chain_length >>= 2;
 1454|  30.5k|    }
 1455|       |    /* Do not look for matches beyond the end of the input. This is necessary
 1456|       |     * to make deflate deterministic.
 1457|       |     */
 1458|  1.39M|    if ((uInt)nice_match > s->lookahead) nice_match = (int)s->lookahead;
  ------------------
  |  Branch (1458:9): [True: 31.2k, False: 1.35M]
  ------------------
 1459|       |
 1460|  1.39M|    Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
 1461|  1.39M|           "need lookahead");
 1462|       |
 1463|  12.3M|    do {
 1464|  12.3M|        Assert(cur_match < s->strstart, "no future");
 1465|  12.3M|        match = s->window + cur_match;
 1466|       |
 1467|       |        /* Skip to next match if the match length cannot increase
 1468|       |         * or if the match length is less than 2.  Note that the checks below
 1469|       |         * for insufficient lookahead only occur occasionally for performance
 1470|       |         * reasons.  Therefore uninitialized memory will be accessed, and
 1471|       |         * conditional jumps will be made that depend on those values.
 1472|       |         * However the length of the match is limited to the lookahead, so
 1473|       |         * the output of deflate is not affected by the uninitialized values.
 1474|       |         */
 1475|       |#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
 1476|       |        /* This code assumes sizeof(unsigned short) == 2. Do not use
 1477|       |         * UNALIGNED_OK if your compiler uses a different size.
 1478|       |         */
 1479|       |        if (*(ushf*)(match + best_len - 1) != scan_end ||
 1480|       |            *(ushf*)match != scan_start) continue;
 1481|       |
 1482|       |        /* It is not necessary to compare scan[2] and match[2] since they are
 1483|       |         * always equal when the other bytes match, given that the hash keys
 1484|       |         * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
 1485|       |         * strstart + 3, + 5, up to strstart + 257. We check for insufficient
 1486|       |         * lookahead only every 4th comparison; the 128th check will be made
 1487|       |         * at strstart + 257. If MAX_MATCH-2 is not a multiple of 8, it is
 1488|       |         * necessary to put more guard bytes at the end of the window, or
 1489|       |         * to check more often for insufficient lookahead.
 1490|       |         */
 1491|       |        Assert(scan[2] == match[2], "scan[2]?");
 1492|       |        scan++, match++;
 1493|       |        do {
 1494|       |        } while (*(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
 1495|       |                 *(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
 1496|       |                 *(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
 1497|       |                 *(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
 1498|       |                 scan < strend);
 1499|       |        /* The funny "do {}" generates better code on most compilers */
 1500|       |
 1501|       |        /* Here, scan <= window + strstart + 257 */
 1502|       |        Assert(scan <= s->window + (unsigned)(s->window_size - 1),
 1503|       |               "wild scan");
 1504|       |        if (*scan == *match) scan++;
 1505|       |
 1506|       |        len = (MAX_MATCH - 1) - (int)(strend - scan);
 1507|       |        scan = strend - (MAX_MATCH-1);
 1508|       |
 1509|       |#else /* UNALIGNED_OK */
 1510|       |
 1511|  12.3M|        if (match[best_len]     != scan_end  ||
  ------------------
  |  Branch (1511:13): [True: 9.32M, False: 3.02M]
  ------------------
 1512|  3.02M|            match[best_len - 1] != scan_end1 ||
  ------------------
  |  Branch (1512:13): [True: 921k, False: 2.10M]
  ------------------
 1513|  2.10M|            *match              != *scan     ||
  ------------------
  |  Branch (1513:13): [True: 1.04M, False: 1.05M]
  ------------------
 1514|  11.2M|            *++match            != scan[1])      continue;
  ------------------
  |  Branch (1514:13): [True: 2.81k, False: 1.05M]
  ------------------
 1515|       |
 1516|       |        /* The check at best_len - 1 can be removed because it will be made
 1517|       |         * again later. (This heuristic is not always a win.)
 1518|       |         * It is not necessary to compare scan[2] and match[2] since they
 1519|       |         * are always equal when the other bytes match, given that
 1520|       |         * the hash keys are equal and that HASH_BITS >= 8.
 1521|       |         */
 1522|  1.05M|        scan += 2, match++;
 1523|  1.05M|        Assert(*scan == *match, "match[2]?");
 1524|       |
 1525|       |        /* We check for insufficient lookahead only every 8th comparison;
 1526|       |         * the 256th check will be made at strstart + 258.
 1527|       |         */
 1528|  3.57M|        do {
 1529|  3.57M|        } while (*++scan == *++match && *++scan == *++match &&
  ------------------
  |  Branch (1529:18): [True: 3.26M, False: 309k]
  |  Branch (1529:41): [True: 3.10M, False: 160k]
  ------------------
 1530|  3.10M|                 *++scan == *++match && *++scan == *++match &&
  ------------------
  |  Branch (1530:18): [True: 2.98M, False: 117k]
  |  Branch (1530:41): [True: 2.87M, False: 109k]
  ------------------
 1531|  2.87M|                 *++scan == *++match && *++scan == *++match &&
  ------------------
  |  Branch (1531:18): [True: 2.76M, False: 116k]
  |  Branch (1531:41): [True: 2.67M, False: 89.4k]
  ------------------
 1532|  2.67M|                 *++scan == *++match && *++scan == *++match &&
  ------------------
  |  Branch (1532:18): [True: 2.60M, False: 69.8k]
  |  Branch (1532:41): [True: 2.53M, False: 68.9k]
  ------------------
 1533|  2.53M|                 scan < strend);
  ------------------
  |  Branch (1533:18): [True: 2.52M, False: 10.9k]
  ------------------
 1534|       |
 1535|  1.05M|        Assert(scan <= s->window + (unsigned)(s->window_size - 1),
 1536|  1.05M|               "wild scan");
 1537|       |
 1538|  1.05M|        len = MAX_MATCH - (int)(strend - scan);
  ------------------
  |  |   93|  1.05M|#define MAX_MATCH  258
  ------------------
 1539|  1.05M|        scan = strend - MAX_MATCH;
  ------------------
  |  |   93|  1.05M|#define MAX_MATCH  258
  ------------------
 1540|       |
 1541|  1.05M|#endif /* UNALIGNED_OK */
 1542|       |
 1543|  1.05M|        if (len > best_len) {
  ------------------
  |  Branch (1543:13): [True: 902k, False: 151k]
  ------------------
 1544|   902k|            s->match_start = cur_match;
 1545|   902k|            best_len = len;
 1546|   902k|            if (len >= nice_match) break;
  ------------------
  |  Branch (1546:17): [True: 34.5k, False: 867k]
  ------------------
 1547|       |#ifdef UNALIGNED_OK
 1548|       |            scan_end = *(ushf*)(scan + best_len - 1);
 1549|       |#else
 1550|   867k|            scan_end1  = scan[best_len - 1];
 1551|   867k|            scan_end   = scan[best_len];
 1552|   867k|#endif
 1553|   867k|        }
 1554|  12.3M|    } while ((cur_match = prev[cur_match & wmask]) > limit
  ------------------
  |  Branch (1554:14): [True: 11.1M, False: 1.18M]
  ------------------
 1555|  11.1M|             && --chain_length != 0);
  ------------------
  |  Branch (1555:17): [True: 10.9M, False: 172k]
  ------------------
 1556|       |
 1557|  1.39M|    if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
  ------------------
  |  Branch (1557:9): [True: 1.39M, False: 484]
  ------------------
 1558|    484|    return s->lookahead;
 1559|  1.39M|}
deflate.c:deflate_slow:
 1991|  1.26k|local block_state deflate_slow(deflate_state *s, int flush) {
 1992|  1.26k|    IPos hash_head;          /* head of hash chain */
 1993|  1.26k|    int bflush;              /* set if current block must be flushed */
 1994|       |
 1995|       |    /* Process the input block. */
 1996|  2.29M|    for (;;) {
 1997|       |        /* Make sure that we always have enough lookahead, except
 1998|       |         * at the end of the input file. We need MAX_MATCH bytes
 1999|       |         * for the next match, plus MIN_MATCH bytes to insert the
 2000|       |         * string following the next match.
 2001|       |         */
 2002|  2.29M|        if (s->lookahead < MIN_LOOKAHEAD) {
  ------------------
  |  |  296|  2.29M|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   93|  2.29M|#define MAX_MATCH  258
  |  |  ------------------
  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   92|  2.29M|#define MIN_MATCH  3
  |  |  ------------------
  ------------------
  |  Branch (2002:13): [True: 119k, False: 2.17M]
  ------------------
 2003|   119k|            fill_window(s);
 2004|   119k|            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
  ------------------
  |  |  296|   238k|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   93|   119k|#define MAX_MATCH  258
  |  |  ------------------
  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   92|   119k|#define MIN_MATCH  3
  |  |  ------------------
  ------------------
                          if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
  ------------------
  |  |  172|   112k|#define Z_NO_FLUSH      0
  ------------------
  |  Branch (2004:17): [True: 112k, False: 6.83k]
  |  Branch (2004:49): [True: 0, False: 112k]
  ------------------
 2005|      0|                return need_more;
 2006|      0|            }
 2007|   119k|            if (s->lookahead == 0) break; /* flush the current block */
  ------------------
  |  Branch (2007:17): [True: 1.26k, False: 118k]
  ------------------
 2008|   119k|        }
 2009|       |
 2010|       |        /* Insert the string window[strstart .. strstart + 2] in the
 2011|       |         * dictionary, and set hash_head to the head of the hash chain:
 2012|       |         */
 2013|  2.29M|        hash_head = NIL;
  ------------------
  |  |   85|  2.29M|#define NIL 0
  ------------------
 2014|  2.29M|        if (s->lookahead >= MIN_MATCH) {
  ------------------
  |  |   92|  2.29M|#define MIN_MATCH  3
  ------------------
  |  Branch (2014:13): [True: 2.28M, False: 1.44k]
  ------------------
 2015|  2.28M|            INSERT_STRING(s, s->strstart, hash_head);
  ------------------
  |  |  161|  2.28M|   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
  |  |  ------------------
  |  |  |  |  141|  2.28M|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  |  |  ------------------
  |  |  162|  2.28M|    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
  |  |  163|  2.28M|    s->head[s->ins_h] = (Pos)(str))
  ------------------
 2016|  2.28M|        }
 2017|       |
 2018|       |        /* Find the longest match, discarding those <= prev_length.
 2019|       |         */
 2020|  2.29M|        s->prev_length = s->match_length, s->prev_match = s->match_start;
 2021|  2.29M|        s->match_length = MIN_MATCH-1;
  ------------------
  |  |   92|  2.29M|#define MIN_MATCH  3
  ------------------
 2022|       |
 2023|  2.29M|        if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
  ------------------
  |  |   85|  4.58M|#define NIL 0
  ------------------
  |  Branch (2023:13): [True: 1.20M, False: 1.08M]
  |  Branch (2023:33): [True: 1.16M, False: 39.9k]
  ------------------
 2024|  1.16M|            s->strstart - hash_head <= MAX_DIST(s)) {
  ------------------
  |  |  301|  1.16M|#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
  |  |  ------------------
  |  |  |  |  296|  1.16M|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|  1.16M|#define MAX_MATCH  258
  |  |  |  |  ------------------
  |  |  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|  1.16M|#define MIN_MATCH  3
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2024:13): [True: 855k, False: 310k]
  ------------------
 2025|       |            /* To simplify the code, we prevent matches with the string
 2026|       |             * of window index 0 (in particular we have to avoid a match
 2027|       |             * of the string with itself at the start of the input file).
 2028|       |             */
 2029|   855k|            s->match_length = longest_match (s, hash_head);
 2030|       |            /* longest_match() sets match_start */
 2031|       |
 2032|   855k|            if (s->match_length <= 5 && (s->strategy == Z_FILTERED
  ------------------
  |  |  200|  1.39M|#define Z_FILTERED            1
  ------------------
  |  Branch (2032:17): [True: 698k, False: 156k]
  |  Branch (2032:42): [True: 107k, False: 591k]
  ------------------
 2033|   591k|#if TOO_FAR <= 32767
 2034|   591k|                || (s->match_length == MIN_MATCH &&
  ------------------
  |  |   92|  1.18M|#define MIN_MATCH  3
  ------------------
  |  Branch (2034:21): [True: 98.4k, False: 492k]
  ------------------
 2035|  98.4k|                    s->strstart - s->match_start > TOO_FAR)
  ------------------
  |  |   89|  98.4k|#  define TOO_FAR 4096
  ------------------
  |  Branch (2035:21): [True: 3.35k, False: 95.1k]
  ------------------
 2036|   698k|#endif
 2037|   698k|                )) {
 2038|       |
 2039|       |                /* If prev_match is also MIN_MATCH, match_start is garbage
 2040|       |                 * but we will ignore the current match anyway.
 2041|       |                 */
 2042|   110k|                s->match_length = MIN_MATCH-1;
  ------------------
  |  |   92|   110k|#define MIN_MATCH  3
  ------------------
 2043|   110k|            }
 2044|   855k|        }
 2045|       |        /* If there was a match at the previous step and the current
 2046|       |         * match is not better, output the previous match:
 2047|       |         */
 2048|  2.29M|        if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
  ------------------
  |  |   92|  4.58M|#define MIN_MATCH  3
  ------------------
  |  Branch (2048:13): [True: 199k, False: 2.09M]
  |  Branch (2048:44): [True: 185k, False: 14.2k]
  ------------------
 2049|   185k|            uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
  ------------------
  |  |   92|   185k|#define MIN_MATCH  3
  ------------------
 2050|       |            /* Do not insert strings in hash table beyond this. */
 2051|       |
 2052|   185k|            check_match(s, s->strstart - 1, s->prev_match,
 2053|   185k|                        (int)s->prev_length);
 2054|       |
 2055|   185k|            _tr_tally_dist(s, s->strstart - 1 - s->prev_match,
  ------------------
  |  |  366|   185k|  { uch len = (uch)(length); \
  |  |  367|   185k|    ush dist = (ush)(distance); \
  |  |  368|   185k|    s->sym_buf[s->sym_next++] = (uch)dist; \
  |  |  369|   185k|    s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \
  |  |  370|   185k|    s->sym_buf[s->sym_next++] = len; \
  |  |  371|   185k|    dist--; \
  |  |  372|   185k|    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
  |  |  ------------------
  |  |  |  |   37|   185k|#define LITERALS  256
  |  |  ------------------
  |  |                   s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
  |  |  ------------------
  |  |  |  |   83|   185k|#define Freq fc.freq
  |  |  ------------------
  |  |  373|   185k|    s->dyn_dtree[d_code(dist)].Freq++; \
  |  |  ------------------
  |  |  |  |  321|   185k|   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 140k, False: 44.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   s->dyn_dtree[d_code(dist)].Freq++; \
  |  |  ------------------
  |  |  |  |   83|   185k|#define Freq fc.freq
  |  |  ------------------
  |  |  374|   185k|    flush = (s->sym_next == s->sym_end); \
  |  |  375|   185k|  }
  ------------------
 2056|   185k|                           s->prev_length - MIN_MATCH, bflush);
 2057|       |
 2058|       |            /* Insert in hash table all strings up to the end of the match.
 2059|       |             * strstart - 1 and strstart are already inserted. If there is not
 2060|       |             * enough lookahead, the last two strings are not inserted in
 2061|       |             * the hash table.
 2062|       |             */
 2063|   185k|            s->lookahead -= s->prev_length - 1;
 2064|   185k|            s->prev_length -= 2;
 2065|  4.01M|            do {
 2066|  4.01M|                if (++s->strstart <= max_insert) {
  ------------------
  |  Branch (2066:21): [True: 4.01M, False: 1.06k]
  ------------------
 2067|  4.01M|                    INSERT_STRING(s, s->strstart, hash_head);
  ------------------
  |  |  161|  4.01M|   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
  |  |  ------------------
  |  |  |  |  141|  4.01M|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  |  |  ------------------
  |  |  162|  4.01M|    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
  |  |  163|  4.01M|    s->head[s->ins_h] = (Pos)(str))
  ------------------
 2068|  4.01M|                }
 2069|  4.01M|            } while (--s->prev_length != 0);
  ------------------
  |  Branch (2069:22): [True: 3.83M, False: 185k]
  ------------------
 2070|   185k|            s->match_available = 0;
 2071|   185k|            s->match_length = MIN_MATCH-1;
  ------------------
  |  |   92|   185k|#define MIN_MATCH  3
  ------------------
 2072|   185k|            s->strstart++;
 2073|       |
 2074|   185k|            if (bflush) FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1671|    791|#define FLUSH_BLOCK(s, last) { \
  |  | 1672|    791|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1659|    791|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1660|    791|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1660:24): [True: 636, False: 155]
  |  |  |  |  ------------------
  |  |  |  | 1661|    791|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1662|    791|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    155|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1663|    791|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1664|    791|                (last)); \
  |  |  |  | 1665|    791|   s->block_start = s->strstart; \
  |  |  |  | 1666|    791|   flush_pending(s->strm); \
  |  |  |  | 1667|    791|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1668|    791|}
  |  |  ------------------
  |  | 1673|    791|   if (s->strm->avail_out == 0) { \
  |  |  ------------------
  |  |  |  Branch (1673:8): [True: 0, False: 791]
  |  |  ------------------
  |  | 1674|      0|      if (!(last)) return need_more; \
  |  |  ------------------
  |  |  |  Branch (1674:11): [True: 0, Folded]
  |  |  ------------------
  |  | 1675|      0|      if (s->pending != 0 || s->wrap != 0) return finish_started; \
  |  |  ------------------
  |  |  |  Branch (1675:11): [True: 0, False: 0]
  |  |  |  Branch (1675:30): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|   } \
  |  | 1677|    791|}
  ------------------
  |  Branch (2074:17): [True: 791, False: 184k]
  ------------------
 2075|       |
 2076|  2.10M|        } else if (s->match_available) {
  ------------------
  |  Branch (2076:20): [True: 1.92M, False: 185k]
  ------------------
 2077|       |            /* If there was no match at the previous position, output a
 2078|       |             * single literal. If there was a match but the current match
 2079|       |             * is longer, truncate the previous match to a single literal.
 2080|       |             */
 2081|  1.92M|            Tracevv((stderr,"%c", s->window[s->strstart - 1]));
 2082|  1.92M|            _tr_tally_lit(s, s->window[s->strstart - 1], bflush);
  ------------------
  |  |  358|  1.92M|  { uch cc = (c); \
  |  |  359|  1.92M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  360|  1.92M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  361|  1.92M|    s->sym_buf[s->sym_next++] = cc; \
  |  |  362|  1.92M|    s->dyn_ltree[cc].Freq++; \
  |  |  ------------------
  |  |  |  |   83|  1.92M|#define Freq fc.freq
  |  |  ------------------
  |  |  363|  1.92M|    flush = (s->sym_next == s->sym_end); \
  |  |  364|  1.92M|   }
  ------------------
 2083|  1.92M|            if (bflush) {
  ------------------
  |  Branch (2083:17): [True: 4.28k, False: 1.91M]
  ------------------
 2084|  4.28k|                FLUSH_BLOCK_ONLY(s, 0);
  ------------------
  |  | 1659|  4.28k|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  | 1660|  4.28k|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  ------------------
  |  |  |  Branch (1660:24): [True: 3.62k, False: 662]
  |  |  ------------------
  |  | 1661|  4.28k|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  | 1662|  4.28k|                   (charf *)Z_NULL), \
  |  |  ------------------
  |  |  |  |  216|    662|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  ------------------
  |  | 1663|  4.28k|                (ulg)((long)s->strstart - s->block_start), \
  |  | 1664|  4.28k|                (last)); \
  |  | 1665|  4.28k|   s->block_start = s->strstart; \
  |  | 1666|  4.28k|   flush_pending(s->strm); \
  |  | 1667|  4.28k|   Tracev((stderr,"[FLUSH]")); \
  |  | 1668|  4.28k|}
  ------------------
 2085|  4.28k|            }
 2086|  1.92M|            s->strstart++;
 2087|  1.92M|            s->lookahead--;
 2088|  1.92M|            if (s->strm->avail_out == 0) return need_more;
  ------------------
  |  Branch (2088:17): [True: 0, False: 1.92M]
  ------------------
 2089|  1.92M|        } else {
 2090|       |            /* There is no previous match to compare with, wait for
 2091|       |             * the next step to decide.
 2092|       |             */
 2093|   185k|            s->match_available = 1;
 2094|   185k|            s->strstart++;
 2095|   185k|            s->lookahead--;
 2096|   185k|        }
 2097|  2.29M|    }
 2098|  1.26k|    Assert (flush != Z_NO_FLUSH, "no flush?");
 2099|  1.26k|    if (s->match_available) {
  ------------------
  |  Branch (2099:9): [True: 714, False: 553]
  ------------------
 2100|    714|        Tracevv((stderr,"%c", s->window[s->strstart - 1]));
 2101|    714|        _tr_tally_lit(s, s->window[s->strstart - 1], bflush);
  ------------------
  |  |  358|    714|  { uch cc = (c); \
  |  |  359|    714|    s->sym_buf[s->sym_next++] = 0; \
  |  |  360|    714|    s->sym_buf[s->sym_next++] = 0; \
  |  |  361|    714|    s->sym_buf[s->sym_next++] = cc; \
  |  |  362|    714|    s->dyn_ltree[cc].Freq++; \
  |  |  ------------------
  |  |  |  |   83|    714|#define Freq fc.freq
  |  |  ------------------
  |  |  363|    714|    flush = (s->sym_next == s->sym_end); \
  |  |  364|    714|   }
  ------------------
 2102|    714|        s->match_available = 0;
 2103|    714|    }
 2104|  1.26k|    s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
  ------------------
  |  |   92|  1.26k|#define MIN_MATCH  3
  ------------------
                  s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
  ------------------
  |  |   92|  1.26k|#define MIN_MATCH  3
  ------------------
  |  Branch (2104:17): [True: 1, False: 1.26k]
  ------------------
 2105|  1.26k|    if (flush == Z_FINISH) {
  ------------------
  |  |  176|  1.26k|#define Z_FINISH        4
  ------------------
  |  Branch (2105:9): [True: 1.26k, False: 0]
  ------------------
 2106|  1.26k|        FLUSH_BLOCK(s, 1);
  ------------------
  |  | 1671|  1.26k|#define FLUSH_BLOCK(s, last) { \
  |  | 1672|  1.26k|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1659|  1.26k|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1660|  1.26k|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1660:24): [True: 1.06k, False: 207]
  |  |  |  |  ------------------
  |  |  |  | 1661|  1.26k|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1662|  1.26k|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    207|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1663|  1.26k|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1664|  1.26k|                (last)); \
  |  |  |  | 1665|  1.26k|   s->block_start = s->strstart; \
  |  |  |  | 1666|  1.26k|   flush_pending(s->strm); \
  |  |  |  | 1667|  1.26k|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1668|  1.26k|}
  |  |  ------------------
  |  | 1673|  1.26k|   if (s->strm->avail_out == 0) { \
  |  |  ------------------
  |  |  |  Branch (1673:8): [True: 0, False: 1.26k]
  |  |  ------------------
  |  | 1674|      0|      if (!(last)) return need_more; \
  |  |  ------------------
  |  |  |  Branch (1674:11): [Folded, False: 0]
  |  |  ------------------
  |  | 1675|      0|      if (s->pending != 0 || s->wrap != 0) return finish_started; \
  |  |  ------------------
  |  |  |  Branch (1675:11): [True: 0, False: 0]
  |  |  |  Branch (1675:30): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|   } \
  |  | 1677|  1.26k|}
  ------------------
 2107|  1.26k|        return finish_done;
 2108|  1.26k|    }
 2109|      0|    if (s->sym_next)
  ------------------
  |  Branch (2109:9): [True: 0, False: 0]
  ------------------
 2110|      0|        FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1671|      0|#define FLUSH_BLOCK(s, last) { \
  |  | 1672|      0|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1659|      0|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1660|      0|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1660:24): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1661|      0|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1662|      0|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1663|      0|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1664|      0|                (last)); \
  |  |  |  | 1665|      0|   s->block_start = s->strstart; \
  |  |  |  | 1666|      0|   flush_pending(s->strm); \
  |  |  |  | 1667|      0|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1668|      0|}
  |  |  ------------------
  |  | 1673|      0|   if (s->strm->avail_out == 0) { \
  |  |  ------------------
  |  |  |  Branch (1673:8): [True: 0, False: 0]
  |  |  ------------------
  |  | 1674|      0|      if (!(last)) return need_more; \
  |  |  ------------------
  |  |  |  Branch (1674:11): [True: 0, Folded]
  |  |  ------------------
  |  | 1675|      0|      if (s->pending != 0 || s->wrap != 0) return finish_started; \
  |  |  ------------------
  |  |  |  Branch (1675:11): [True: 0, False: 0]
  |  |  |  Branch (1675:30): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|   } \
  |  | 1677|      0|}
  ------------------
 2111|      0|    return block_done;
 2112|      0|}
deflate.c:slide_hash:
  187|  18.6k|local void slide_hash(deflate_state *s) {
  188|  18.6k|    unsigned n, m;
  189|  18.6k|    Posf *p;
  190|  18.6k|    uInt wsize = s->w_size;
  191|       |
  192|  18.6k|    n = s->hash_size;
  193|  18.6k|    p = &s->head[n];
  194|   352M|    do {
  195|   352M|        m = *--p;
  196|   352M|        *p = (Pos)(m >= wsize ? m - wsize : NIL);
  ------------------
  |  |   85|   351M|#define NIL 0
  ------------------
  |  Branch (196:20): [True: 1.38M, False: 351M]
  ------------------
  197|   352M|    } while (--n);
  ------------------
  |  Branch (197:14): [True: 352M, False: 18.6k]
  ------------------
  198|  18.6k|#ifndef FASTEST
  199|  18.6k|    n = wsize;
  200|  18.6k|    p = &s->prev[n];
  201|  13.2M|    do {
  202|  13.2M|        m = *--p;
  203|  13.2M|        *p = (Pos)(m >= wsize ? m - wsize : NIL);
  ------------------
  |  |   85|  10.3M|#define NIL 0
  ------------------
  |  Branch (203:20): [True: 2.92M, False: 10.3M]
  ------------------
  204|       |        /* If n is not on any hash chain, prev[n] is garbage but
  205|       |         * its value will never be used.
  206|       |         */
  207|  13.2M|    } while (--n);
  ------------------
  |  Branch (207:14): [True: 13.2M, False: 18.6k]
  ------------------
  208|  18.6k|#endif
  209|  18.6k|    s->slid = 1;
  210|  18.6k|}
deflate.c:flush_pending:
  969|  36.2k|local void flush_pending(z_streamp strm) {
  970|  36.2k|    unsigned len;
  971|  36.2k|    deflate_state *s = strm->state;
  972|       |
  973|  36.2k|    _tr_flush_bits(s);
  974|  36.2k|    len = s->pending > strm->avail_out ? strm->avail_out :
  ------------------
  |  Branch (974:11): [True: 0, False: 36.2k]
  ------------------
  975|  36.2k|                                         (unsigned)s->pending;
  976|  36.2k|    if (len == 0) return;
  ------------------
  |  Branch (976:9): [True: 0, False: 36.2k]
  ------------------
  977|       |
  978|  36.2k|    zmemcpy(strm->next_out, s->pending_out, len);
  ------------------
  |  |  216|  36.2k|#    define zmemcpy memcpy
  ------------------
  979|  36.2k|    strm->next_out  += len;
  980|  36.2k|    s->pending_out  += len;
  981|  36.2k|    strm->total_out += len;
  982|  36.2k|    strm->avail_out -= len;
  983|  36.2k|    s->pending      -= len;
  984|  36.2k|    if (s->pending == 0) {
  ------------------
  |  Branch (984:9): [True: 36.2k, False: 0]
  ------------------
  985|  36.2k|        s->pending_out = s->pending_buf;
  986|  36.2k|    }
  987|  36.2k|}
deflate.c:putShortMSB:
  958|  18.8k|local void putShortMSB(deflate_state *s, uInt b) {
  959|  18.8k|    put_byte(s, (Byte)(b >> 8));
  ------------------
  |  |  293|  18.8k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
  960|  18.8k|    put_byte(s, (Byte)(b & 0xff));
  ------------------
  |  |  293|  18.8k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
  961|  18.8k|}
deflate.c:deflate_rle:
 2120|    841|local block_state deflate_rle(deflate_state *s, int flush) {
 2121|    841|    int bflush;             /* set if current block must be flushed */
 2122|    841|    uInt prev;              /* byte at distance one to match */
 2123|    841|    Bytef *scan, *strend;   /* scan goes up to strend for length of run */
 2124|       |
 2125|  2.32M|    for (;;) {
 2126|       |        /* Make sure that we always have enough lookahead, except
 2127|       |         * at the end of the input file. We need MAX_MATCH bytes
 2128|       |         * for the longest run, plus one for the unrolled loop.
 2129|       |         */
 2130|  2.32M|        if (s->lookahead <= MAX_MATCH) {
  ------------------
  |  |   93|  2.32M|#define MAX_MATCH  258
  ------------------
  |  Branch (2130:13): [True: 88.3k, False: 2.23M]
  ------------------
 2131|  88.3k|            fill_window(s);
 2132|  88.3k|            if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) {
  ------------------
  |  |   93|   176k|#define MAX_MATCH  258
  ------------------
                          if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) {
  ------------------
  |  |  172|  84.3k|#define Z_NO_FLUSH      0
  ------------------
  |  Branch (2132:17): [True: 84.3k, False: 3.98k]
  |  Branch (2132:46): [True: 0, False: 84.3k]
  ------------------
 2133|      0|                return need_more;
 2134|      0|            }
 2135|  88.3k|            if (s->lookahead == 0) break; /* flush the current block */
  ------------------
  |  Branch (2135:17): [True: 841, False: 87.5k]
  ------------------
 2136|  88.3k|        }
 2137|       |
 2138|       |        /* See how many times the previous byte repeats */
 2139|  2.32M|        s->match_length = 0;
 2140|  2.32M|        if (s->lookahead >= MIN_MATCH && s->strstart > 0) {
  ------------------
  |  |   92|  4.65M|#define MIN_MATCH  3
  ------------------
  |  Branch (2140:13): [True: 2.32M, False: 1.16k]
  |  Branch (2140:42): [True: 2.32M, False: 0]
  ------------------
 2141|  2.32M|            scan = s->window + s->strstart - 1;
 2142|  2.32M|            prev = *scan;
 2143|  2.32M|            if (prev == *++scan && prev == *++scan && prev == *++scan) {
  ------------------
  |  Branch (2143:17): [True: 149k, False: 2.17M]
  |  Branch (2143:36): [True: 66.4k, False: 83.1k]
  |  Branch (2143:55): [True: 48.1k, False: 18.2k]
  ------------------
 2144|  48.1k|                strend = s->window + s->strstart + MAX_MATCH;
  ------------------
  |  |   93|  48.1k|#define MAX_MATCH  258
  ------------------
 2145|   265k|                do {
 2146|   265k|                } while (prev == *++scan && prev == *++scan &&
  ------------------
  |  Branch (2146:26): [True: 250k, False: 14.9k]
  |  Branch (2146:45): [True: 244k, False: 6.14k]
  ------------------
 2147|   244k|                         prev == *++scan && prev == *++scan &&
  ------------------
  |  Branch (2147:26): [True: 239k, False: 5.53k]
  |  Branch (2147:45): [True: 235k, False: 4.01k]
  ------------------
 2148|   235k|                         prev == *++scan && prev == *++scan &&
  ------------------
  |  Branch (2148:26): [True: 232k, False: 3.17k]
  |  Branch (2148:45): [True: 228k, False: 3.38k]
  ------------------
 2149|   228k|                         prev == *++scan && prev == *++scan &&
  ------------------
  |  Branch (2149:26): [True: 226k, False: 2.61k]
  |  Branch (2149:45): [True: 222k, False: 3.46k]
  ------------------
 2150|   222k|                         scan < strend);
  ------------------
  |  Branch (2150:26): [True: 217k, False: 4.82k]
  ------------------
 2151|  48.1k|                s->match_length = MAX_MATCH - (uInt)(strend - scan);
  ------------------
  |  |   93|  48.1k|#define MAX_MATCH  258
  ------------------
 2152|  48.1k|                if (s->match_length > s->lookahead)
  ------------------
  |  Branch (2152:21): [True: 53, False: 48.0k]
  ------------------
 2153|     53|                    s->match_length = s->lookahead;
 2154|  48.1k|            }
 2155|  2.32M|            Assert(scan <= s->window + (uInt)(s->window_size - 1),
 2156|  2.32M|                   "wild scan");
 2157|  2.32M|        }
 2158|       |
 2159|       |        /* Emit match if have run of MIN_MATCH or longer, else emit literal */
 2160|  2.32M|        if (s->match_length >= MIN_MATCH) {
  ------------------
  |  |   92|  2.32M|#define MIN_MATCH  3
  ------------------
  |  Branch (2160:13): [True: 48.1k, False: 2.27M]
  ------------------
 2161|  48.1k|            check_match(s, s->strstart, s->strstart - 1, (int)s->match_length);
 2162|       |
 2163|  48.1k|            _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush);
  ------------------
  |  |  366|  48.1k|  { uch len = (uch)(length); \
  |  |  367|  48.1k|    ush dist = (ush)(distance); \
  |  |  368|  48.1k|    s->sym_buf[s->sym_next++] = (uch)dist; \
  |  |  369|  48.1k|    s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \
  |  |  370|  48.1k|    s->sym_buf[s->sym_next++] = len; \
  |  |  371|  48.1k|    dist--; \
  |  |  372|  48.1k|    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
  |  |  ------------------
  |  |  |  |   37|  48.1k|#define LITERALS  256
  |  |  ------------------
  |  |                   s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
  |  |  ------------------
  |  |  |  |   83|  48.1k|#define Freq fc.freq
  |  |  ------------------
  |  |  373|  48.1k|    s->dyn_dtree[d_code(dist)].Freq++; \
  |  |  ------------------
  |  |  |  |  321|  48.1k|   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 48.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   s->dyn_dtree[d_code(dist)].Freq++; \
  |  |  ------------------
  |  |  |  |   83|  48.1k|#define Freq fc.freq
  |  |  ------------------
  |  |  374|  48.1k|    flush = (s->sym_next == s->sym_end); \
  |  |  375|  48.1k|  }
  ------------------
 2164|       |
 2165|  48.1k|            s->lookahead -= s->match_length;
 2166|  48.1k|            s->strstart += s->match_length;
 2167|  48.1k|            s->match_length = 0;
 2168|  2.27M|        } else {
 2169|       |            /* No match, output a literal byte */
 2170|  2.27M|            Tracevv((stderr,"%c", s->window[s->strstart]));
 2171|  2.27M|            _tr_tally_lit(s, s->window[s->strstart], bflush);
  ------------------
  |  |  358|  2.27M|  { uch cc = (c); \
  |  |  359|  2.27M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  360|  2.27M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  361|  2.27M|    s->sym_buf[s->sym_next++] = cc; \
  |  |  362|  2.27M|    s->dyn_ltree[cc].Freq++; \
  |  |  ------------------
  |  |  |  |   83|  2.27M|#define Freq fc.freq
  |  |  ------------------
  |  |  363|  2.27M|    flush = (s->sym_next == s->sym_end); \
  |  |  364|  2.27M|   }
  ------------------
 2172|  2.27M|            s->lookahead--;
 2173|  2.27M|            s->strstart++;
 2174|  2.27M|        }
 2175|  2.32M|        if (bflush) FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1671|  3.33k|#define FLUSH_BLOCK(s, last) { \
  |  | 1672|  3.33k|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1659|  3.33k|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1660|  3.33k|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1660:24): [True: 2.66k, False: 671]
  |  |  |  |  ------------------
  |  |  |  | 1661|  3.33k|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1662|  3.33k|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    671|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1663|  3.33k|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1664|  3.33k|                (last)); \
  |  |  |  | 1665|  3.33k|   s->block_start = s->strstart; \
  |  |  |  | 1666|  3.33k|   flush_pending(s->strm); \
  |  |  |  | 1667|  3.33k|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1668|  3.33k|}
  |  |  ------------------
  |  | 1673|  3.33k|   if (s->strm->avail_out == 0) { \
  |  |  ------------------
  |  |  |  Branch (1673:8): [True: 0, False: 3.33k]
  |  |  ------------------
  |  | 1674|      0|      if (!(last)) return need_more; \
  |  |  ------------------
  |  |  |  Branch (1674:11): [True: 0, Folded]
  |  |  ------------------
  |  | 1675|      0|      if (s->pending != 0 || s->wrap != 0) return finish_started; \
  |  |  ------------------
  |  |  |  Branch (1675:11): [True: 0, False: 0]
  |  |  |  Branch (1675:30): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|   } \
  |  | 1677|  3.33k|}
  ------------------
  |  Branch (2175:13): [True: 3.33k, False: 2.32M]
  ------------------
 2176|  2.32M|    }
 2177|    841|    s->insert = 0;
 2178|    841|    if (flush == Z_FINISH) {
  ------------------
  |  |  176|    841|#define Z_FINISH        4
  ------------------
  |  Branch (2178:9): [True: 841, False: 0]
  ------------------
 2179|    841|        FLUSH_BLOCK(s, 1);
  ------------------
  |  | 1671|    841|#define FLUSH_BLOCK(s, last) { \
  |  | 1672|    841|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1659|    841|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1660|    841|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1660:24): [True: 736, False: 105]
  |  |  |  |  ------------------
  |  |  |  | 1661|    841|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1662|    841|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    105|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1663|    841|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1664|    841|                (last)); \
  |  |  |  | 1665|    841|   s->block_start = s->strstart; \
  |  |  |  | 1666|    841|   flush_pending(s->strm); \
  |  |  |  | 1667|    841|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1668|    841|}
  |  |  ------------------
  |  | 1673|    841|   if (s->strm->avail_out == 0) { \
  |  |  ------------------
  |  |  |  Branch (1673:8): [True: 0, False: 841]
  |  |  ------------------
  |  | 1674|      0|      if (!(last)) return need_more; \
  |  |  ------------------
  |  |  |  Branch (1674:11): [Folded, False: 0]
  |  |  ------------------
  |  | 1675|      0|      if (s->pending != 0 || s->wrap != 0) return finish_started; \
  |  |  ------------------
  |  |  |  Branch (1675:11): [True: 0, False: 0]
  |  |  |  Branch (1675:30): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|   } \
  |  | 1677|    841|}
  ------------------
 2180|    841|        return finish_done;
 2181|    841|    }
 2182|      0|    if (s->sym_next)
  ------------------
  |  Branch (2182:9): [True: 0, False: 0]
  ------------------
 2183|      0|        FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1671|      0|#define FLUSH_BLOCK(s, last) { \
  |  | 1672|      0|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1659|      0|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1660|      0|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1660:24): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1661|      0|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1662|      0|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1663|      0|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1664|      0|                (last)); \
  |  |  |  | 1665|      0|   s->block_start = s->strstart; \
  |  |  |  | 1666|      0|   flush_pending(s->strm); \
  |  |  |  | 1667|      0|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1668|      0|}
  |  |  ------------------
  |  | 1673|      0|   if (s->strm->avail_out == 0) { \
  |  |  ------------------
  |  |  |  Branch (1673:8): [True: 0, False: 0]
  |  |  ------------------
  |  | 1674|      0|      if (!(last)) return need_more; \
  |  |  ------------------
  |  |  |  Branch (1674:11): [True: 0, Folded]
  |  |  ------------------
  |  | 1675|      0|      if (s->pending != 0 || s->wrap != 0) return finish_started; \
  |  |  ------------------
  |  |  |  Branch (1675:11): [True: 0, False: 0]
  |  |  |  Branch (1675:30): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|   } \
  |  | 1677|      0|}
  ------------------
 2184|      0|    return block_done;
 2185|      0|}
deflate.c:deflate_huff:
 2191|  1.00k|local block_state deflate_huff(deflate_state *s, int flush) {
 2192|  1.00k|    int bflush;             /* set if current block must be flushed */
 2193|       |
 2194|  5.30M|    for (;;) {
 2195|       |        /* Make sure that we have a literal to write. */
 2196|  5.30M|        if (s->lookahead == 0) {
  ------------------
  |  Branch (2196:13): [True: 6.71k, False: 5.29M]
  ------------------
 2197|  6.71k|            fill_window(s);
 2198|  6.71k|            if (s->lookahead == 0) {
  ------------------
  |  Branch (2198:17): [True: 1.00k, False: 5.71k]
  ------------------
 2199|  1.00k|                if (flush == Z_NO_FLUSH)
  ------------------
  |  |  172|  1.00k|#define Z_NO_FLUSH      0
  ------------------
  |  Branch (2199:21): [True: 0, False: 1.00k]
  ------------------
 2200|      0|                    return need_more;
 2201|  1.00k|                break;      /* flush the current block */
 2202|  1.00k|            }
 2203|  6.71k|        }
 2204|       |
 2205|       |        /* Output a literal byte */
 2206|  5.30M|        s->match_length = 0;
 2207|  5.30M|        Tracevv((stderr,"%c", s->window[s->strstart]));
 2208|  5.30M|        _tr_tally_lit(s, s->window[s->strstart], bflush);
  ------------------
  |  |  358|  5.30M|  { uch cc = (c); \
  |  |  359|  5.30M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  360|  5.30M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  361|  5.30M|    s->sym_buf[s->sym_next++] = cc; \
  |  |  362|  5.30M|    s->dyn_ltree[cc].Freq++; \
  |  |  ------------------
  |  |  |  |   83|  5.30M|#define Freq fc.freq
  |  |  ------------------
  |  |  363|  5.30M|    flush = (s->sym_next == s->sym_end); \
  |  |  364|  5.30M|   }
  ------------------
 2209|  5.30M|        s->lookahead--;
 2210|  5.30M|        s->strstart++;
 2211|  5.30M|        if (bflush) FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1671|  13.5k|#define FLUSH_BLOCK(s, last) { \
  |  | 1672|  13.5k|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1659|  13.5k|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1660|  13.5k|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1660:24): [True: 12.6k, False: 920]
  |  |  |  |  ------------------
  |  |  |  | 1661|  13.5k|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1662|  13.5k|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    920|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1663|  13.5k|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1664|  13.5k|                (last)); \
  |  |  |  | 1665|  13.5k|   s->block_start = s->strstart; \
  |  |  |  | 1666|  13.5k|   flush_pending(s->strm); \
  |  |  |  | 1667|  13.5k|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1668|  13.5k|}
  |  |  ------------------
  |  | 1673|  13.5k|   if (s->strm->avail_out == 0) { \
  |  |  ------------------
  |  |  |  Branch (1673:8): [True: 0, False: 13.5k]
  |  |  ------------------
  |  | 1674|      0|      if (!(last)) return need_more; \
  |  |  ------------------
  |  |  |  Branch (1674:11): [True: 0, Folded]
  |  |  ------------------
  |  | 1675|      0|      if (s->pending != 0 || s->wrap != 0) return finish_started; \
  |  |  ------------------
  |  |  |  Branch (1675:11): [True: 0, False: 0]
  |  |  |  Branch (1675:30): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|   } \
  |  | 1677|  13.5k|}
  ------------------
  |  Branch (2211:13): [True: 13.5k, False: 5.28M]
  ------------------
 2212|  5.30M|    }
 2213|  1.00k|    s->insert = 0;
 2214|  1.00k|    if (flush == Z_FINISH) {
  ------------------
  |  |  176|  1.00k|#define Z_FINISH        4
  ------------------
  |  Branch (2214:9): [True: 1.00k, False: 0]
  ------------------
 2215|  1.00k|        FLUSH_BLOCK(s, 1);
  ------------------
  |  | 1671|  1.00k|#define FLUSH_BLOCK(s, last) { \
  |  | 1672|  1.00k|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1659|  1.00k|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1660|  1.00k|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1660:24): [True: 894, False: 108]
  |  |  |  |  ------------------
  |  |  |  | 1661|  1.00k|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1662|  1.00k|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    108|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1663|  1.00k|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1664|  1.00k|                (last)); \
  |  |  |  | 1665|  1.00k|   s->block_start = s->strstart; \
  |  |  |  | 1666|  1.00k|   flush_pending(s->strm); \
  |  |  |  | 1667|  1.00k|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1668|  1.00k|}
  |  |  ------------------
  |  | 1673|  1.00k|   if (s->strm->avail_out == 0) { \
  |  |  ------------------
  |  |  |  Branch (1673:8): [True: 0, False: 1.00k]
  |  |  ------------------
  |  | 1674|      0|      if (!(last)) return need_more; \
  |  |  ------------------
  |  |  |  Branch (1674:11): [Folded, False: 0]
  |  |  ------------------
  |  | 1675|      0|      if (s->pending != 0 || s->wrap != 0) return finish_started; \
  |  |  ------------------
  |  |  |  Branch (1675:11): [True: 0, False: 0]
  |  |  |  Branch (1675:30): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|   } \
  |  | 1677|  1.00k|}
  ------------------
 2216|  1.00k|        return finish_done;
 2217|  1.00k|    }
 2218|      0|    if (s->sym_next)
  ------------------
  |  Branch (2218:9): [True: 0, False: 0]
  ------------------
 2219|      0|        FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1671|      0|#define FLUSH_BLOCK(s, last) { \
  |  | 1672|      0|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1659|      0|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1660|      0|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1660:24): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1661|      0|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1662|      0|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1663|      0|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1664|      0|                (last)); \
  |  |  |  | 1665|      0|   s->block_start = s->strstart; \
  |  |  |  | 1666|      0|   flush_pending(s->strm); \
  |  |  |  | 1667|      0|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1668|      0|}
  |  |  ------------------
  |  | 1673|      0|   if (s->strm->avail_out == 0) { \
  |  |  ------------------
  |  |  |  Branch (1673:8): [True: 0, False: 0]
  |  |  ------------------
  |  | 1674|      0|      if (!(last)) return need_more; \
  |  |  ------------------
  |  |  |  Branch (1674:11): [True: 0, Folded]
  |  |  ------------------
  |  | 1675|      0|      if (s->pending != 0 || s->wrap != 0) return finish_started; \
  |  |  ------------------
  |  |  |  Branch (1675:11): [True: 0, False: 0]
  |  |  |  Branch (1675:30): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|   } \
  |  | 1677|      0|}
  ------------------
 2220|      0|    return block_done;
 2221|      0|}

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

inflateResetKeep:
  100|  3.87k|int ZEXPORT inflateResetKeep(z_streamp strm) {
  101|  3.87k|    struct inflate_state FAR *state;
  102|       |
  103|  3.87k|    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (103:9): [True: 0, False: 3.87k]
  ------------------
  104|  3.87k|    state = (struct inflate_state FAR *)strm->state;
  105|  3.87k|    strm->total_in = strm->total_out = state->total = 0;
  106|  3.87k|    strm->msg = Z_NULL;
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  107|  3.87k|    strm->data_type = 0;
  108|  3.87k|    if (state->wrap)        /* to support ill-conceived Java test suite */
  ------------------
  |  Branch (108:9): [True: 3.87k, False: 0]
  ------------------
  109|  3.87k|        strm->adler = state->wrap & 1;
  110|  3.87k|    state->mode = HEAD;
  111|  3.87k|    state->last = 0;
  112|  3.87k|    state->havedict = 0;
  113|  3.87k|    state->flags = -1;
  114|  3.87k|    state->dmax = 32768U;
  115|  3.87k|    state->head = Z_NULL;
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  116|  3.87k|    state->hold = 0;
  117|  3.87k|    state->bits = 0;
  118|  3.87k|    state->lencode = state->distcode = state->next = state->codes;
  119|  3.87k|    state->sane = 1;
  120|  3.87k|    state->back = -1;
  121|  3.87k|    Tracev((stderr, "inflate: reset\n"));
  122|  3.87k|    return Z_OK;
  ------------------
  |  |  181|  3.87k|#define Z_OK            0
  ------------------
  123|  3.87k|}
inflateReset:
  125|  3.87k|int ZEXPORT inflateReset(z_streamp strm) {
  126|  3.87k|    struct inflate_state FAR *state;
  127|       |
  128|  3.87k|    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (128:9): [True: 0, False: 3.87k]
  ------------------
  129|  3.87k|    state = (struct inflate_state FAR *)strm->state;
  130|  3.87k|    if (state->wbits != state->reqbits) {
  ------------------
  |  Branch (130:9): [True: 0, False: 3.87k]
  ------------------
  131|      0|        if (state->window != Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (131:13): [True: 0, False: 0]
  ------------------
  132|      0|            ZFREE(strm, state->window);
  ------------------
  |  |  254|      0|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
  133|      0|            state->window = Z_NULL;
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  134|      0|        }
  135|      0|        state->wbits = state->reqbits;
  136|      0|    }
  137|  3.87k|    state->wrap = state->reqwrap;
  138|  3.87k|    state->wsize = 0;
  139|  3.87k|    state->whave = 0;
  140|  3.87k|    state->wnext = 0;
  141|  3.87k|    return inflateResetKeep(strm);
  142|  3.87k|}
inflateReset2:
  144|  3.87k|int ZEXPORT inflateReset2(z_streamp strm, int windowBits) {
  145|  3.87k|    int wrap;
  146|  3.87k|    struct inflate_state FAR *state;
  147|       |
  148|       |    /* get the state */
  149|  3.87k|    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (149:9): [True: 0, False: 3.87k]
  ------------------
  150|  3.87k|    state = (struct inflate_state FAR *)strm->state;
  151|       |
  152|       |    /* extract wrap request from windowBits parameter */
  153|  3.87k|    if (windowBits < 0) {
  ------------------
  |  Branch (153:9): [True: 0, False: 3.87k]
  ------------------
  154|      0|        if (windowBits < -15)
  ------------------
  |  Branch (154:13): [True: 0, False: 0]
  ------------------
  155|      0|            return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  156|      0|        wrap = 0;
  157|      0|        windowBits = -windowBits;
  158|      0|    }
  159|  3.87k|    else {
  160|  3.87k|        wrap = (windowBits >> 4) + 5;
  161|  3.87k|#ifdef GUNZIP
  162|  3.87k|        if (windowBits < 48)
  ------------------
  |  Branch (162:13): [True: 3.87k, False: 0]
  ------------------
  163|  3.87k|            windowBits &= 15;
  164|  3.87k|#endif
  165|  3.87k|    }
  166|       |
  167|       |    /* set number of window bits, free window if different */
  168|  3.87k|    if (windowBits && (windowBits < 8 || windowBits > 15))
  ------------------
  |  Branch (168:9): [True: 3.87k, False: 0]
  |  Branch (168:24): [True: 0, False: 3.87k]
  |  Branch (168:42): [True: 0, False: 3.87k]
  ------------------
  169|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  170|  3.87k|    if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) {
  ------------------
  |  |  216|  7.74k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (170:9): [True: 0, False: 3.87k]
  |  Branch (170:36): [True: 0, False: 0]
  ------------------
  171|      0|        ZFREE(strm, state->window);
  ------------------
  |  |  254|      0|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
  172|      0|        state->window = Z_NULL;
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  173|      0|    }
  174|       |
  175|       |    /* update state and reset the rest of it */
  176|  3.87k|    state->reqwrap = state->wrap = wrap;
  177|  3.87k|    state->reqbits = state->wbits = (unsigned)windowBits;
  178|  3.87k|    return inflateReset(strm);
  179|  3.87k|}
inflateInit2_:
  182|  3.87k|                          const char *version, int stream_size) {
  183|  3.87k|    int ret;
  184|  3.87k|    struct inflate_state FAR *state;
  185|       |
  186|  3.87k|    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
  ------------------
  |  |  216|  7.74k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
  ------------------
  |  |   44|  3.87k|#define ZLIB_VERSION "1.4"
  ------------------
  |  Branch (186:9): [True: 0, False: 3.87k]
  |  Branch (186:30): [True: 0, False: 3.87k]
  ------------------
  187|  3.87k|        stream_size != (int)(sizeof(z_stream)))
  ------------------
  |  Branch (187:9): [True: 0, False: 3.87k]
  ------------------
  188|      0|        return Z_VERSION_ERROR;
  ------------------
  |  |  189|      0|#define Z_VERSION_ERROR (-6)
  ------------------
  189|  3.87k|    if (strm == Z_NULL) return Z_STREAM_ERROR;
  ------------------
  |  |  216|  3.87k|#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 (189:9): [True: 0, False: 3.87k]
  ------------------
  190|  3.87k|    strm->msg = Z_NULL;                 /* in case we return an error */
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  191|  3.87k|    if (strm->zalloc == (alloc_func)0) {
  ------------------
  |  Branch (191:9): [True: 3.87k, False: 0]
  ------------------
  192|       |#ifdef Z_SOLO
  193|       |        return Z_STREAM_ERROR;
  194|       |#else
  195|  3.87k|        strm->zalloc = zcalloc;
  196|  3.87k|        strm->opaque = (voidpf)0;
  197|  3.87k|#endif
  198|  3.87k|    }
  199|  3.87k|    if (strm->zfree == (free_func)0)
  ------------------
  |  Branch (199:9): [True: 3.87k, False: 0]
  ------------------
  200|       |#ifdef Z_SOLO
  201|       |        return Z_STREAM_ERROR;
  202|       |#else
  203|  3.87k|        strm->zfree = zcfree;
  204|  3.87k|#endif
  205|  3.87k|    state = (struct inflate_state FAR *)
  206|  3.87k|            ZALLOC(strm, 1, sizeof(struct inflate_state));
  ------------------
  |  |  253|  3.87k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  207|  3.87k|    if (state == Z_NULL) return Z_MEM_ERROR;
  ------------------
  |  |  216|  3.87k|#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 (207:9): [True: 0, False: 3.87k]
  ------------------
  208|  3.87k|    zmemzero(state, sizeof(struct inflate_state));
  ------------------
  |  |  218|  3.87k|#    define zmemzero(dest, len) memset(dest, 0, len)
  ------------------
  209|  3.87k|    Tracev((stderr, "inflate: allocated\n"));
  210|  3.87k|    strm->state = (struct internal_state FAR *)state;
  211|  3.87k|    state->strm = strm;
  212|  3.87k|    state->window = Z_NULL;
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  213|  3.87k|    state->mode = HEAD;     /* to pass state test in inflateReset2() */
  214|  3.87k|    ret = inflateReset2(strm, windowBits);
  215|  3.87k|    if (ret != Z_OK) {
  ------------------
  |  |  181|  3.87k|#define Z_OK            0
  ------------------
  |  Branch (215:9): [True: 0, False: 3.87k]
  ------------------
  216|      0|        ZFREE(strm, state);
  ------------------
  |  |  254|      0|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
  217|      0|        strm->state = Z_NULL;
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  218|      0|    }
  219|  3.87k|    return ret;
  220|  3.87k|}
inflateInit_:
  223|  3.87k|                         int stream_size) {
  224|  3.87k|    return inflateInit2_(strm, DEF_WBITS, version, stream_size);
  ------------------
  |  |   76|  3.87k|#  define DEF_WBITS MAX_WBITS
  |  |  ------------------
  |  |  |  |  287|  3.87k|#  define MAX_WBITS   15 /* 32K LZ77 window */
  |  |  ------------------
  ------------------
  225|  3.87k|}
inflate:
  482|  7.49k|int ZEXPORT inflate(z_streamp strm, int flush) {
  483|  7.49k|    struct inflate_state FAR *state;
  484|  7.49k|    z_const unsigned char FAR *next;    /* next input */
  485|  7.49k|    unsigned char FAR *put;     /* next output */
  486|  7.49k|    unsigned have, left;        /* available input and output */
  487|  7.49k|    unsigned long hold;         /* bit buffer */
  488|  7.49k|    unsigned bits;              /* bits in bit buffer */
  489|  7.49k|    unsigned in, out;           /* save starting available input and output */
  490|  7.49k|    unsigned copy;              /* number of stored or match bytes to copy */
  491|  7.49k|    unsigned char FAR *from;    /* where to copy match bytes from */
  492|  7.49k|    code here;                  /* current decoding table entry */
  493|  7.49k|    code last;                  /* parent table entry */
  494|  7.49k|    unsigned len;               /* length to copy for repeats, bits to drop */
  495|  7.49k|    int ret;                    /* return code */
  496|  7.49k|#ifdef GUNZIP
  497|  7.49k|    unsigned char hbuf[4];      /* buffer for gzip header crc calculation */
  498|  7.49k|#endif
  499|  7.49k|    static const unsigned short order[19] = /* permutation of code lengths */
  500|  7.49k|        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
  501|       |
  502|  7.49k|    if (inflateStateCheck(strm) || strm->next_out == Z_NULL ||
  ------------------
  |  |  216|  14.9k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (502:9): [True: 0, False: 7.49k]
  |  Branch (502:36): [True: 0, False: 7.49k]
  ------------------
  503|  7.49k|        (strm->next_in == Z_NULL && strm->avail_in != 0))
  ------------------
  |  |  216|  14.9k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (503:10): [True: 0, False: 7.49k]
  |  Branch (503:37): [True: 0, False: 0]
  ------------------
  504|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  505|       |
  506|  7.49k|    state = (struct inflate_state FAR *)strm->state;
  507|  7.49k|    if (state->mode == TYPE) state->mode = TYPEDO;      /* skip check */
  ------------------
  |  Branch (507:9): [True: 0, False: 7.49k]
  ------------------
  508|  7.49k|    LOAD();
  ------------------
  |  |  337|  7.49k|    do { \
  |  |  338|  7.49k|        put = strm->next_out; \
  |  |  339|  7.49k|        left = strm->avail_out; \
  |  |  340|  7.49k|        next = strm->next_in; \
  |  |  341|  7.49k|        have = strm->avail_in; \
  |  |  342|  7.49k|        hold = state->hold; \
  |  |  343|  7.49k|        bits = state->bits; \
  |  |  344|  7.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (344:14): [Folded, False: 7.49k]
  |  |  ------------------
  ------------------
  509|  7.49k|    in = have;
  510|  7.49k|    out = left;
  511|  7.49k|    ret = Z_OK;
  ------------------
  |  |  181|  7.49k|#define Z_OK            0
  ------------------
  512|  7.49k|    for (;;)
  513|   737k|        switch (state->mode) {
  514|  3.87k|        case HEAD:
  ------------------
  |  Branch (514:9): [True: 3.87k, False: 733k]
  ------------------
  515|  3.87k|            if (state->wrap == 0) {
  ------------------
  |  Branch (515:17): [True: 0, False: 3.87k]
  ------------------
  516|      0|                state->mode = TYPEDO;
  517|      0|                break;
  518|      0|            }
  519|  3.87k|            NEEDBITS(16);
  ------------------
  |  |  377|  3.87k|    do { \
  |  |  378|  11.6k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 7.74k, False: 3.87k]
  |  |  ------------------
  |  |  379|  7.74k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|  7.74k|    do { \
  |  |  |  |  368|  7.74k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 7.74k]
  |  |  |  |  ------------------
  |  |  |  |  369|  7.74k|        have--; \
  |  |  |  |  370|  7.74k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|  7.74k|        bits += 8; \
  |  |  |  |  372|  7.74k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 7.74k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|  3.87k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 3.87k]
  |  |  ------------------
  ------------------
  520|  3.87k|#ifdef GUNZIP
  521|  3.87k|            if ((state->wrap & 2) && hold == 0x8b1f) {  /* gzip header */
  ------------------
  |  Branch (521:17): [True: 0, False: 3.87k]
  |  Branch (521:38): [True: 0, False: 0]
  ------------------
  522|      0|                if (state->wbits == 0)
  ------------------
  |  Branch (522:21): [True: 0, False: 0]
  ------------------
  523|      0|                    state->wbits = 15;
  524|      0|                state->check = crc32(0L, Z_NULL, 0);
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  525|      0|                CRC2(state->check, hold);
  ------------------
  |  |  319|      0|    do { \
  |  |  320|      0|        hbuf[0] = (unsigned char)(word); \
  |  |  321|      0|        hbuf[1] = (unsigned char)((word) >> 8); \
  |  |  322|      0|        check = crc32(check, hbuf, 2); \
  |  |  323|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (323:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  526|      0|                INITBITS();
  ------------------
  |  |  359|      0|    do { \
  |  |  360|      0|        hold = 0; \
  |  |  361|      0|        bits = 0; \
  |  |  362|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (362:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  527|      0|                state->mode = FLAGS;
  528|      0|                break;
  529|      0|            }
  530|  3.87k|            if (state->head != Z_NULL)
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (530:17): [True: 0, False: 3.87k]
  ------------------
  531|      0|                state->head->done = -1;
  532|  3.87k|            if (!(state->wrap & 1) ||   /* check if zlib header allowed */
  ------------------
  |  Branch (532:17): [True: 0, False: 3.87k]
  ------------------
  533|       |#else
  534|       |            if (
  535|       |#endif
  536|  3.87k|                ((BITS(8) << 8) + (hold >> 8)) % 31) {
  ------------------
  |  |  384|  3.87k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  |  Branch (536:17): [True: 0, False: 3.87k]
  ------------------
  537|      0|                strm->msg = (z_const char *)"incorrect header check";
  538|      0|                state->mode = BAD;
  539|      0|                break;
  540|      0|            }
  541|  3.87k|            if (BITS(4) != Z_DEFLATED) {
  ------------------
  |  |  384|  3.87k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
                          if (BITS(4) != Z_DEFLATED) {
  ------------------
  |  |  213|  3.87k|#define Z_DEFLATED   8
  ------------------
  |  Branch (541:17): [True: 0, False: 3.87k]
  ------------------
  542|      0|                strm->msg = (z_const char *)"unknown compression method";
  543|      0|                state->mode = BAD;
  544|      0|                break;
  545|      0|            }
  546|  3.87k|            DROPBITS(4);
  ------------------
  |  |  388|  3.87k|    do { \
  |  |  389|  3.87k|        hold >>= (n); \
  |  |  390|  3.87k|        bits -= (unsigned)(n); \
  |  |  391|  3.87k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 3.87k]
  |  |  ------------------
  ------------------
  547|  3.87k|            len = BITS(4) + 8;
  ------------------
  |  |  384|  3.87k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  548|  3.87k|            if (len > 15 || (state->wbits != 0 && len > state->wbits)) {
  ------------------
  |  Branch (548:17): [True: 0, False: 3.87k]
  |  Branch (548:30): [True: 3.87k, False: 0]
  |  Branch (548:51): [True: 0, False: 3.87k]
  ------------------
  549|      0|                strm->msg = (z_const char *)"invalid window size";
  550|      0|                state->mode = BAD;
  551|      0|                break;
  552|      0|            }
  553|  3.87k|            if (state->wbits == 0)
  ------------------
  |  Branch (553:17): [True: 0, False: 3.87k]
  ------------------
  554|      0|                state->wbits = len;
  555|  3.87k|            state->dmax = 1U << len;
  556|  3.87k|            state->flags = 0;               /* indicate zlib header */
  557|  3.87k|            Tracev((stderr, "inflate:   zlib header ok\n"));
  558|  3.87k|            strm->adler = state->check = adler32(0L, Z_NULL, 0);
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  559|  3.87k|            state->mode = hold & 0x200 ? DICTID : TYPE;
  ------------------
  |  Branch (559:27): [True: 3.62k, False: 247]
  ------------------
  560|  3.87k|            INITBITS();
  ------------------
  |  |  359|  3.87k|    do { \
  |  |  360|  3.87k|        hold = 0; \
  |  |  361|  3.87k|        bits = 0; \
  |  |  362|  3.87k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (362:14): [Folded, False: 3.87k]
  |  |  ------------------
  ------------------
  561|  3.87k|            break;
  562|      0|#ifdef GUNZIP
  563|      0|        case FLAGS:
  ------------------
  |  Branch (563:9): [True: 0, False: 737k]
  ------------------
  564|      0|            NEEDBITS(16);
  ------------------
  |  |  377|      0|    do { \
  |  |  378|      0|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  379|      0|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|      0|    do { \
  |  |  |  |  368|      0|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  369|      0|        have--; \
  |  |  |  |  370|      0|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|      0|        bits += 8; \
  |  |  |  |  372|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  565|      0|            state->flags = (int)(hold);
  566|      0|            if ((state->flags & 0xff) != Z_DEFLATED) {
  ------------------
  |  |  213|      0|#define Z_DEFLATED   8
  ------------------
  |  Branch (566:17): [True: 0, False: 0]
  ------------------
  567|      0|                strm->msg = (z_const char *)"unknown compression method";
  568|      0|                state->mode = BAD;
  569|      0|                break;
  570|      0|            }
  571|      0|            if (state->flags & 0xe000) {
  ------------------
  |  Branch (571:17): [True: 0, False: 0]
  ------------------
  572|      0|                strm->msg = (z_const char *)"unknown header flags set";
  573|      0|                state->mode = BAD;
  574|      0|                break;
  575|      0|            }
  576|      0|            if (state->head != Z_NULL)
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (576:17): [True: 0, False: 0]
  ------------------
  577|      0|                state->head->text = (int)((hold >> 8) & 1);
  578|      0|            if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (578:17): [True: 0, False: 0]
  |  Branch (578:44): [True: 0, False: 0]
  ------------------
  579|      0|                CRC2(state->check, hold);
  ------------------
  |  |  319|      0|    do { \
  |  |  320|      0|        hbuf[0] = (unsigned char)(word); \
  |  |  321|      0|        hbuf[1] = (unsigned char)((word) >> 8); \
  |  |  322|      0|        check = crc32(check, hbuf, 2); \
  |  |  323|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (323:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  580|      0|            INITBITS();
  ------------------
  |  |  359|      0|    do { \
  |  |  360|      0|        hold = 0; \
  |  |  361|      0|        bits = 0; \
  |  |  362|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (362:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  581|      0|            state->mode = TIME;
  582|       |                /* fallthrough */
  583|      0|        case TIME:
  ------------------
  |  Branch (583:9): [True: 0, False: 737k]
  ------------------
  584|      0|            NEEDBITS(32);
  ------------------
  |  |  377|      0|    do { \
  |  |  378|      0|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  379|      0|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|      0|    do { \
  |  |  |  |  368|      0|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  369|      0|        have--; \
  |  |  |  |  370|      0|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|      0|        bits += 8; \
  |  |  |  |  372|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  585|      0|            if (state->head != Z_NULL)
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (585:17): [True: 0, False: 0]
  ------------------
  586|      0|                state->head->time = hold;
  587|      0|            if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (587:17): [True: 0, False: 0]
  |  Branch (587:44): [True: 0, False: 0]
  ------------------
  588|      0|                CRC4(state->check, hold);
  ------------------
  |  |  326|      0|    do { \
  |  |  327|      0|        hbuf[0] = (unsigned char)(word); \
  |  |  328|      0|        hbuf[1] = (unsigned char)((word) >> 8); \
  |  |  329|      0|        hbuf[2] = (unsigned char)((word) >> 16); \
  |  |  330|      0|        hbuf[3] = (unsigned char)((word) >> 24); \
  |  |  331|      0|        check = crc32(check, hbuf, 4); \
  |  |  332|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (332:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  589|      0|            INITBITS();
  ------------------
  |  |  359|      0|    do { \
  |  |  360|      0|        hold = 0; \
  |  |  361|      0|        bits = 0; \
  |  |  362|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (362:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  590|      0|            state->mode = OS;
  591|       |                /* fallthrough */
  592|      0|        case OS:
  ------------------
  |  Branch (592:9): [True: 0, False: 737k]
  ------------------
  593|      0|            NEEDBITS(16);
  ------------------
  |  |  377|      0|    do { \
  |  |  378|      0|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  379|      0|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|      0|    do { \
  |  |  |  |  368|      0|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  369|      0|        have--; \
  |  |  |  |  370|      0|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|      0|        bits += 8; \
  |  |  |  |  372|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  594|      0|            if (state->head != Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (594:17): [True: 0, False: 0]
  ------------------
  595|      0|                state->head->xflags = (int)(hold & 0xff);
  596|      0|                state->head->os = (int)(hold >> 8);
  597|      0|            }
  598|      0|            if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (598:17): [True: 0, False: 0]
  |  Branch (598:44): [True: 0, False: 0]
  ------------------
  599|      0|                CRC2(state->check, hold);
  ------------------
  |  |  319|      0|    do { \
  |  |  320|      0|        hbuf[0] = (unsigned char)(word); \
  |  |  321|      0|        hbuf[1] = (unsigned char)((word) >> 8); \
  |  |  322|      0|        check = crc32(check, hbuf, 2); \
  |  |  323|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (323:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  600|      0|            INITBITS();
  ------------------
  |  |  359|      0|    do { \
  |  |  360|      0|        hold = 0; \
  |  |  361|      0|        bits = 0; \
  |  |  362|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (362:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  601|      0|            state->mode = EXLEN;
  602|       |                /* fallthrough */
  603|      0|        case EXLEN:
  ------------------
  |  Branch (603:9): [True: 0, False: 737k]
  ------------------
  604|      0|            if (state->flags & 0x0400) {
  ------------------
  |  Branch (604:17): [True: 0, False: 0]
  ------------------
  605|      0|                NEEDBITS(16);
  ------------------
  |  |  377|      0|    do { \
  |  |  378|      0|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  379|      0|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|      0|    do { \
  |  |  |  |  368|      0|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  369|      0|        have--; \
  |  |  |  |  370|      0|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|      0|        bits += 8; \
  |  |  |  |  372|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  606|      0|                state->length = (unsigned)(hold);
  607|      0|                if (state->head != Z_NULL)
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (607:21): [True: 0, False: 0]
  ------------------
  608|      0|                    state->head->extra_len = (unsigned)hold;
  609|      0|                if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (609:21): [True: 0, False: 0]
  |  Branch (609:48): [True: 0, False: 0]
  ------------------
  610|      0|                    CRC2(state->check, hold);
  ------------------
  |  |  319|      0|    do { \
  |  |  320|      0|        hbuf[0] = (unsigned char)(word); \
  |  |  321|      0|        hbuf[1] = (unsigned char)((word) >> 8); \
  |  |  322|      0|        check = crc32(check, hbuf, 2); \
  |  |  323|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (323:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  611|      0|                INITBITS();
  ------------------
  |  |  359|      0|    do { \
  |  |  360|      0|        hold = 0; \
  |  |  361|      0|        bits = 0; \
  |  |  362|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (362:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  612|      0|            }
  613|      0|            else if (state->head != Z_NULL)
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (613:22): [True: 0, False: 0]
  ------------------
  614|      0|                state->head->extra = Z_NULL;
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  615|      0|            state->mode = EXTRA;
  616|       |                /* fallthrough */
  617|      0|        case EXTRA:
  ------------------
  |  Branch (617:9): [True: 0, False: 737k]
  ------------------
  618|      0|            if (state->flags & 0x0400) {
  ------------------
  |  Branch (618:17): [True: 0, False: 0]
  ------------------
  619|      0|                copy = state->length;
  620|      0|                if (copy > have) copy = have;
  ------------------
  |  Branch (620:21): [True: 0, False: 0]
  ------------------
  621|      0|                if (copy) {
  ------------------
  |  Branch (621:21): [True: 0, False: 0]
  ------------------
  622|      0|                    if (state->head != Z_NULL &&
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (622:25): [True: 0, False: 0]
  ------------------
  623|      0|                        state->head->extra != Z_NULL &&
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (623:25): [True: 0, False: 0]
  ------------------
  624|      0|                        (len = state->head->extra_len - state->length) <
  ------------------
  |  Branch (624:25): [True: 0, False: 0]
  ------------------
  625|      0|                            state->head->extra_max) {
  626|      0|                        zmemcpy(state->head->extra + len, next,
  ------------------
  |  |  216|      0|#    define zmemcpy memcpy
  ------------------
  627|      0|                                len + copy > state->head->extra_max ?
  ------------------
  |  Branch (627:33): [True: 0, False: 0]
  ------------------
  628|      0|                                state->head->extra_max - len : copy);
  629|      0|                    }
  630|      0|                    if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (630:25): [True: 0, False: 0]
  |  Branch (630:52): [True: 0, False: 0]
  ------------------
  631|      0|                        state->check = crc32(state->check, next, copy);
  632|      0|                    have -= copy;
  633|      0|                    next += copy;
  634|      0|                    state->length -= copy;
  635|      0|                }
  636|      0|                if (state->length) goto inf_leave;
  ------------------
  |  Branch (636:21): [True: 0, False: 0]
  ------------------
  637|      0|            }
  638|      0|            state->length = 0;
  639|      0|            state->mode = NAME;
  640|       |                /* fallthrough */
  641|      0|        case NAME:
  ------------------
  |  Branch (641:9): [True: 0, False: 737k]
  ------------------
  642|      0|            if (state->flags & 0x0800) {
  ------------------
  |  Branch (642:17): [True: 0, False: 0]
  ------------------
  643|      0|                if (have == 0) goto inf_leave;
  ------------------
  |  Branch (643:21): [True: 0, False: 0]
  ------------------
  644|      0|                copy = 0;
  645|      0|                do {
  646|      0|                    len = (unsigned)(next[copy++]);
  647|      0|                    if (state->head != Z_NULL &&
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (647:25): [True: 0, False: 0]
  ------------------
  648|      0|                            state->head->name != Z_NULL &&
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (648:29): [True: 0, False: 0]
  ------------------
  649|      0|                            state->length < state->head->name_max)
  ------------------
  |  Branch (649:29): [True: 0, False: 0]
  ------------------
  650|      0|                        state->head->name[state->length++] = (Bytef)len;
  651|      0|                } while (len && copy < have);
  ------------------
  |  Branch (651:26): [True: 0, False: 0]
  |  Branch (651:33): [True: 0, False: 0]
  ------------------
  652|      0|                if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (652:21): [True: 0, False: 0]
  |  Branch (652:48): [True: 0, False: 0]
  ------------------
  653|      0|                    state->check = crc32(state->check, next, copy);
  654|      0|                have -= copy;
  655|      0|                next += copy;
  656|      0|                if (len) goto inf_leave;
  ------------------
  |  Branch (656:21): [True: 0, False: 0]
  ------------------
  657|      0|            }
  658|      0|            else if (state->head != Z_NULL)
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (658:22): [True: 0, False: 0]
  ------------------
  659|      0|                state->head->name = Z_NULL;
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  660|      0|            state->length = 0;
  661|      0|            state->mode = COMMENT;
  662|       |                /* fallthrough */
  663|      0|        case COMMENT:
  ------------------
  |  Branch (663:9): [True: 0, False: 737k]
  ------------------
  664|      0|            if (state->flags & 0x1000) {
  ------------------
  |  Branch (664:17): [True: 0, False: 0]
  ------------------
  665|      0|                if (have == 0) goto inf_leave;
  ------------------
  |  Branch (665:21): [True: 0, False: 0]
  ------------------
  666|      0|                copy = 0;
  667|      0|                do {
  668|      0|                    len = (unsigned)(next[copy++]);
  669|      0|                    if (state->head != Z_NULL &&
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (669:25): [True: 0, False: 0]
  ------------------
  670|      0|                            state->head->comment != Z_NULL &&
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (670:29): [True: 0, False: 0]
  ------------------
  671|      0|                            state->length < state->head->comm_max)
  ------------------
  |  Branch (671:29): [True: 0, False: 0]
  ------------------
  672|      0|                        state->head->comment[state->length++] = (Bytef)len;
  673|      0|                } while (len && copy < have);
  ------------------
  |  Branch (673:26): [True: 0, False: 0]
  |  Branch (673:33): [True: 0, False: 0]
  ------------------
  674|      0|                if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (674:21): [True: 0, False: 0]
  |  Branch (674:48): [True: 0, False: 0]
  ------------------
  675|      0|                    state->check = crc32(state->check, next, copy);
  676|      0|                have -= copy;
  677|      0|                next += copy;
  678|      0|                if (len) goto inf_leave;
  ------------------
  |  Branch (678:21): [True: 0, False: 0]
  ------------------
  679|      0|            }
  680|      0|            else if (state->head != Z_NULL)
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (680:22): [True: 0, False: 0]
  ------------------
  681|      0|                state->head->comment = Z_NULL;
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  682|      0|            state->mode = HCRC;
  683|       |                /* fallthrough */
  684|      0|        case HCRC:
  ------------------
  |  Branch (684:9): [True: 0, False: 737k]
  ------------------
  685|      0|            if (state->flags & 0x0200) {
  ------------------
  |  Branch (685:17): [True: 0, False: 0]
  ------------------
  686|      0|                NEEDBITS(16);
  ------------------
  |  |  377|      0|    do { \
  |  |  378|      0|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  379|      0|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|      0|    do { \
  |  |  |  |  368|      0|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  369|      0|        have--; \
  |  |  |  |  370|      0|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|      0|        bits += 8; \
  |  |  |  |  372|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  687|      0|                if ((state->wrap & 4) && hold != (state->check & 0xffff)) {
  ------------------
  |  Branch (687:21): [True: 0, False: 0]
  |  Branch (687:42): [True: 0, False: 0]
  ------------------
  688|      0|                    strm->msg = (z_const char *)"header crc mismatch";
  689|      0|                    state->mode = BAD;
  690|      0|                    break;
  691|      0|                }
  692|      0|                INITBITS();
  ------------------
  |  |  359|      0|    do { \
  |  |  360|      0|        hold = 0; \
  |  |  361|      0|        bits = 0; \
  |  |  362|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (362:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  693|      0|            }
  694|      0|            if (state->head != Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (694:17): [True: 0, False: 0]
  ------------------
  695|      0|                state->head->hcrc = (int)((state->flags >> 9) & 1);
  696|      0|                state->head->done = 1;
  697|      0|            }
  698|      0|            strm->adler = state->check = crc32(0L, Z_NULL, 0);
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  699|      0|            state->mode = TYPE;
  700|      0|            break;
  701|      0|#endif
  702|  3.62k|        case DICTID:
  ------------------
  |  Branch (702:9): [True: 3.62k, False: 733k]
  ------------------
  703|  3.62k|            NEEDBITS(32);
  ------------------
  |  |  377|  3.62k|    do { \
  |  |  378|  18.1k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 14.5k, False: 3.62k]
  |  |  ------------------
  |  |  379|  14.5k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|  14.5k|    do { \
  |  |  |  |  368|  14.5k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 14.5k]
  |  |  |  |  ------------------
  |  |  |  |  369|  14.5k|        have--; \
  |  |  |  |  370|  14.5k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|  14.5k|        bits += 8; \
  |  |  |  |  372|  14.5k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 14.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|  3.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  704|  3.62k|            strm->adler = state->check = ZSWAP32(hold);
  ------------------
  |  |  258|  3.62k|#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
  |  |  259|  3.62k|                    (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
  ------------------
  705|  3.62k|            INITBITS();
  ------------------
  |  |  359|  3.62k|    do { \
  |  |  360|  3.62k|        hold = 0; \
  |  |  361|  3.62k|        bits = 0; \
  |  |  362|  3.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (362:14): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  706|  3.62k|            state->mode = DICT;
  707|       |                /* fallthrough */
  708|  7.25k|        case DICT:
  ------------------
  |  Branch (708:9): [True: 3.62k, False: 733k]
  ------------------
  709|  7.25k|            if (state->havedict == 0) {
  ------------------
  |  Branch (709:17): [True: 3.62k, False: 3.62k]
  ------------------
  710|  3.62k|                RESTORE();
  ------------------
  |  |  348|  3.62k|    do { \
  |  |  349|  3.62k|        strm->next_out = put; \
  |  |  350|  3.62k|        strm->avail_out = left; \
  |  |  351|  3.62k|        strm->next_in = next; \
  |  |  352|  3.62k|        strm->avail_in = have; \
  |  |  353|  3.62k|        state->hold = hold; \
  |  |  354|  3.62k|        state->bits = bits; \
  |  |  355|  3.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (355:14): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  711|  3.62k|                strm->total_in += in - strm->avail_in;
  712|  3.62k|                return Z_NEED_DICT;
  ------------------
  |  |  183|  3.62k|#define Z_NEED_DICT     2
  ------------------
  713|  3.62k|            }
  714|  3.62k|            strm->adler = state->check = adler32(0L, Z_NULL, 0);
  ------------------
  |  |  216|  3.62k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  715|  3.62k|            state->mode = TYPE;
  716|       |                /* fallthrough */
  717|  32.4k|        case TYPE:
  ------------------
  |  Branch (717:9): [True: 28.7k, False: 708k]
  ------------------
  718|  32.4k|            if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave;
  ------------------
  |  |  177|  64.8k|#define Z_BLOCK         5
  ------------------
                          if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave;
  ------------------
  |  |  178|  32.4k|#define Z_TREES         6
  ------------------
  |  Branch (718:17): [True: 0, False: 32.4k]
  |  Branch (718:37): [True: 0, False: 32.4k]
  ------------------
  719|       |                /* fallthrough */
  720|  32.4k|        case TYPEDO:
  ------------------
  |  Branch (720:9): [True: 0, False: 737k]
  ------------------
  721|  32.4k|            if (state->last) {
  ------------------
  |  Branch (721:17): [True: 3.87k, False: 28.5k]
  ------------------
  722|  3.87k|                BYTEBITS();
  ------------------
  |  |  395|  3.87k|    do { \
  |  |  396|  3.87k|        hold >>= bits & 7; \
  |  |  397|  3.87k|        bits -= bits & 7; \
  |  |  398|  3.87k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (398:14): [Folded, False: 3.87k]
  |  |  ------------------
  ------------------
  723|  3.87k|                state->mode = CHECK;
  724|  3.87k|                break;
  725|  3.87k|            }
  726|  28.5k|            NEEDBITS(3);
  ------------------
  |  |  377|  28.5k|    do { \
  |  |  378|  46.1k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 17.5k, False: 28.5k]
  |  |  ------------------
  |  |  379|  28.5k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|  17.5k|    do { \
  |  |  |  |  368|  17.5k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 17.5k]
  |  |  |  |  ------------------
  |  |  |  |  369|  17.5k|        have--; \
  |  |  |  |  370|  17.5k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|  17.5k|        bits += 8; \
  |  |  |  |  372|  17.5k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 17.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|  28.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 28.5k]
  |  |  ------------------
  ------------------
  727|  28.5k|            state->last = BITS(1);
  ------------------
  |  |  384|  28.5k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  728|  28.5k|            DROPBITS(1);
  ------------------
  |  |  388|  28.5k|    do { \
  |  |  389|  28.5k|        hold >>= (n); \
  |  |  390|  28.5k|        bits -= (unsigned)(n); \
  |  |  391|  28.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 28.5k]
  |  |  ------------------
  ------------------
  729|  28.5k|            switch (BITS(2)) {
  ------------------
  |  |  384|  28.5k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  730|  6.83k|            case 0:                             /* stored block */
  ------------------
  |  Branch (730:13): [True: 6.83k, False: 21.7k]
  ------------------
  731|  6.83k|                Tracev((stderr, "inflate:     stored block%s\n",
  732|  6.83k|                        state->last ? " (last)" : ""));
  733|  6.83k|                state->mode = STORED;
  734|  6.83k|                break;
  735|  6.88k|            case 1:                             /* fixed block */
  ------------------
  |  Branch (735:13): [True: 6.88k, False: 21.6k]
  ------------------
  736|  6.88k|                inflate_fixed(state);
  737|  6.88k|                Tracev((stderr, "inflate:     fixed codes block%s\n",
  738|  6.88k|                        state->last ? " (last)" : ""));
  739|  6.88k|                state->mode = LEN_;             /* decode codes */
  740|  6.88k|                if (flush == Z_TREES) {
  ------------------
  |  |  178|  6.88k|#define Z_TREES         6
  ------------------
  |  Branch (740:21): [True: 0, False: 6.88k]
  ------------------
  741|      0|                    DROPBITS(2);
  ------------------
  |  |  388|      0|    do { \
  |  |  389|      0|        hold >>= (n); \
  |  |  390|      0|        bits -= (unsigned)(n); \
  |  |  391|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  742|      0|                    goto inf_leave;
  743|      0|                }
  744|  6.88k|                break;
  745|  14.8k|            case 2:                             /* dynamic block */
  ------------------
  |  Branch (745:13): [True: 14.8k, False: 13.7k]
  ------------------
  746|  14.8k|                Tracev((stderr, "inflate:     dynamic codes block%s\n",
  747|  14.8k|                        state->last ? " (last)" : ""));
  748|  14.8k|                state->mode = TABLE;
  749|  14.8k|                break;
  750|      0|            default:
  ------------------
  |  Branch (750:13): [True: 0, False: 28.5k]
  ------------------
  751|      0|                strm->msg = (z_const char *)"invalid block type";
  752|      0|                state->mode = BAD;
  753|  28.5k|            }
  754|  28.5k|            DROPBITS(2);
  ------------------
  |  |  388|  28.5k|    do { \
  |  |  389|  28.5k|        hold >>= (n); \
  |  |  390|  28.5k|        bits -= (unsigned)(n); \
  |  |  391|  28.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 28.5k]
  |  |  ------------------
  ------------------
  755|  28.5k|            break;
  756|  6.83k|        case STORED:
  ------------------
  |  Branch (756:9): [True: 6.83k, False: 730k]
  ------------------
  757|  6.83k|            BYTEBITS();                         /* go to byte boundary */
  ------------------
  |  |  395|  6.83k|    do { \
  |  |  396|  6.83k|        hold >>= bits & 7; \
  |  |  397|  6.83k|        bits -= bits & 7; \
  |  |  398|  6.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (398:14): [Folded, False: 6.83k]
  |  |  ------------------
  ------------------
  758|  6.83k|            NEEDBITS(32);
  ------------------
  |  |  377|  6.83k|    do { \
  |  |  378|  34.1k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 27.3k, False: 6.83k]
  |  |  ------------------
  |  |  379|  27.3k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|  27.3k|    do { \
  |  |  |  |  368|  27.3k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 27.3k]
  |  |  |  |  ------------------
  |  |  |  |  369|  27.3k|        have--; \
  |  |  |  |  370|  27.3k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|  27.3k|        bits += 8; \
  |  |  |  |  372|  27.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 27.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|  6.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 6.83k]
  |  |  ------------------
  ------------------
  759|  6.83k|            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
  ------------------
  |  Branch (759:17): [True: 0, False: 6.83k]
  ------------------
  760|      0|                strm->msg = (z_const char *)"invalid stored block lengths";
  761|      0|                state->mode = BAD;
  762|      0|                break;
  763|      0|            }
  764|  6.83k|            state->length = (unsigned)hold & 0xffff;
  765|  6.83k|            Tracev((stderr, "inflate:       stored length %u\n",
  766|  6.83k|                    state->length));
  767|  6.83k|            INITBITS();
  ------------------
  |  |  359|  6.83k|    do { \
  |  |  360|  6.83k|        hold = 0; \
  |  |  361|  6.83k|        bits = 0; \
  |  |  362|  6.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (362:14): [Folded, False: 6.83k]
  |  |  ------------------
  ------------------
  768|  6.83k|            state->mode = COPY_;
  769|  6.83k|            if (flush == Z_TREES) goto inf_leave;
  ------------------
  |  |  178|  6.83k|#define Z_TREES         6
  ------------------
  |  Branch (769:17): [True: 0, False: 6.83k]
  ------------------
  770|       |                /* fallthrough */
  771|  6.83k|        case COPY_:
  ------------------
  |  Branch (771:9): [True: 0, False: 737k]
  ------------------
  772|  6.83k|            state->mode = COPY;
  773|       |                /* fallthrough */
  774|  13.6k|        case COPY:
  ------------------
  |  Branch (774:9): [True: 6.83k, False: 730k]
  ------------------
  775|  13.6k|            copy = state->length;
  776|  13.6k|            if (copy) {
  ------------------
  |  Branch (776:17): [True: 6.83k, False: 6.83k]
  ------------------
  777|  6.83k|                if (copy > have) copy = have;
  ------------------
  |  Branch (777:21): [True: 0, False: 6.83k]
  ------------------
  778|  6.83k|                if (copy > left) copy = left;
  ------------------
  |  Branch (778:21): [True: 0, False: 6.83k]
  ------------------
  779|  6.83k|                if (copy == 0) goto inf_leave;
  ------------------
  |  Branch (779:21): [True: 0, False: 6.83k]
  ------------------
  780|  6.83k|                zmemcpy(put, next, copy);
  ------------------
  |  |  216|  6.83k|#    define zmemcpy memcpy
  ------------------
  781|  6.83k|                have -= copy;
  782|  6.83k|                next += copy;
  783|  6.83k|                left -= copy;
  784|  6.83k|                put += copy;
  785|  6.83k|                state->length -= copy;
  786|  6.83k|                break;
  787|  6.83k|            }
  788|  6.83k|            Tracev((stderr, "inflate:       stored end\n"));
  789|  6.83k|            state->mode = TYPE;
  790|  6.83k|            break;
  791|  14.8k|        case TABLE:
  ------------------
  |  Branch (791:9): [True: 14.8k, False: 722k]
  ------------------
  792|  14.8k|            NEEDBITS(14);
  ------------------
  |  |  377|  14.8k|    do { \
  |  |  378|  41.4k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 26.6k, False: 14.8k]
  |  |  ------------------
  |  |  379|  26.6k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|  26.6k|    do { \
  |  |  |  |  368|  26.6k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 26.6k]
  |  |  |  |  ------------------
  |  |  |  |  369|  26.6k|        have--; \
  |  |  |  |  370|  26.6k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|  26.6k|        bits += 8; \
  |  |  |  |  372|  26.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 26.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|  14.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 14.8k]
  |  |  ------------------
  ------------------
  793|  14.8k|            state->nlen = BITS(5) + 257;
  ------------------
  |  |  384|  14.8k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  794|  14.8k|            DROPBITS(5);
  ------------------
  |  |  388|  14.8k|    do { \
  |  |  389|  14.8k|        hold >>= (n); \
  |  |  390|  14.8k|        bits -= (unsigned)(n); \
  |  |  391|  14.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 14.8k]
  |  |  ------------------
  ------------------
  795|  14.8k|            state->ndist = BITS(5) + 1;
  ------------------
  |  |  384|  14.8k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  796|  14.8k|            DROPBITS(5);
  ------------------
  |  |  388|  14.8k|    do { \
  |  |  389|  14.8k|        hold >>= (n); \
  |  |  390|  14.8k|        bits -= (unsigned)(n); \
  |  |  391|  14.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 14.8k]
  |  |  ------------------
  ------------------
  797|  14.8k|            state->ncode = BITS(4) + 4;
  ------------------
  |  |  384|  14.8k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  798|  14.8k|            DROPBITS(4);
  ------------------
  |  |  388|  14.8k|    do { \
  |  |  389|  14.8k|        hold >>= (n); \
  |  |  390|  14.8k|        bits -= (unsigned)(n); \
  |  |  391|  14.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 14.8k]
  |  |  ------------------
  ------------------
  799|  14.8k|#ifndef PKZIP_BUG_WORKAROUND
  800|  14.8k|            if (state->nlen > 286 || state->ndist > 30) {
  ------------------
  |  Branch (800:17): [True: 0, False: 14.8k]
  |  Branch (800:38): [True: 0, False: 14.8k]
  ------------------
  801|      0|                strm->msg = (z_const char *)
  802|      0|                    "too many length or distance symbols";
  803|      0|                state->mode = BAD;
  804|      0|                break;
  805|      0|            }
  806|  14.8k|#endif
  807|  14.8k|            Tracev((stderr, "inflate:       table sizes ok\n"));
  808|  14.8k|            state->have = 0;
  809|  14.8k|            state->mode = LENLENS;
  810|       |                /* fallthrough */
  811|  14.8k|        case LENLENS:
  ------------------
  |  Branch (811:9): [True: 0, False: 737k]
  ------------------
  812|   278k|            while (state->have < state->ncode) {
  ------------------
  |  Branch (812:20): [True: 263k, False: 14.8k]
  ------------------
  813|   263k|                NEEDBITS(3);
  ------------------
  |  |  377|   263k|    do { \
  |  |  378|   360k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 97.1k, False: 263k]
  |  |  ------------------
  |  |  379|   263k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|  97.1k|    do { \
  |  |  |  |  368|  97.1k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 97.1k]
  |  |  |  |  ------------------
  |  |  |  |  369|  97.1k|        have--; \
  |  |  |  |  370|  97.1k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|  97.1k|        bits += 8; \
  |  |  |  |  372|  97.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 97.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|   263k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 263k]
  |  |  ------------------
  ------------------
  814|   263k|                state->lens[order[state->have++]] = (unsigned short)BITS(3);
  ------------------
  |  |  384|   263k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  815|   263k|                DROPBITS(3);
  ------------------
  |  |  388|   263k|    do { \
  |  |  389|   263k|        hold >>= (n); \
  |  |  390|   263k|        bits -= (unsigned)(n); \
  |  |  391|   263k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 263k]
  |  |  ------------------
  ------------------
  816|   263k|            }
  817|  32.7k|            while (state->have < 19)
  ------------------
  |  Branch (817:20): [True: 17.9k, False: 14.8k]
  ------------------
  818|  17.9k|                state->lens[order[state->have++]] = 0;
  819|  14.8k|            state->next = state->codes;
  820|  14.8k|            state->lencode = state->distcode = (const code FAR *)(state->next);
  821|  14.8k|            state->lenbits = 7;
  822|  14.8k|            ret = inflate_table(CODES, state->lens, 19, &(state->next),
  823|  14.8k|                                &(state->lenbits), state->work);
  824|  14.8k|            if (ret) {
  ------------------
  |  Branch (824:17): [True: 0, False: 14.8k]
  ------------------
  825|      0|                strm->msg = (z_const char *)"invalid code lengths set";
  826|      0|                state->mode = BAD;
  827|      0|                break;
  828|      0|            }
  829|  14.8k|            Tracev((stderr, "inflate:       code lengths ok\n"));
  830|  14.8k|            state->have = 0;
  831|  14.8k|            state->mode = CODELENS;
  832|       |                /* fallthrough */
  833|  14.8k|        case CODELENS:
  ------------------
  |  Branch (833:9): [True: 0, False: 737k]
  ------------------
  834|  1.00M|            while (state->have < state->nlen + state->ndist) {
  ------------------
  |  Branch (834:20): [True: 988k, False: 14.8k]
  ------------------
  835|  1.31M|                for (;;) {
  836|  1.31M|                    here = state->lencode[BITS(state->lenbits)];
  ------------------
  |  |  384|  1.31M|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  837|  1.31M|                    if ((unsigned)(here.bits) <= bits) break;
  ------------------
  |  Branch (837:25): [True: 988k, False: 327k]
  ------------------
  838|   327k|                    PULLBYTE();
  ------------------
  |  |  367|   327k|    do { \
  |  |  368|   327k|        if (have == 0) goto inf_leave; \
  |  |  ------------------
  |  |  |  Branch (368:13): [True: 0, False: 327k]
  |  |  ------------------
  |  |  369|   327k|        have--; \
  |  |  370|   327k|        hold += (unsigned long)(*next++) << bits; \
  |  |  371|   327k|        bits += 8; \
  |  |  372|   327k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (372:14): [Folded, False: 327k]
  |  |  ------------------
  ------------------
  839|   327k|                }
  840|   988k|                if (here.val < 16) {
  ------------------
  |  Branch (840:21): [True: 805k, False: 183k]
  ------------------
  841|   805k|                    DROPBITS(here.bits);
  ------------------
  |  |  388|   805k|    do { \
  |  |  389|   805k|        hold >>= (n); \
  |  |  390|   805k|        bits -= (unsigned)(n); \
  |  |  391|   805k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 805k]
  |  |  ------------------
  ------------------
  842|   805k|                    state->lens[state->have++] = here.val;
  843|   805k|                }
  844|   183k|                else {
  845|   183k|                    if (here.val == 16) {
  ------------------
  |  Branch (845:25): [True: 19.7k, False: 163k]
  ------------------
  846|  19.7k|                        NEEDBITS(here.bits + 2);
  ------------------
  |  |  377|  19.7k|    do { \
  |  |  378|  24.8k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 5.10k, False: 19.7k]
  |  |  ------------------
  |  |  379|  19.7k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|  5.10k|    do { \
  |  |  |  |  368|  5.10k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 5.10k]
  |  |  |  |  ------------------
  |  |  |  |  369|  5.10k|        have--; \
  |  |  |  |  370|  5.10k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|  5.10k|        bits += 8; \
  |  |  |  |  372|  5.10k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 5.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|  19.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 19.7k]
  |  |  ------------------
  ------------------
  847|  19.7k|                        DROPBITS(here.bits);
  ------------------
  |  |  388|  19.7k|    do { \
  |  |  389|  19.7k|        hold >>= (n); \
  |  |  390|  19.7k|        bits -= (unsigned)(n); \
  |  |  391|  19.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 19.7k]
  |  |  ------------------
  ------------------
  848|  19.7k|                        if (state->have == 0) {
  ------------------
  |  Branch (848:29): [True: 0, False: 19.7k]
  ------------------
  849|      0|                            strm->msg = (z_const char *)
  850|      0|                                "invalid bit length repeat";
  851|      0|                            state->mode = BAD;
  852|      0|                            break;
  853|      0|                        }
  854|  19.7k|                        len = state->lens[state->have - 1];
  855|  19.7k|                        copy = 3 + BITS(2);
  ------------------
  |  |  384|  19.7k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  856|  19.7k|                        DROPBITS(2);
  ------------------
  |  |  388|  19.7k|    do { \
  |  |  389|  19.7k|        hold >>= (n); \
  |  |  390|  19.7k|        bits -= (unsigned)(n); \
  |  |  391|  19.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 19.7k]
  |  |  ------------------
  ------------------
  857|  19.7k|                    }
  858|   163k|                    else if (here.val == 17) {
  ------------------
  |  Branch (858:30): [True: 100k, False: 63.4k]
  ------------------
  859|   100k|                        NEEDBITS(here.bits + 3);
  ------------------
  |  |  377|   100k|    do { \
  |  |  378|   137k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 37.1k, False: 100k]
  |  |  ------------------
  |  |  379|   100k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|  37.1k|    do { \
  |  |  |  |  368|  37.1k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 37.1k]
  |  |  |  |  ------------------
  |  |  |  |  369|  37.1k|        have--; \
  |  |  |  |  370|  37.1k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|  37.1k|        bits += 8; \
  |  |  |  |  372|  37.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 37.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|   100k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 100k]
  |  |  ------------------
  ------------------
  860|   100k|                        DROPBITS(here.bits);
  ------------------
  |  |  388|   100k|    do { \
  |  |  389|   100k|        hold >>= (n); \
  |  |  390|   100k|        bits -= (unsigned)(n); \
  |  |  391|   100k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 100k]
  |  |  ------------------
  ------------------
  861|   100k|                        len = 0;
  862|   100k|                        copy = 3 + BITS(3);
  ------------------
  |  |  384|   100k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  863|   100k|                        DROPBITS(3);
  ------------------
  |  |  388|   100k|    do { \
  |  |  389|   100k|        hold >>= (n); \
  |  |  390|   100k|        bits -= (unsigned)(n); \
  |  |  391|   100k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 100k]
  |  |  ------------------
  ------------------
  864|   100k|                    }
  865|  63.4k|                    else {
  866|  63.4k|                        NEEDBITS(here.bits + 7);
  ------------------
  |  |  377|  63.4k|    do { \
  |  |  378|   118k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 55.1k, False: 63.4k]
  |  |  ------------------
  |  |  379|  63.4k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|  55.1k|    do { \
  |  |  |  |  368|  55.1k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 55.1k]
  |  |  |  |  ------------------
  |  |  |  |  369|  55.1k|        have--; \
  |  |  |  |  370|  55.1k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|  55.1k|        bits += 8; \
  |  |  |  |  372|  55.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 55.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|  63.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 63.4k]
  |  |  ------------------
  ------------------
  867|  63.4k|                        DROPBITS(here.bits);
  ------------------
  |  |  388|  63.4k|    do { \
  |  |  389|  63.4k|        hold >>= (n); \
  |  |  390|  63.4k|        bits -= (unsigned)(n); \
  |  |  391|  63.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 63.4k]
  |  |  ------------------
  ------------------
  868|  63.4k|                        len = 0;
  869|  63.4k|                        copy = 11 + BITS(7);
  ------------------
  |  |  384|  63.4k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  870|  63.4k|                        DROPBITS(7);
  ------------------
  |  |  388|  63.4k|    do { \
  |  |  389|  63.4k|        hold >>= (n); \
  |  |  390|  63.4k|        bits -= (unsigned)(n); \
  |  |  391|  63.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 63.4k]
  |  |  ------------------
  ------------------
  871|  63.4k|                    }
  872|   183k|                    if (state->have + copy > state->nlen + state->ndist) {
  ------------------
  |  Branch (872:25): [True: 0, False: 183k]
  ------------------
  873|      0|                        strm->msg = (z_const char *)
  874|      0|                            "invalid bit length repeat";
  875|      0|                        state->mode = BAD;
  876|      0|                        break;
  877|      0|                    }
  878|  3.30M|                    while (copy--)
  ------------------
  |  Branch (878:28): [True: 3.11M, False: 183k]
  ------------------
  879|  3.11M|                        state->lens[state->have++] = (unsigned short)len;
  880|   183k|                }
  881|   988k|            }
  882|       |
  883|       |            /* handle error breaks in while */
  884|  14.8k|            if (state->mode == BAD) break;
  ------------------
  |  Branch (884:17): [True: 0, False: 14.8k]
  ------------------
  885|       |
  886|       |            /* check for end-of-block code (better have one) */
  887|  14.8k|            if (state->lens[256] == 0) {
  ------------------
  |  Branch (887:17): [True: 0, False: 14.8k]
  ------------------
  888|      0|                strm->msg = (z_const char *)
  889|      0|                    "invalid code -- missing end-of-block";
  890|      0|                state->mode = BAD;
  891|      0|                break;
  892|      0|            }
  893|       |
  894|       |            /* build code tables -- note: do not change the lenbits or distbits
  895|       |               values here (9 and 6) without reading the comments in inftrees.h
  896|       |               concerning the ENOUGH constants, which depend on those values */
  897|  14.8k|            state->next = state->codes;
  898|  14.8k|            state->lencode = (const code FAR *)(state->next);
  899|  14.8k|            state->lenbits = 9;
  900|  14.8k|            ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
  901|  14.8k|                                &(state->lenbits), state->work);
  902|  14.8k|            if (ret) {
  ------------------
  |  Branch (902:17): [True: 0, False: 14.8k]
  ------------------
  903|      0|                strm->msg = (z_const char *)"invalid literal/lengths set";
  904|      0|                state->mode = BAD;
  905|      0|                break;
  906|      0|            }
  907|  14.8k|            state->distcode = (const code FAR *)(state->next);
  908|  14.8k|            state->distbits = 6;
  909|  14.8k|            ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
  910|  14.8k|                            &(state->next), &(state->distbits), state->work);
  911|  14.8k|            if (ret) {
  ------------------
  |  Branch (911:17): [True: 0, False: 14.8k]
  ------------------
  912|      0|                strm->msg = (z_const char *)"invalid distances set";
  913|      0|                state->mode = BAD;
  914|      0|                break;
  915|      0|            }
  916|  14.8k|            Tracev((stderr, "inflate:       codes ok\n"));
  917|  14.8k|            state->mode = LEN_;
  918|  14.8k|            if (flush == Z_TREES) goto inf_leave;
  ------------------
  |  |  178|  14.8k|#define Z_TREES         6
  ------------------
  |  Branch (918:17): [True: 0, False: 14.8k]
  ------------------
  919|       |                /* fallthrough */
  920|  21.7k|        case LEN_:
  ------------------
  |  Branch (920:9): [True: 6.88k, False: 730k]
  ------------------
  921|  21.7k|            state->mode = LEN;
  922|       |                /* fallthrough */
  923|   362k|        case LEN:
  ------------------
  |  Branch (923:9): [True: 340k, False: 396k]
  ------------------
  924|   362k|            if (have >= 6 && left >= 258 && bits < 8) {
  ------------------
  |  Branch (924:17): [True: 362k, False: 0]
  |  Branch (924:30): [True: 18.7k, False: 343k]
  |  Branch (924:45): [True: 18.7k, False: 0]
  ------------------
  925|  18.7k|                RESTORE();
  ------------------
  |  |  348|  18.7k|    do { \
  |  |  349|  18.7k|        strm->next_out = put; \
  |  |  350|  18.7k|        strm->avail_out = left; \
  |  |  351|  18.7k|        strm->next_in = next; \
  |  |  352|  18.7k|        strm->avail_in = have; \
  |  |  353|  18.7k|        state->hold = hold; \
  |  |  354|  18.7k|        state->bits = bits; \
  |  |  355|  18.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (355:14): [Folded, False: 18.7k]
  |  |  ------------------
  ------------------
  926|  18.7k|                inflate_fast(strm, out);
  927|  18.7k|                LOAD();
  ------------------
  |  |  337|  18.7k|    do { \
  |  |  338|  18.7k|        put = strm->next_out; \
  |  |  339|  18.7k|        left = strm->avail_out; \
  |  |  340|  18.7k|        next = strm->next_in; \
  |  |  341|  18.7k|        have = strm->avail_in; \
  |  |  342|  18.7k|        hold = state->hold; \
  |  |  343|  18.7k|        bits = state->bits; \
  |  |  344|  18.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (344:14): [Folded, False: 18.7k]
  |  |  ------------------
  ------------------
  928|  18.7k|                if (state->mode == TYPE)
  ------------------
  |  Branch (928:21): [True: 16.8k, False: 1.82k]
  ------------------
  929|  16.8k|                    state->back = -1;
  930|  18.7k|                break;
  931|  18.7k|            }
  932|   343k|            state->back = 0;
  933|   572k|            for (;;) {
  934|   572k|                here = state->lencode[BITS(state->lenbits)];
  ------------------
  |  |  384|   572k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  935|   572k|                if ((unsigned)(here.bits) <= bits) break;
  ------------------
  |  Branch (935:21): [True: 343k, False: 228k]
  ------------------
  936|   228k|                PULLBYTE();
  ------------------
  |  |  367|   228k|    do { \
  |  |  368|   228k|        if (have == 0) goto inf_leave; \
  |  |  ------------------
  |  |  |  Branch (368:13): [True: 0, False: 228k]
  |  |  ------------------
  |  |  369|   228k|        have--; \
  |  |  370|   228k|        hold += (unsigned long)(*next++) << bits; \
  |  |  371|   228k|        bits += 8; \
  |  |  372|   228k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (372:14): [Folded, False: 228k]
  |  |  ------------------
  ------------------
  937|   228k|            }
  938|   343k|            if (here.op && (here.op & 0xf0) == 0) {
  ------------------
  |  Branch (938:17): [True: 32.4k, False: 311k]
  |  Branch (938:28): [True: 6.07k, False: 26.3k]
  ------------------
  939|  6.07k|                last = here;
  940|  7.53k|                for (;;) {
  941|  7.53k|                    here = state->lencode[last.val +
  942|  7.53k|                            (BITS(last.bits + last.op) >> last.bits)];
  ------------------
  |  |  384|  7.53k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  943|  7.53k|                    if ((unsigned)(last.bits + here.bits) <= bits) break;
  ------------------
  |  Branch (943:25): [True: 6.07k, False: 1.46k]
  ------------------
  944|  1.46k|                    PULLBYTE();
  ------------------
  |  |  367|  1.46k|    do { \
  |  |  368|  1.46k|        if (have == 0) goto inf_leave; \
  |  |  ------------------
  |  |  |  Branch (368:13): [True: 0, False: 1.46k]
  |  |  ------------------
  |  |  369|  1.46k|        have--; \
  |  |  370|  1.46k|        hold += (unsigned long)(*next++) << bits; \
  |  |  371|  1.46k|        bits += 8; \
  |  |  372|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (372:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  945|  1.46k|                }
  946|  6.07k|                DROPBITS(last.bits);
  ------------------
  |  |  388|  6.07k|    do { \
  |  |  389|  6.07k|        hold >>= (n); \
  |  |  390|  6.07k|        bits -= (unsigned)(n); \
  |  |  391|  6.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 6.07k]
  |  |  ------------------
  ------------------
  947|  6.07k|                state->back += last.bits;
  948|  6.07k|            }
  949|   343k|            DROPBITS(here.bits);
  ------------------
  |  |  388|   343k|    do { \
  |  |  389|   343k|        hold >>= (n); \
  |  |  390|   343k|        bits -= (unsigned)(n); \
  |  |  391|   343k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 343k]
  |  |  ------------------
  ------------------
  950|   343k|            state->back += here.bits;
  951|   343k|            state->length = (unsigned)here.val;
  952|   343k|            if ((int)(here.op) == 0) {
  ------------------
  |  Branch (952:17): [True: 316k, False: 26.9k]
  ------------------
  953|   316k|                Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
  954|   316k|                        "inflate:         literal '%c'\n" :
  955|   316k|                        "inflate:         literal 0x%02x\n", here.val));
  956|   316k|                state->mode = LIT;
  957|   316k|                break;
  958|   316k|            }
  959|  26.9k|            if (here.op & 32) {
  ------------------
  |  Branch (959:17): [True: 4.82k, False: 22.1k]
  ------------------
  960|  4.82k|                Tracevv((stderr, "inflate:         end of block\n"));
  961|  4.82k|                state->back = -1;
  962|  4.82k|                state->mode = TYPE;
  963|  4.82k|                break;
  964|  4.82k|            }
  965|  22.1k|            if (here.op & 64) {
  ------------------
  |  Branch (965:17): [True: 0, False: 22.1k]
  ------------------
  966|      0|                strm->msg = (z_const char *)"invalid literal/length code";
  967|      0|                state->mode = BAD;
  968|      0|                break;
  969|      0|            }
  970|  22.1k|            state->extra = (unsigned)(here.op) & 15;
  971|  22.1k|            state->mode = LENEXT;
  972|       |                /* fallthrough */
  973|  22.1k|        case LENEXT:
  ------------------
  |  Branch (973:9): [True: 0, False: 737k]
  ------------------
  974|  22.1k|            if (state->extra) {
  ------------------
  |  Branch (974:17): [True: 3.79k, False: 18.3k]
  ------------------
  975|  3.79k|                NEEDBITS(state->extra);
  ------------------
  |  |  377|  3.79k|    do { \
  |  |  378|  4.77k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 981, False: 3.79k]
  |  |  ------------------
  |  |  379|  3.79k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|    981|    do { \
  |  |  |  |  368|    981|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 981]
  |  |  |  |  ------------------
  |  |  |  |  369|    981|        have--; \
  |  |  |  |  370|    981|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|    981|        bits += 8; \
  |  |  |  |  372|    981|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 981]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|  3.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 3.79k]
  |  |  ------------------
  ------------------
  976|  3.79k|                state->length += BITS(state->extra);
  ------------------
  |  |  384|  3.79k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  977|  3.79k|                DROPBITS(state->extra);
  ------------------
  |  |  388|  3.79k|    do { \
  |  |  389|  3.79k|        hold >>= (n); \
  |  |  390|  3.79k|        bits -= (unsigned)(n); \
  |  |  391|  3.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 3.79k]
  |  |  ------------------
  ------------------
  978|  3.79k|                state->back += state->extra;
  979|  3.79k|            }
  980|  22.1k|            Tracevv((stderr, "inflate:         length %u\n", state->length));
  981|  22.1k|            state->was = state->length;
  982|  22.1k|            state->mode = DIST;
  983|       |                /* fallthrough */
  984|  22.1k|        case DIST:
  ------------------
  |  Branch (984:9): [True: 0, False: 737k]
  ------------------
  985|  31.9k|            for (;;) {
  986|  31.9k|                here = state->distcode[BITS(state->distbits)];
  ------------------
  |  |  384|  31.9k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  987|  31.9k|                if ((unsigned)(here.bits) <= bits) break;
  ------------------
  |  Branch (987:21): [True: 22.1k, False: 9.87k]
  ------------------
  988|  9.87k|                PULLBYTE();
  ------------------
  |  |  367|  9.87k|    do { \
  |  |  368|  9.87k|        if (have == 0) goto inf_leave; \
  |  |  ------------------
  |  |  |  Branch (368:13): [True: 0, False: 9.87k]
  |  |  ------------------
  |  |  369|  9.87k|        have--; \
  |  |  370|  9.87k|        hold += (unsigned long)(*next++) << bits; \
  |  |  371|  9.87k|        bits += 8; \
  |  |  372|  9.87k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (372:14): [Folded, False: 9.87k]
  |  |  ------------------
  ------------------
  989|  9.87k|            }
  990|  22.1k|            if ((here.op & 0xf0) == 0) {
  ------------------
  |  Branch (990:17): [True: 417, False: 21.6k]
  ------------------
  991|    417|                last = here;
  992|    555|                for (;;) {
  993|    555|                    here = state->distcode[last.val +
  994|    555|                            (BITS(last.bits + last.op) >> last.bits)];
  ------------------
  |  |  384|    555|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  995|    555|                    if ((unsigned)(last.bits + here.bits) <= bits) break;
  ------------------
  |  Branch (995:25): [True: 417, False: 138]
  ------------------
  996|    138|                    PULLBYTE();
  ------------------
  |  |  367|    138|    do { \
  |  |  368|    138|        if (have == 0) goto inf_leave; \
  |  |  ------------------
  |  |  |  Branch (368:13): [True: 0, False: 138]
  |  |  ------------------
  |  |  369|    138|        have--; \
  |  |  370|    138|        hold += (unsigned long)(*next++) << bits; \
  |  |  371|    138|        bits += 8; \
  |  |  372|    138|    } while (0)
  |  |  ------------------
  |  |  |  Branch (372:14): [Folded, False: 138]
  |  |  ------------------
  ------------------
  997|    138|                }
  998|    417|                DROPBITS(last.bits);
  ------------------
  |  |  388|    417|    do { \
  |  |  389|    417|        hold >>= (n); \
  |  |  390|    417|        bits -= (unsigned)(n); \
  |  |  391|    417|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 417]
  |  |  ------------------
  ------------------
  999|    417|                state->back += last.bits;
 1000|    417|            }
 1001|  22.1k|            DROPBITS(here.bits);
  ------------------
  |  |  388|  22.1k|    do { \
  |  |  389|  22.1k|        hold >>= (n); \
  |  |  390|  22.1k|        bits -= (unsigned)(n); \
  |  |  391|  22.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 22.1k]
  |  |  ------------------
  ------------------
 1002|  22.1k|            state->back += here.bits;
 1003|  22.1k|            if (here.op & 64) {
  ------------------
  |  Branch (1003:17): [True: 0, False: 22.1k]
  ------------------
 1004|      0|                strm->msg = (z_const char *)"invalid distance code";
 1005|      0|                state->mode = BAD;
 1006|      0|                break;
 1007|      0|            }
 1008|  22.1k|            state->offset = (unsigned)here.val;
 1009|  22.1k|            state->extra = (unsigned)(here.op) & 15;
 1010|  22.1k|            state->mode = DISTEXT;
 1011|       |                /* fallthrough */
 1012|  22.1k|        case DISTEXT:
  ------------------
  |  Branch (1012:9): [True: 0, False: 737k]
  ------------------
 1013|  22.1k|            if (state->extra) {
  ------------------
  |  Branch (1013:17): [True: 15.5k, False: 6.51k]
  ------------------
 1014|  15.5k|                NEEDBITS(state->extra);
  ------------------
  |  |  377|  15.5k|    do { \
  |  |  378|  24.5k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 8.97k, False: 15.5k]
  |  |  ------------------
  |  |  379|  15.5k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|  8.97k|    do { \
  |  |  |  |  368|  8.97k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 8.97k]
  |  |  |  |  ------------------
  |  |  |  |  369|  8.97k|        have--; \
  |  |  |  |  370|  8.97k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|  8.97k|        bits += 8; \
  |  |  |  |  372|  8.97k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 8.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|  15.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 15.5k]
  |  |  ------------------
  ------------------
 1015|  15.5k|                state->offset += BITS(state->extra);
  ------------------
  |  |  384|  15.5k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
 1016|  15.5k|                DROPBITS(state->extra);
  ------------------
  |  |  388|  15.5k|    do { \
  |  |  389|  15.5k|        hold >>= (n); \
  |  |  390|  15.5k|        bits -= (unsigned)(n); \
  |  |  391|  15.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (391:14): [Folded, False: 15.5k]
  |  |  ------------------
  ------------------
 1017|  15.5k|                state->back += state->extra;
 1018|  15.5k|            }
 1019|       |#ifdef INFLATE_STRICT
 1020|       |            if (state->offset > state->dmax) {
 1021|       |                strm->msg = (z_const char *)"invalid distance too far back";
 1022|       |                state->mode = BAD;
 1023|       |                break;
 1024|       |            }
 1025|       |#endif
 1026|  22.1k|            Tracevv((stderr, "inflate:         distance %u\n", state->offset));
 1027|  22.1k|            state->mode = MATCH;
 1028|       |                /* fallthrough */
 1029|  22.6k|        case MATCH:
  ------------------
  |  Branch (1029:9): [True: 563, False: 736k]
  ------------------
 1030|  22.6k|            if (left == 0) goto inf_leave;
  ------------------
  |  Branch (1030:17): [True: 0, False: 22.6k]
  ------------------
 1031|  22.6k|            copy = out - left;
 1032|  22.6k|            if (state->offset > copy) {         /* copy from window */
  ------------------
  |  Branch (1032:17): [True: 2.28k, False: 20.3k]
  ------------------
 1033|  2.28k|                copy = state->offset - copy;
 1034|  2.28k|                if (copy > state->whave) {
  ------------------
  |  Branch (1034:21): [True: 0, False: 2.28k]
  ------------------
 1035|      0|                    if (state->sane) {
  ------------------
  |  Branch (1035:25): [True: 0, False: 0]
  ------------------
 1036|      0|                        strm->msg = (z_const char *)
 1037|      0|                            "invalid distance too far back";
 1038|      0|                        state->mode = BAD;
 1039|      0|                        break;
 1040|      0|                    }
 1041|       |#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
 1042|       |                    Trace((stderr, "inflate.c too far\n"));
 1043|       |                    copy -= state->whave;
 1044|       |                    if (copy > state->length) copy = state->length;
 1045|       |                    if (copy > left) copy = left;
 1046|       |                    left -= copy;
 1047|       |                    state->length -= copy;
 1048|       |                    do {
 1049|       |                        *put++ = 0;
 1050|       |                    } while (--copy);
 1051|       |                    if (state->length == 0) state->mode = LEN;
 1052|       |                    break;
 1053|       |#endif
 1054|      0|                }
 1055|  2.28k|                if (copy > state->wnext) {
  ------------------
  |  Branch (1055:21): [True: 0, False: 2.28k]
  ------------------
 1056|      0|                    copy -= state->wnext;
 1057|      0|                    from = state->window + (state->wsize - copy);
 1058|      0|                }
 1059|  2.28k|                else
 1060|  2.28k|                    from = state->window + (state->wnext - copy);
 1061|  2.28k|                if (copy > state->length) copy = state->length;
  ------------------
  |  Branch (1061:21): [True: 1.25k, False: 1.03k]
  ------------------
 1062|  2.28k|            }
 1063|  20.3k|            else {                              /* copy from output */
 1064|  20.3k|                from = put - state->offset;
 1065|  20.3k|                copy = state->length;
 1066|  20.3k|            }
 1067|  22.6k|            if (copy > left) copy = left;
  ------------------
  |  Branch (1067:17): [True: 0, False: 22.6k]
  ------------------
 1068|  22.6k|            left -= copy;
 1069|  22.6k|            state->length -= copy;
 1070|   205k|            do {
 1071|   205k|                *put++ = *from++;
 1072|   205k|            } while (--copy);
  ------------------
  |  Branch (1072:22): [True: 182k, False: 22.6k]
  ------------------
 1073|  22.6k|            if (state->length == 0) state->mode = LEN;
  ------------------
  |  Branch (1073:17): [True: 22.1k, False: 563]
  ------------------
 1074|  22.6k|            break;
 1075|   316k|        case LIT:
  ------------------
  |  Branch (1075:9): [True: 316k, False: 420k]
  ------------------
 1076|   316k|            if (left == 0) goto inf_leave;
  ------------------
  |  Branch (1076:17): [True: 0, False: 316k]
  ------------------
 1077|   316k|            *put++ = (unsigned char)(state->length);
 1078|   316k|            left--;
 1079|   316k|            state->mode = LEN;
 1080|   316k|            break;
 1081|  3.87k|        case CHECK:
  ------------------
  |  Branch (1081:9): [True: 3.87k, False: 733k]
  ------------------
 1082|  3.87k|            if (state->wrap) {
  ------------------
  |  Branch (1082:17): [True: 3.87k, False: 0]
  ------------------
 1083|  3.87k|                NEEDBITS(32);
  ------------------
  |  |  377|  3.87k|    do { \
  |  |  378|  19.3k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 15.4k, False: 3.87k]
  |  |  ------------------
  |  |  379|  15.4k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|  15.4k|    do { \
  |  |  |  |  368|  15.4k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 15.4k]
  |  |  |  |  ------------------
  |  |  |  |  369|  15.4k|        have--; \
  |  |  |  |  370|  15.4k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|  15.4k|        bits += 8; \
  |  |  |  |  372|  15.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 15.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|  3.87k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 3.87k]
  |  |  ------------------
  ------------------
 1084|  3.87k|                out -= left;
 1085|  3.87k|                strm->total_out += out;
 1086|  3.87k|                state->total += out;
 1087|  3.87k|                if ((state->wrap & 4) && out)
  ------------------
  |  Branch (1087:21): [True: 3.87k, False: 0]
  |  Branch (1087:42): [True: 3.87k, False: 0]
  ------------------
 1088|  3.87k|                    strm->adler = state->check =
 1089|  3.87k|                        UPDATE_CHECK(state->check, put - out, out);
  ------------------
  |  |  311|  3.87k|    (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
  |  |  ------------------
  |  |  |  Branch (311:6): [True: 0, False: 3.87k]
  |  |  ------------------
  ------------------
 1090|  3.87k|                out = left;
 1091|  3.87k|                if ((state->wrap & 4) && (
  ------------------
  |  Branch (1091:21): [True: 3.87k, False: 0]
  |  Branch (1091:42): [True: 0, False: 3.87k]
  ------------------
 1092|  3.87k|#ifdef GUNZIP
 1093|  3.87k|                     state->flags ? hold :
  ------------------
  |  Branch (1093:22): [True: 0, False: 3.87k]
  ------------------
 1094|  3.87k|#endif
 1095|  3.87k|                     ZSWAP32(hold)) != state->check) {
  ------------------
  |  |  258|  3.87k|#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
  |  |  259|  3.87k|                    (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
  ------------------
 1096|      0|                    strm->msg = (z_const char *)"incorrect data check";
 1097|      0|                    state->mode = BAD;
 1098|      0|                    break;
 1099|      0|                }
 1100|  3.87k|                INITBITS();
  ------------------
  |  |  359|  3.87k|    do { \
  |  |  360|  3.87k|        hold = 0; \
  |  |  361|  3.87k|        bits = 0; \
  |  |  362|  3.87k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (362:14): [Folded, False: 3.87k]
  |  |  ------------------
  ------------------
 1101|  3.87k|                Tracev((stderr, "inflate:   check matches trailer\n"));
 1102|  3.87k|            }
 1103|  3.87k|#ifdef GUNZIP
 1104|  3.87k|            state->mode = LENGTH;
 1105|       |                /* fallthrough */
 1106|  3.87k|        case LENGTH:
  ------------------
  |  Branch (1106:9): [True: 0, False: 737k]
  ------------------
 1107|  3.87k|            if (state->wrap && state->flags) {
  ------------------
  |  Branch (1107:17): [True: 3.87k, False: 0]
  |  Branch (1107:32): [True: 0, False: 3.87k]
  ------------------
 1108|      0|                NEEDBITS(32);
  ------------------
  |  |  377|      0|    do { \
  |  |  378|      0|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (378:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  379|      0|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  367|      0|    do { \
  |  |  |  |  368|      0|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (368:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  369|      0|        have--; \
  |  |  |  |  370|      0|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  371|      0|        bits += 8; \
  |  |  |  |  372|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (372:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  380|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (380:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1109|      0|                if ((state->wrap & 4) && hold != (state->total & 0xffffffff)) {
  ------------------
  |  Branch (1109:21): [True: 0, False: 0]
  |  Branch (1109:42): [True: 0, False: 0]
  ------------------
 1110|      0|                    strm->msg = (z_const char *)"incorrect length check";
 1111|      0|                    state->mode = BAD;
 1112|      0|                    break;
 1113|      0|                }
 1114|      0|                INITBITS();
  ------------------
  |  |  359|      0|    do { \
  |  |  360|      0|        hold = 0; \
  |  |  361|      0|        bits = 0; \
  |  |  362|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (362:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1115|      0|                Tracev((stderr, "inflate:   length matches trailer\n"));
 1116|      0|            }
 1117|  3.87k|#endif
 1118|  3.87k|            state->mode = DONE;
 1119|       |                /* fallthrough */
 1120|  3.87k|        case DONE:
  ------------------
  |  Branch (1120:9): [True: 0, False: 737k]
  ------------------
 1121|  3.87k|            ret = Z_STREAM_END;
  ------------------
  |  |  182|  3.87k|#define Z_STREAM_END    1
  ------------------
 1122|  3.87k|            goto inf_leave;
 1123|      0|        case BAD:
  ------------------
  |  Branch (1123:9): [True: 0, False: 737k]
  ------------------
 1124|      0|            ret = Z_DATA_ERROR;
  ------------------
  |  |  186|      0|#define Z_DATA_ERROR   (-3)
  ------------------
 1125|      0|            goto inf_leave;
 1126|      0|        case MEM:
  ------------------
  |  Branch (1126:9): [True: 0, False: 737k]
  ------------------
 1127|      0|            return Z_MEM_ERROR;
  ------------------
  |  |  187|      0|#define Z_MEM_ERROR    (-4)
  ------------------
 1128|      0|        case SYNC:
  ------------------
  |  Branch (1128:9): [True: 0, False: 737k]
  ------------------
 1129|       |                /* fallthrough */
 1130|      0|        default:
  ------------------
  |  Branch (1130:9): [True: 0, False: 737k]
  ------------------
 1131|      0|            return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
 1132|   737k|        }
 1133|       |
 1134|       |    /*
 1135|       |       Return from inflate(), updating the total counts and the check value.
 1136|       |       If there was no progress during the inflate() call, return a buffer
 1137|       |       error.  Call updatewindow() to create and/or update the window state.
 1138|       |       Note: a memory error from inflate() is non-recoverable.
 1139|       |     */
 1140|  3.87k|  inf_leave:
 1141|  3.87k|    RESTORE();
  ------------------
  |  |  348|  3.87k|    do { \
  |  |  349|  3.87k|        strm->next_out = put; \
  |  |  350|  3.87k|        strm->avail_out = left; \
  |  |  351|  3.87k|        strm->next_in = next; \
  |  |  352|  3.87k|        strm->avail_in = have; \
  |  |  353|  3.87k|        state->hold = hold; \
  |  |  354|  3.87k|        state->bits = bits; \
  |  |  355|  3.87k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (355:14): [Folded, False: 3.87k]
  |  |  ------------------
  ------------------
 1142|  3.87k|    if (state->wsize || (out != strm->avail_out && state->mode < BAD &&
  ------------------
  |  Branch (1142:9): [True: 3.62k, False: 247]
  |  Branch (1142:26): [True: 0, False: 247]
  |  Branch (1142:52): [True: 0, False: 0]
  ------------------
 1143|      0|            (state->mode < CHECK || flush != Z_FINISH)))
  ------------------
  |  |  176|      0|#define Z_FINISH        4
  ------------------
  |  Branch (1143:14): [True: 0, False: 0]
  |  Branch (1143:37): [True: 0, False: 0]
  ------------------
 1144|  3.62k|        if (updatewindow(strm, strm->next_out, out - strm->avail_out)) {
  ------------------
  |  Branch (1144:13): [True: 0, False: 3.62k]
  ------------------
 1145|      0|            state->mode = MEM;
 1146|      0|            return Z_MEM_ERROR;
  ------------------
  |  |  187|      0|#define Z_MEM_ERROR    (-4)
  ------------------
 1147|      0|        }
 1148|  3.87k|    in -= strm->avail_in;
 1149|  3.87k|    out -= strm->avail_out;
 1150|  3.87k|    strm->total_in += in;
 1151|  3.87k|    strm->total_out += out;
 1152|  3.87k|    state->total += out;
 1153|  3.87k|    if ((state->wrap & 4) && out)
  ------------------
  |  Branch (1153:9): [True: 3.87k, False: 0]
  |  Branch (1153:30): [True: 0, False: 3.87k]
  ------------------
 1154|      0|        strm->adler = state->check =
 1155|      0|            UPDATE_CHECK(state->check, strm->next_out - out, out);
  ------------------
  |  |  311|      0|    (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
  |  |  ------------------
  |  |  |  Branch (311:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1156|  3.87k|    strm->data_type = (int)state->bits + (state->last ? 64 : 0) +
  ------------------
  |  Branch (1156:43): [True: 3.87k, False: 0]
  ------------------
 1157|  3.87k|                      (state->mode == TYPE ? 128 : 0) +
  ------------------
  |  Branch (1157:24): [True: 0, False: 3.87k]
  ------------------
 1158|  3.87k|                      (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0);
  ------------------
  |  Branch (1158:24): [True: 0, False: 3.87k]
  |  Branch (1158:47): [True: 0, False: 3.87k]
  ------------------
 1159|  3.87k|    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
  ------------------
  |  |  176|  3.87k|#define Z_FINISH        4
  ------------------
                  if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
  |  Branch (1159:11): [True: 0, False: 3.87k]
  |  Branch (1159:22): [True: 0, False: 0]
  |  Branch (1159:35): [True: 0, False: 3.87k]
  |  Branch (1159:57): [True: 0, False: 0]
  ------------------
 1160|      0|        ret = Z_BUF_ERROR;
  ------------------
  |  |  188|      0|#define Z_BUF_ERROR    (-5)
  ------------------
 1161|  3.87k|    return ret;
 1162|  3.87k|}
inflateEnd:
 1164|  3.87k|int ZEXPORT inflateEnd(z_streamp strm) {
 1165|  3.87k|    struct inflate_state FAR *state;
 1166|  3.87k|    if (inflateStateCheck(strm))
  ------------------
  |  Branch (1166:9): [True: 0, False: 3.87k]
  ------------------
 1167|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
 1168|  3.87k|    state = (struct inflate_state FAR *)strm->state;
 1169|  3.87k|    if (state->window != Z_NULL) ZFREE(strm, state->window);
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (state->window != Z_NULL) ZFREE(strm, state->window);
  ------------------
  |  |  254|  3.62k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
  |  Branch (1169:9): [True: 3.62k, False: 247]
  ------------------
 1170|  3.87k|    ZFREE(strm, strm->state);
  ------------------
  |  |  254|  3.87k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
 1171|  3.87k|    strm->state = Z_NULL;
  ------------------
  |  |  216|  3.87k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
 1172|  3.87k|    Tracev((stderr, "inflate: end\n"));
 1173|  3.87k|    return Z_OK;
  ------------------
  |  |  181|  3.87k|#define Z_OK            0
  ------------------
 1174|  3.87k|}
inflateSetDictionary:
 1197|  3.62k|                                 uInt dictLength) {
 1198|  3.62k|    struct inflate_state FAR *state;
 1199|  3.62k|    unsigned long dictid;
 1200|  3.62k|    int ret;
 1201|       |
 1202|       |    /* check state */
 1203|  3.62k|    if (inflateStateCheck(strm) || dictionary == Z_NULL)
  ------------------
  |  |  216|  3.62k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1203:9): [True: 0, False: 3.62k]
  |  Branch (1203:36): [True: 0, False: 3.62k]
  ------------------
 1204|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
 1205|  3.62k|    state = (struct inflate_state FAR *)strm->state;
 1206|  3.62k|    if (state->wrap != 0 && state->mode != DICT)
  ------------------
  |  Branch (1206:9): [True: 3.62k, False: 0]
  |  Branch (1206:29): [True: 0, False: 3.62k]
  ------------------
 1207|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
 1208|       |
 1209|       |    /* check for correct dictionary identifier */
 1210|  3.62k|    if (state->mode == DICT) {
  ------------------
  |  Branch (1210:9): [True: 3.62k, False: 0]
  ------------------
 1211|  3.62k|        dictid = adler32(0L, Z_NULL, 0);
  ------------------
  |  |  216|  3.62k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
 1212|  3.62k|        dictid = adler32(dictid, dictionary, dictLength);
 1213|  3.62k|        if (dictid != state->check)
  ------------------
  |  Branch (1213:13): [True: 0, False: 3.62k]
  ------------------
 1214|      0|            return Z_DATA_ERROR;
  ------------------
  |  |  186|      0|#define Z_DATA_ERROR   (-3)
  ------------------
 1215|  3.62k|    }
 1216|       |
 1217|       |    /* copy dictionary to window using updatewindow(), which will amend the
 1218|       |       existing dictionary if appropriate */
 1219|  3.62k|    ret = updatewindow(strm, dictionary + dictLength, dictLength);
 1220|  3.62k|    if (ret) {
  ------------------
  |  Branch (1220:9): [True: 0, False: 3.62k]
  ------------------
 1221|      0|        state->mode = MEM;
 1222|      0|        return Z_MEM_ERROR;
  ------------------
  |  |  187|      0|#define Z_MEM_ERROR    (-4)
  ------------------
 1223|      0|    }
 1224|  3.62k|    state->havedict = 1;
 1225|  3.62k|    Tracev((stderr, "inflate:   dictionary set\n"));
 1226|  3.62k|    return Z_OK;
  ------------------
  |  |  181|  3.62k|#define Z_OK            0
  ------------------
 1227|  3.62k|}
inflate.c:inflateStateCheck:
   88|  26.6k|local int inflateStateCheck(z_streamp strm) {
   89|  26.6k|    struct inflate_state FAR *state;
   90|  26.6k|    if (strm == Z_NULL ||
  ------------------
  |  |  216|  53.2k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (90:9): [True: 0, False: 26.6k]
  ------------------
   91|  26.6k|        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
  ------------------
  |  Branch (91:9): [True: 0, False: 26.6k]
  |  Branch (91:42): [True: 0, False: 26.6k]
  ------------------
   92|      0|        return 1;
   93|  26.6k|    state = (struct inflate_state FAR *)strm->state;
   94|  26.6k|    if (state == Z_NULL || state->strm != strm ||
  ------------------
  |  |  216|  53.2k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (94:9): [True: 0, False: 26.6k]
  |  Branch (94:28): [True: 0, False: 26.6k]
  ------------------
   95|  26.6k|        state->mode < HEAD || state->mode > SYNC)
  ------------------
  |  Branch (95:9): [True: 0, False: 26.6k]
  |  Branch (95:31): [True: 0, False: 26.6k]
  ------------------
   96|      0|        return 1;
   97|  26.6k|    return 0;
   98|  26.6k|}
inflate.c:updatewindow:
  260|  7.25k|local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) {
  261|  7.25k|    struct inflate_state FAR *state;
  262|  7.25k|    unsigned dist;
  263|       |
  264|  7.25k|    state = (struct inflate_state FAR *)strm->state;
  265|       |
  266|       |    /* if it hasn't been done already, allocate space for the window */
  267|  7.25k|    if (state->window == Z_NULL) {
  ------------------
  |  |  216|  7.25k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (267:9): [True: 3.62k, False: 3.62k]
  ------------------
  268|  3.62k|        state->window = (unsigned char FAR *)
  269|  3.62k|                        ZALLOC(strm, 1U << state->wbits,
  ------------------
  |  |  253|  3.62k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  270|  3.62k|                               sizeof(unsigned char));
  271|  3.62k|        if (state->window == Z_NULL) return 1;
  ------------------
  |  |  216|  3.62k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (271:13): [True: 0, False: 3.62k]
  ------------------
  272|  3.62k|    }
  273|       |
  274|       |    /* if window not in use yet, initialize */
  275|  7.25k|    if (state->wsize == 0) {
  ------------------
  |  Branch (275:9): [True: 3.62k, False: 3.62k]
  ------------------
  276|  3.62k|        state->wsize = 1U << state->wbits;
  277|  3.62k|        state->wnext = 0;
  278|  3.62k|        state->whave = 0;
  279|  3.62k|    }
  280|       |
  281|       |    /* copy state->wsize or less output bytes into the circular window */
  282|  7.25k|    if (copy >= state->wsize) {
  ------------------
  |  Branch (282:9): [True: 0, False: 7.25k]
  ------------------
  283|      0|        zmemcpy(state->window, end - state->wsize, state->wsize);
  ------------------
  |  |  216|      0|#    define zmemcpy memcpy
  ------------------
  284|      0|        state->wnext = 0;
  285|      0|        state->whave = state->wsize;
  286|      0|    }
  287|  7.25k|    else {
  288|  7.25k|        dist = state->wsize - state->wnext;
  289|  7.25k|        if (dist > copy) dist = copy;
  ------------------
  |  Branch (289:13): [True: 7.25k, False: 0]
  ------------------
  290|  7.25k|        zmemcpy(state->window + state->wnext, end - copy, dist);
  ------------------
  |  |  216|  7.25k|#    define zmemcpy memcpy
  ------------------
  291|  7.25k|        copy -= dist;
  292|  7.25k|        if (copy) {
  ------------------
  |  Branch (292:13): [True: 0, False: 7.25k]
  ------------------
  293|      0|            zmemcpy(state->window, end - copy, copy);
  ------------------
  |  |  216|      0|#    define zmemcpy memcpy
  ------------------
  294|      0|            state->wnext = copy;
  295|      0|            state->whave = state->wsize;
  296|      0|        }
  297|  7.25k|        else {
  298|  7.25k|            state->wnext += dist;
  299|  7.25k|            if (state->wnext == state->wsize) state->wnext = 0;
  ------------------
  |  Branch (299:17): [True: 0, False: 7.25k]
  ------------------
  300|  7.25k|            if (state->whave < state->wsize) state->whave += dist;
  ------------------
  |  Branch (300:17): [True: 7.25k, False: 0]
  ------------------
  301|  7.25k|        }
  302|  7.25k|    }
  303|  7.25k|    return 0;
  304|  7.25k|}

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

_tr_init:
  456|  3.87k|void ZLIB_INTERNAL _tr_init(deflate_state *s) {
  457|  3.87k|    tr_static_init();
  458|       |
  459|  3.87k|    s->l_desc.dyn_tree = s->dyn_ltree;
  460|  3.87k|    s->l_desc.stat_desc = &static_l_desc;
  461|       |
  462|  3.87k|    s->d_desc.dyn_tree = s->dyn_dtree;
  463|  3.87k|    s->d_desc.stat_desc = &static_d_desc;
  464|       |
  465|  3.87k|    s->bl_desc.dyn_tree = s->bl_tree;
  466|  3.87k|    s->bl_desc.stat_desc = &static_bl_desc;
  467|       |
  468|  3.87k|    s->bi_buf = 0;
  469|  3.87k|    s->bi_valid = 0;
  470|  3.87k|    s->bi_used = 0;
  471|       |#ifdef ZLIB_DEBUG
  472|       |    s->compressed_len = 0L;
  473|       |    s->bits_sent = 0L;
  474|       |#endif
  475|       |
  476|       |    /* Initialize the first block of the first file: */
  477|  3.87k|    init_block(s);
  478|  3.87k|}
_tr_stored_block:
  861|  6.83k|                                    ulg stored_len, int last) {
  862|  6.83k|    send_bits(s, (STORED_BLOCK<<1) + last, 3);  /* send block type */
  ------------------
  |  |  274|  6.83k|#define send_bits(s, value, length) \
  |  |  275|  6.83k|{ int len = length;\
  |  |  276|  6.83k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  6.83k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 0, False: 6.83k]
  |  |  ------------------
  |  |  277|      0|    int val = (int)value;\
  |  |  278|      0|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|      0|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|      0|#define put_short(s, w) { \
  |  |  |  |  145|      0|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|      0|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|      0|}
  |  |  ------------------
  |  |  280|      0|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  281|      0|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  282|  6.83k|  } else {\
  |  |  283|  6.83k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  6.83k|    s->bi_valid += len;\
  |  |  285|  6.83k|  }\
  |  |  286|  6.83k|}
  ------------------
  863|  6.83k|    bi_windup(s);        /* align on byte boundary */
  864|  6.83k|    put_short(s, (ush)stored_len);
  ------------------
  |  |  144|  6.83k|#define put_short(s, w) { \
  |  |  145|  6.83k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  ------------------
  |  |  |  |  293|  6.83k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  146|  6.83k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  ------------------
  |  |  |  |  293|  6.83k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  147|  6.83k|}
  ------------------
  865|  6.83k|    put_short(s, (ush)~stored_len);
  ------------------
  |  |  144|  6.83k|#define put_short(s, w) { \
  |  |  145|  6.83k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  ------------------
  |  |  |  |  293|  6.83k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  146|  6.83k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  ------------------
  |  |  |  |  293|  6.83k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  147|  6.83k|}
  ------------------
  866|  6.83k|    if (stored_len)
  ------------------
  |  Branch (866:9): [True: 6.83k, False: 0]
  ------------------
  867|  6.83k|        zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len);
  ------------------
  |  |  216|  6.83k|#    define zmemcpy memcpy
  ------------------
  868|  6.83k|    s->pending += stored_len;
  869|       |#ifdef ZLIB_DEBUG
  870|       |    s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
  871|       |    s->compressed_len += (stored_len + 4) << 3;
  872|       |    s->bits_sent += 2*16;
  873|       |    s->bits_sent += stored_len << 3;
  874|       |#endif
  875|  6.83k|}
_tr_flush_bits:
  880|  36.2k|void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s) {
  881|  36.2k|    bi_flush(s);
  882|  36.2k|}
_tr_flush_block:
  998|  28.5k|                                   ulg stored_len, int last) {
  999|  28.5k|    ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
 1000|  28.5k|    int max_blindex = 0;  /* index of last bit length code of non zero freq */
 1001|       |
 1002|       |    /* Build the Huffman trees unless a stored block is forced */
 1003|  28.5k|    if (s->level > 0) {
  ------------------
  |  Branch (1003:9): [True: 28.5k, False: 0]
  ------------------
 1004|       |
 1005|       |        /* Check if the file is binary or text */
 1006|  28.5k|        if (s->strm->data_type == Z_UNKNOWN)
  ------------------
  |  |  210|  28.5k|#define Z_UNKNOWN  2
  ------------------
  |  Branch (1006:13): [True: 3.87k, False: 24.6k]
  ------------------
 1007|  3.87k|            s->strm->data_type = detect_data_type(s);
 1008|       |
 1009|       |        /* Construct the literal and distance trees */
 1010|  28.5k|        build_tree(s, (tree_desc *)(&(s->l_desc)));
 1011|  28.5k|        Tracev((stderr, "\nlit data: dyn %lu, stat %lu", s->opt_len,
 1012|  28.5k|                s->static_len));
 1013|       |
 1014|  28.5k|        build_tree(s, (tree_desc *)(&(s->d_desc)));
 1015|  28.5k|        Tracev((stderr, "\ndist data: dyn %lu, stat %lu", s->opt_len,
 1016|  28.5k|                s->static_len));
 1017|       |        /* At this point, opt_len and static_len are the total bit lengths of
 1018|       |         * the compressed block data, excluding the tree representations.
 1019|       |         */
 1020|       |
 1021|       |        /* Build the bit length tree for the above two trees, and get the index
 1022|       |         * in bl_order of the last bit length code to send.
 1023|       |         */
 1024|  28.5k|        max_blindex = build_bl_tree(s);
 1025|       |
 1026|       |        /* Determine the best encoding. Compute the block lengths in bytes. */
 1027|  28.5k|        opt_lenb = (s->opt_len + 3 + 7) >> 3;
 1028|  28.5k|        static_lenb = (s->static_len + 3 + 7) >> 3;
 1029|       |
 1030|  28.5k|        Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
 1031|  28.5k|                opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
 1032|  28.5k|                s->sym_next / 3));
 1033|       |
 1034|  28.5k|#ifndef FORCE_STATIC
 1035|  28.5k|        if (static_lenb <= opt_lenb || s->strategy == Z_FIXED)
  ------------------
  |  |  203|  15.9k|#define Z_FIXED               4
  ------------------
  |  Branch (1035:13): [True: 12.6k, False: 15.9k]
  |  Branch (1035:40): [True: 436, False: 15.4k]
  ------------------
 1036|  13.0k|#endif
 1037|  13.0k|            opt_lenb = static_lenb;
 1038|       |
 1039|  28.5k|    } else {
 1040|      0|        Assert(buf != (char*)0, "lost buf");
 1041|      0|        opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
 1042|      0|    }
 1043|       |
 1044|       |#ifdef FORCE_STORED
 1045|       |    if (buf != (char*)0) { /* force stored block */
 1046|       |#else
 1047|  28.5k|    if (stored_len + 4 <= opt_lenb && buf != (char*)0) {
  ------------------
  |  Branch (1047:9): [True: 7.73k, False: 20.8k]
  |  Branch (1047:39): [True: 6.83k, False: 900]
  ------------------
 1048|       |                       /* 4: two words for the lengths */
 1049|  6.83k|#endif
 1050|       |        /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
 1051|       |         * Otherwise we can't have processed more than WSIZE input bytes since
 1052|       |         * the last block flush, because compression would have been
 1053|       |         * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
 1054|       |         * transform a block into a stored block.
 1055|       |         */
 1056|  6.83k|        _tr_stored_block(s, buf, stored_len, last);
 1057|       |
 1058|  21.7k|    } else if (static_lenb == opt_lenb) {
  ------------------
  |  Branch (1058:16): [True: 6.88k, False: 14.8k]
  ------------------
 1059|  6.88k|        send_bits(s, (STATIC_TREES<<1) + last, 3);
  ------------------
  |  |  274|  6.88k|#define send_bits(s, value, length) \
  |  |  275|  6.88k|{ int len = length;\
  |  |  276|  6.88k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  6.88k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 0, False: 6.88k]
  |  |  ------------------
  |  |  277|      0|    int val = (int)value;\
  |  |  278|      0|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|      0|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|      0|#define put_short(s, w) { \
  |  |  |  |  145|      0|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|      0|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|      0|}
  |  |  ------------------
  |  |  280|      0|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  281|      0|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  282|  6.88k|  } else {\
  |  |  283|  6.88k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  6.88k|    s->bi_valid += len;\
  |  |  285|  6.88k|  }\
  |  |  286|  6.88k|}
  ------------------
 1060|  6.88k|        compress_block(s, (const ct_data *)static_ltree,
 1061|  6.88k|                       (const ct_data *)static_dtree);
 1062|       |#ifdef ZLIB_DEBUG
 1063|       |        s->compressed_len += 3 + s->static_len;
 1064|       |#endif
 1065|  14.8k|    } else {
 1066|  14.8k|        send_bits(s, (DYN_TREES<<1) + last, 3);
  ------------------
  |  |  274|  14.8k|#define send_bits(s, value, length) \
  |  |  275|  14.8k|{ int len = length;\
  |  |  276|  14.8k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  14.8k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 0, False: 14.8k]
  |  |  ------------------
  |  |  277|      0|    int val = (int)value;\
  |  |  278|      0|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|      0|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|      0|#define put_short(s, w) { \
  |  |  |  |  145|      0|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|      0|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|      0|}
  |  |  ------------------
  |  |  280|      0|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  281|      0|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  282|  14.8k|  } else {\
  |  |  283|  14.8k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  14.8k|    s->bi_valid += len;\
  |  |  285|  14.8k|  }\
  |  |  286|  14.8k|}
  ------------------
 1067|  14.8k|        send_all_trees(s, s->l_desc.max_code + 1, s->d_desc.max_code + 1,
 1068|  14.8k|                       max_blindex + 1);
 1069|  14.8k|        compress_block(s, (const ct_data *)s->dyn_ltree,
 1070|  14.8k|                       (const ct_data *)s->dyn_dtree);
 1071|       |#ifdef ZLIB_DEBUG
 1072|       |        s->compressed_len += 3 + s->opt_len;
 1073|       |#endif
 1074|  14.8k|    }
 1075|  28.5k|    Assert (s->compressed_len == s->bits_sent, "bad compressed size");
 1076|       |    /* The above check is made mod 2^32, for files larger than 512 MB
 1077|       |     * and uLong implemented on 32 bits.
 1078|       |     */
 1079|  28.5k|    init_block(s);
 1080|       |
 1081|  28.5k|    if (last) {
  ------------------
  |  Branch (1081:9): [True: 3.87k, False: 24.6k]
  ------------------
 1082|  3.87k|        bi_windup(s);
 1083|       |#ifdef ZLIB_DEBUG
 1084|       |        s->compressed_len += 7;  /* align on byte boundary */
 1085|       |#endif
 1086|  3.87k|    }
 1087|  28.5k|    Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len >> 3,
 1088|  28.5k|           s->compressed_len - 7*(ulg)last));
 1089|  28.5k|}
trees.c:tr_static_init:
  295|  3.87k|local void tr_static_init(void) {
  296|       |#if defined(GEN_TREES_H) || !defined(STDC)
  297|       |    static int static_init_done = 0;
  298|       |    int n;        /* iterates over tree elements */
  299|       |    int bits;     /* bit counter */
  300|       |    int length;   /* length value */
  301|       |    int code;     /* code value */
  302|       |    int dist;     /* distance index */
  303|       |    ush bl_count[MAX_BITS+1];
  304|       |    /* number of codes at each bit length for an optimal tree */
  305|       |
  306|       |    if (static_init_done) return;
  307|       |
  308|       |    /* For some embedded targets, global variables are not initialized: */
  309|       |#ifdef NO_INIT_GLOBAL_POINTERS
  310|       |    static_l_desc.static_tree = static_ltree;
  311|       |    static_l_desc.extra_bits = extra_lbits;
  312|       |    static_d_desc.static_tree = static_dtree;
  313|       |    static_d_desc.extra_bits = extra_dbits;
  314|       |    static_bl_desc.extra_bits = extra_blbits;
  315|       |#endif
  316|       |
  317|       |    /* Initialize the mapping length (0..255) -> length code (0..28) */
  318|       |    length = 0;
  319|       |    for (code = 0; code < LENGTH_CODES-1; code++) {
  320|       |        base_length[code] = length;
  321|       |        for (n = 0; n < (1 << extra_lbits[code]); n++) {
  322|       |            _length_code[length++] = (uch)code;
  323|       |        }
  324|       |    }
  325|       |    Assert (length == 256, "tr_static_init: length != 256");
  326|       |    /* Note that the length 255 (match length 258) can be represented
  327|       |     * in two different ways: code 284 + 5 bits or code 285, so we
  328|       |     * overwrite length_code[255] to use the best encoding:
  329|       |     */
  330|       |    _length_code[length - 1] = (uch)code;
  331|       |
  332|       |    /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
  333|       |    dist = 0;
  334|       |    for (code = 0 ; code < 16; code++) {
  335|       |        base_dist[code] = dist;
  336|       |        for (n = 0; n < (1 << extra_dbits[code]); n++) {
  337|       |            _dist_code[dist++] = (uch)code;
  338|       |        }
  339|       |    }
  340|       |    Assert (dist == 256, "tr_static_init: dist != 256");
  341|       |    dist >>= 7; /* from now on, all distances are divided by 128 */
  342|       |    for ( ; code < D_CODES; code++) {
  343|       |        base_dist[code] = dist << 7;
  344|       |        for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {
  345|       |            _dist_code[256 + dist++] = (uch)code;
  346|       |        }
  347|       |    }
  348|       |    Assert (dist == 256, "tr_static_init: 256 + dist != 512");
  349|       |
  350|       |    /* Construct the codes of the static literal tree */
  351|       |    for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
  352|       |    n = 0;
  353|       |    while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
  354|       |    while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
  355|       |    while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
  356|       |    while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
  357|       |    /* Codes 286 and 287 do not exist, but we must include them in the
  358|       |     * tree construction to get a canonical Huffman tree (longest code
  359|       |     * all ones)
  360|       |     */
  361|       |    gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
  362|       |
  363|       |    /* The static distance tree is trivial: */
  364|       |    for (n = 0; n < D_CODES; n++) {
  365|       |        static_dtree[n].Len = 5;
  366|       |        static_dtree[n].Code = bi_reverse((unsigned)n, 5);
  367|       |    }
  368|       |    static_init_done = 1;
  369|       |
  370|       |#  ifdef GEN_TREES_H
  371|       |    gen_trees_header();
  372|       |#  endif
  373|       |#endif /* defined(GEN_TREES_H) || !defined(STDC) */
  374|  3.87k|}
trees.c:init_block:
  440|  32.4k|local void init_block(deflate_state *s) {
  441|  32.4k|    int n; /* iterates over tree elements */
  442|       |
  443|       |    /* Initialize the trees. */
  444|  9.30M|    for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
  ------------------
  |  |   40|  9.30M|#define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  ------------------
  |  |  |  |   37|  9.30M|#define LITERALS  256
  |  |  ------------------
  |  |               #define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  ------------------
  |  |  |  |   34|  9.30M|#define LENGTH_CODES 29
  |  |  ------------------
  ------------------
                  for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
  ------------------
  |  |   83|  9.27M|#define Freq fc.freq
  ------------------
  |  Branch (444:17): [True: 9.27M, False: 32.4k]
  ------------------
  445|  1.00M|    for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
  ------------------
  |  |   43|  1.00M|#define D_CODES   30
  ------------------
                  for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
  ------------------
  |  |   83|   972k|#define Freq fc.freq
  ------------------
  |  Branch (445:17): [True: 972k, False: 32.4k]
  ------------------
  446|   648k|    for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
  ------------------
  |  |   46|   648k|#define BL_CODES  19
  ------------------
                  for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
  ------------------
  |  |   83|   615k|#define Freq fc.freq
  ------------------
  |  Branch (446:17): [True: 615k, False: 32.4k]
  ------------------
  447|       |
  448|  32.4k|    s->dyn_ltree[END_BLOCK].Freq = 1;
  ------------------
  |  |   50|  32.4k|#define END_BLOCK 256
  ------------------
                  s->dyn_ltree[END_BLOCK].Freq = 1;
  ------------------
  |  |   83|  32.4k|#define Freq fc.freq
  ------------------
  449|  32.4k|    s->opt_len = s->static_len = 0L;
  450|  32.4k|    s->sym_next = s->matches = 0;
  451|  32.4k|}
trees.c:bi_windup:
  181|  10.7k|local void bi_windup(deflate_state *s) {
  182|  10.7k|    if (s->bi_valid > 8) {
  ------------------
  |  Branch (182:9): [True: 2.23k, False: 8.47k]
  ------------------
  183|  2.23k|        put_short(s, s->bi_buf);
  ------------------
  |  |  144|  2.23k|#define put_short(s, w) { \
  |  |  145|  2.23k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  ------------------
  |  |  |  |  293|  2.23k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  146|  2.23k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  ------------------
  |  |  |  |  293|  2.23k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  147|  2.23k|}
  ------------------
  184|  8.47k|    } else if (s->bi_valid > 0) {
  ------------------
  |  Branch (184:16): [True: 8.20k, False: 265]
  ------------------
  185|  8.20k|        put_byte(s, (Byte)s->bi_buf);
  ------------------
  |  |  293|  8.20k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
  186|  8.20k|    }
  187|  10.7k|    s->bi_used = ((s->bi_valid - 1) & 7) + 1;
  188|  10.7k|    s->bi_buf = 0;
  189|  10.7k|    s->bi_valid = 0;
  190|       |#ifdef ZLIB_DEBUG
  191|       |    s->bits_sent = (s->bits_sent + 7) & ~(ulg)7;
  192|       |#endif
  193|  10.7k|}
trees.c:bi_flush:
  166|  36.2k|local void bi_flush(deflate_state *s) {
  167|  36.2k|    if (s->bi_valid == 16) {
  ------------------
  |  Branch (167:9): [True: 1.57k, False: 34.7k]
  ------------------
  168|  1.57k|        put_short(s, s->bi_buf);
  ------------------
  |  |  144|  1.57k|#define put_short(s, w) { \
  |  |  145|  1.57k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  ------------------
  |  |  |  |  293|  1.57k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  146|  1.57k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  ------------------
  |  |  |  |  293|  1.57k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  147|  1.57k|}
  ------------------
  169|  1.57k|        s->bi_buf = 0;
  170|  1.57k|        s->bi_valid = 0;
  171|  34.7k|    } else if (s->bi_valid >= 8) {
  ------------------
  |  Branch (171:16): [True: 9.07k, False: 25.6k]
  ------------------
  172|  9.07k|        put_byte(s, (Byte)s->bi_buf);
  ------------------
  |  |  293|  9.07k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
  173|  9.07k|        s->bi_buf >>= 8;
  174|  9.07k|        s->bi_valid -= 8;
  175|  9.07k|    }
  176|  36.2k|}
trees.c:detect_data_type:
  966|  3.87k|local int detect_data_type(deflate_state *s) {
  967|       |    /* block_mask is the bit mask of block-listed bytes
  968|       |     * set bits 0..6, 14..25, and 28..31
  969|       |     * 0xf3ffc07f = binary 11110011111111111100000001111111
  970|       |     */
  971|  3.87k|    unsigned long block_mask = 0xf3ffc07fUL;
  972|  3.87k|    int n;
  973|       |
  974|       |    /* Check for non-textual ("block-listed") bytes. */
  975|  40.6k|    for (n = 0; n <= 31; n++, block_mask >>= 1)
  ------------------
  |  Branch (975:17): [True: 39.6k, False: 1.03k]
  ------------------
  976|  39.6k|        if ((block_mask & 1) && (s->dyn_ltree[n].Freq != 0))
  ------------------
  |  |   83|  29.3k|#define Freq fc.freq
  ------------------
  |  Branch (976:13): [True: 29.3k, False: 10.3k]
  |  Branch (976:33): [True: 2.83k, False: 26.5k]
  ------------------
  977|  2.83k|            return Z_BINARY;
  ------------------
  |  |  207|  2.83k|#define Z_BINARY   0
  ------------------
  978|       |
  979|       |    /* Check for textual ("allow-listed") bytes. */
  980|  1.03k|    if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
  ------------------
  |  |   83|  1.03k|#define Freq fc.freq
  ------------------
                  if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
  ------------------
  |  |   83|  1.00k|#define Freq fc.freq
  ------------------
  |  Branch (980:9): [True: 29, False: 1.00k]
  |  Branch (980:38): [True: 69, False: 935]
  ------------------
  981|    935|            || s->dyn_ltree[13].Freq != 0)
  ------------------
  |  |   83|    935|#define Freq fc.freq
  ------------------
  |  Branch (981:16): [True: 25, False: 910]
  ------------------
  982|    123|        return Z_TEXT;
  ------------------
  |  |  208|    123|#define Z_TEXT     1
  ------------------
  983|   120k|    for (n = 32; n < LITERALS; n++)
  ------------------
  |  |   37|   120k|#define LITERALS  256
  ------------------
  |  Branch (983:18): [True: 120k, False: 260]
  ------------------
  984|   120k|        if (s->dyn_ltree[n].Freq != 0)
  ------------------
  |  |   83|   120k|#define Freq fc.freq
  ------------------
  |  Branch (984:13): [True: 650, False: 119k]
  ------------------
  985|    650|            return Z_TEXT;
  ------------------
  |  |  208|  1.56k|#define Z_TEXT     1
  ------------------
  986|       |
  987|       |    /* There are no "block-listed" or "allow-listed" bytes:
  988|       |     * this stream either is empty or has tolerated ("gray-listed") bytes only.
  989|       |     */
  990|    260|    return Z_BINARY;
  ------------------
  |  |  207|    260|#define Z_BINARY   0
  ------------------
  991|    910|}
trees.c:build_tree:
  627|  85.6k|local void build_tree(deflate_state *s, tree_desc *desc) {
  628|  85.6k|    ct_data *tree         = desc->dyn_tree;
  629|  85.6k|    const ct_data *stree  = desc->stat_desc->static_tree;
  630|  85.6k|    int elems             = desc->stat_desc->elems;
  631|  85.6k|    int n, m;          /* iterate over heap elements */
  632|  85.6k|    int max_code = -1; /* largest code with non zero frequency */
  633|  85.6k|    int node;          /* new node being created */
  634|       |
  635|       |    /* Construct the initial heap, with least frequent element in
  636|       |     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n + 1].
  637|       |     * heap[0] is not used.
  638|       |     */
  639|  85.6k|    s->heap_len = 0, s->heap_max = HEAP_SIZE;
  ------------------
  |  |   49|  85.6k|#define HEAP_SIZE (2*L_CODES+1)
  |  |  ------------------
  |  |  |  |   40|  85.6k|#define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  85.6k|#define LITERALS  256
  |  |  |  |  ------------------
  |  |  |  |               #define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  85.6k|#define LENGTH_CODES 29
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  640|       |
  641|  9.64M|    for (n = 0; n < elems; n++) {
  ------------------
  |  Branch (641:17): [True: 9.56M, False: 85.6k]
  ------------------
  642|  9.56M|        if (tree[n].Freq != 0) {
  ------------------
  |  |   83|  9.56M|#define Freq fc.freq
  ------------------
  |  Branch (642:13): [True: 2.18M, False: 7.38M]
  ------------------
  643|  2.18M|            s->heap[++(s->heap_len)] = max_code = n;
  644|  2.18M|            s->depth[n] = 0;
  645|  7.38M|        } else {
  646|  7.38M|            tree[n].Len = 0;
  ------------------
  |  |   86|  7.38M|#define Len  dl.len
  ------------------
  647|  7.38M|        }
  648|  9.56M|    }
  649|       |
  650|       |    /* The pkzip format requires that at least one distance code exists,
  651|       |     * and that at least one bit should be sent even if there is only one
  652|       |     * possible code. So to avoid special checks later on we force at least
  653|       |     * two codes of non zero frequency.
  654|       |     */
  655|   127k|    while (s->heap_len < 2) {
  ------------------
  |  Branch (655:12): [True: 41.6k, False: 85.6k]
  ------------------
  656|  41.6k|        node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
  ------------------
  |  Branch (656:44): [True: 40.3k, False: 1.29k]
  ------------------
  657|  41.6k|        tree[node].Freq = 1;
  ------------------
  |  |   83|  41.6k|#define Freq fc.freq
  ------------------
  658|  41.6k|        s->depth[node] = 0;
  659|  41.6k|        s->opt_len--; if (stree) s->static_len -= stree[node].Len;
  ------------------
  |  |   86|  41.6k|#define Len  dl.len
  ------------------
  |  Branch (659:27): [True: 41.6k, False: 0]
  ------------------
  660|       |        /* node is 0 or 1 so it does not have extra bits */
  661|  41.6k|    }
  662|  85.6k|    desc->max_code = max_code;
  663|       |
  664|       |    /* The elements heap[heap_len/2 + 1 .. heap_len] are leaves of the tree,
  665|       |     * establish sub-heaps of increasing lengths:
  666|       |     */
  667|  1.18M|    for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
  ------------------
  |  Branch (667:29): [True: 1.09M, False: 85.6k]
  ------------------
  668|       |
  669|       |    /* Construct the Huffman tree by repeatedly combining the least two
  670|       |     * frequent nodes.
  671|       |     */
  672|  85.6k|    node = elems;              /* next internal node of the tree */
  673|  2.13M|    do {
  674|  2.13M|        pqremove(s, tree, n);  /* n = node of least frequency */
  ------------------
  |  |  488|  2.13M|#define pqremove(s, tree, top) \
  |  |  489|  2.13M|{\
  |  |  490|  2.13M|    top = s->heap[SMALLEST]; \
  |  |  ------------------
  |  |  |  |  480|  2.13M|#define SMALLEST 1
  |  |  ------------------
  |  |  491|  2.13M|    s->heap[SMALLEST] = s->heap[s->heap_len--]; \
  |  |  ------------------
  |  |  |  |  480|  2.13M|#define SMALLEST 1
  |  |  ------------------
  |  |  492|  2.13M|    pqdownheap(s, tree, SMALLEST); \
  |  |  ------------------
  |  |  |  |  480|  2.13M|#define SMALLEST 1
  |  |  ------------------
  |  |  493|  2.13M|}
  ------------------
  675|  2.13M|        m = s->heap[SMALLEST]; /* m = node of next least frequency */
  ------------------
  |  |  480|  2.13M|#define SMALLEST 1
  ------------------
  676|       |
  677|  2.13M|        s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
  678|  2.13M|        s->heap[--(s->heap_max)] = m;
  679|       |
  680|       |        /* Create a new node father of n and m */
  681|  2.13M|        tree[node].Freq = tree[n].Freq + tree[m].Freq;
  ------------------
  |  |   83|  2.13M|#define Freq fc.freq
  ------------------
                      tree[node].Freq = tree[n].Freq + tree[m].Freq;
  ------------------
  |  |   83|  2.13M|#define Freq fc.freq
  ------------------
                      tree[node].Freq = tree[n].Freq + tree[m].Freq;
  ------------------
  |  |   83|  2.13M|#define Freq fc.freq
  ------------------
  682|  2.13M|        s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?
  ------------------
  |  Branch (682:33): [True: 1.87M, False: 260k]
  ------------------
  683|  1.87M|                                s->depth[n] : s->depth[m]) + 1);
  684|  2.13M|        tree[n].Dad = tree[m].Dad = (ush)node;
  ------------------
  |  |   85|  2.13M|#define Dad  dl.dad
  ------------------
                      tree[n].Dad = tree[m].Dad = (ush)node;
  ------------------
  |  |   85|  2.13M|#define Dad  dl.dad
  ------------------
  685|       |#ifdef DUMP_BL_TREE
  686|       |        if (tree == s->bl_tree) {
  687|       |            fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
  688|       |                    node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
  689|       |        }
  690|       |#endif
  691|       |        /* and insert the new node in the heap */
  692|  2.13M|        s->heap[SMALLEST] = node++;
  ------------------
  |  |  480|  2.13M|#define SMALLEST 1
  ------------------
  693|  2.13M|        pqdownheap(s, tree, SMALLEST);
  ------------------
  |  |  480|  2.13M|#define SMALLEST 1
  ------------------
  694|       |
  695|  2.13M|    } while (s->heap_len >= 2);
  ------------------
  |  Branch (695:14): [True: 2.05M, False: 85.6k]
  ------------------
  696|       |
  697|  85.6k|    s->heap[--(s->heap_max)] = s->heap[SMALLEST];
  ------------------
  |  |  480|  85.6k|#define SMALLEST 1
  ------------------
  698|       |
  699|       |    /* At this point, the fields freq and dad are set. We can now
  700|       |     * generate the bit lengths.
  701|       |     */
  702|  85.6k|    gen_bitlen(s, (tree_desc *)desc);
  703|       |
  704|       |    /* The field len is now set, we can generate the bit codes */
  705|  85.6k|    gen_codes ((ct_data *)tree, max_code, s->bl_count);
  706|  85.6k|}
trees.c:pqdownheap:
  509|  5.37M|local void pqdownheap(deflate_state *s, ct_data *tree, int k) {
  510|  5.37M|    int v = s->heap[k];
  511|  5.37M|    int j = k << 1;  /* left son of k */
  512|  21.0M|    while (j <= s->heap_len) {
  ------------------
  |  Branch (512:12): [True: 17.5M, False: 3.51M]
  ------------------
  513|       |        /* Set j to the smallest of the two sons: */
  514|  17.5M|        if (j < s->heap_len &&
  ------------------
  |  Branch (514:13): [True: 17.0M, False: 525k]
  ------------------
  515|  17.0M|            smaller(tree, s->heap[j + 1], s->heap[j], s->depth)) {
  ------------------
  |  |  500|  17.0M|   (tree[n].Freq < tree[m].Freq || \
  |  |  ------------------
  |  |  |  |   83|  17.0M|#define Freq fc.freq
  |  |  ------------------
  |  |                  (tree[n].Freq < tree[m].Freq || \
  |  |  ------------------
  |  |  |  |   83|  34.0M|#define Freq fc.freq
  |  |  ------------------
  |  |  |  Branch (500:5): [True: 1.82M, False: 15.1M]
  |  |  ------------------
  |  |  501|  17.0M|   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
  |  |  ------------------
  |  |  |  |   83|  15.1M|#define Freq fc.freq
  |  |  ------------------
  |  |                  (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
  |  |  ------------------
  |  |  |  |   83|  30.3M|#define Freq fc.freq
  |  |  ------------------
  |  |  |  Branch (501:5): [True: 8.62M, False: 6.56M]
  |  |  |  Branch (501:37): [True: 6.91M, False: 1.71M]
  |  |  ------------------
  ------------------
  516|  8.74M|            j++;
  517|  8.74M|        }
  518|       |        /* Exit if v is smaller than both sons */
  519|  17.5M|        if (smaller(tree, v, s->heap[j], s->depth)) break;
  ------------------
  |  |  500|  17.5M|   (tree[n].Freq < tree[m].Freq || \
  |  |  ------------------
  |  |  |  |   83|  17.5M|#define Freq fc.freq
  |  |  ------------------
  |  |                  (tree[n].Freq < tree[m].Freq || \
  |  |  ------------------
  |  |  |  |   83|  35.0M|#define Freq fc.freq
  |  |  ------------------
  |  |  |  Branch (500:5): [True: 512k, False: 17.0M]
  |  |  ------------------
  |  |  501|  17.5M|   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
  |  |  ------------------
  |  |  |  |   83|  17.0M|#define Freq fc.freq
  |  |  ------------------
  |  |                  (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
  |  |  ------------------
  |  |  |  |   83|  34.0M|#define Freq fc.freq
  |  |  ------------------
  |  |  |  Branch (501:5): [True: 2.40M, False: 14.6M]
  |  |  |  Branch (501:37): [True: 1.34M, False: 1.05M]
  |  |  ------------------
  ------------------
  520|       |
  521|       |        /* Exchange v with the smallest son */
  522|  15.6M|        s->heap[k] = s->heap[j];  k = j;
  523|       |
  524|       |        /* And continue down the tree, setting j to the left son of k */
  525|  15.6M|        j <<= 1;
  526|  15.6M|    }
  527|  5.37M|    s->heap[k] = v;
  528|  5.37M|}
trees.c:gen_bitlen:
  540|  85.6k|local void gen_bitlen(deflate_state *s, tree_desc *desc) {
  541|  85.6k|    ct_data *tree        = desc->dyn_tree;
  542|  85.6k|    int max_code         = desc->max_code;
  543|  85.6k|    const ct_data *stree = desc->stat_desc->static_tree;
  544|  85.6k|    const intf *extra    = desc->stat_desc->extra_bits;
  545|  85.6k|    int base             = desc->stat_desc->extra_base;
  546|  85.6k|    int max_length       = desc->stat_desc->max_length;
  547|  85.6k|    int h;              /* heap index */
  548|  85.6k|    int n, m;           /* iterate over the tree elements */
  549|  85.6k|    int bits;           /* bit length */
  550|  85.6k|    int xbits;          /* extra bits */
  551|  85.6k|    ush f;              /* frequency */
  552|  85.6k|    int overflow = 0;   /* number of elements with bit length too large */
  553|       |
  554|  1.45M|    for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
  ------------------
  |  |   52|  1.45M|#define MAX_BITS 15
  ------------------
  |  Branch (554:20): [True: 1.37M, False: 85.6k]
  ------------------
  555|       |
  556|       |    /* In a first pass, compute the optimal bit lengths (which may
  557|       |     * overflow in the case of the bit length tree).
  558|       |     */
  559|  85.6k|    tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
  ------------------
  |  |   86|  85.6k|#define Len  dl.len
  ------------------
  560|       |
  561|  4.36M|    for (h = s->heap_max + 1; h < HEAP_SIZE; h++) {
  ------------------
  |  |   49|  4.36M|#define HEAP_SIZE (2*L_CODES+1)
  |  |  ------------------
  |  |  |  |   40|  4.36M|#define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  4.36M|#define LITERALS  256
  |  |  |  |  ------------------
  |  |  |  |               #define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.36M|#define LENGTH_CODES 29
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (561:31): [True: 4.27M, False: 85.6k]
  ------------------
  562|  4.27M|        n = s->heap[h];
  563|  4.27M|        bits = tree[tree[n].Dad].Len + 1;
  ------------------
  |  |   85|  4.27M|#define Dad  dl.dad
  ------------------
                      bits = tree[tree[n].Dad].Len + 1;
  ------------------
  |  |   86|  4.27M|#define Len  dl.len
  ------------------
  564|  4.27M|        if (bits > max_length) bits = max_length, overflow++;
  ------------------
  |  Branch (564:13): [True: 6.83k, False: 4.27M]
  ------------------
  565|  4.27M|        tree[n].Len = (ush)bits;
  ------------------
  |  |   86|  4.27M|#define Len  dl.len
  ------------------
  566|       |        /* We overwrite tree[n].Dad which is no longer needed */
  567|       |
  568|  4.27M|        if (n > max_code) continue; /* not a leaf node */
  ------------------
  |  Branch (568:13): [True: 2.05M, False: 2.22M]
  ------------------
  569|       |
  570|  2.22M|        s->bl_count[bits]++;
  571|  2.22M|        xbits = 0;
  572|  2.22M|        if (n >= base) xbits = extra[n - base];
  ------------------
  |  Branch (572:13): [True: 379k, False: 1.84M]
  ------------------
  573|  2.22M|        f = tree[n].Freq;
  ------------------
  |  |   83|  2.22M|#define Freq fc.freq
  ------------------
  574|  2.22M|        s->opt_len += (ulg)f * (unsigned)(bits + xbits);
  575|  2.22M|        if (stree) s->static_len += (ulg)f * (unsigned)(stree[n].Len + xbits);
  ------------------
  |  |   86|  2.00M|#define Len  dl.len
  ------------------
  |  Branch (575:13): [True: 2.00M, False: 221k]
  ------------------
  576|  2.22M|    }
  577|  85.6k|    if (overflow == 0) return;
  ------------------
  |  Branch (577:9): [True: 83.4k, False: 2.18k]
  ------------------
  578|       |
  579|  2.18k|    Tracev((stderr,"\nbit length overflow\n"));
  580|       |    /* This happens for example on obj2 and pic of the Calgary corpus */
  581|       |
  582|       |    /* Find the first bit length which could increase: */
  583|  3.41k|    do {
  584|  3.41k|        bits = max_length - 1;
  585|  5.03k|        while (s->bl_count[bits] == 0) bits--;
  ------------------
  |  Branch (585:16): [True: 1.61k, False: 3.41k]
  ------------------
  586|  3.41k|        s->bl_count[bits]--;        /* move one leaf down the tree */
  587|  3.41k|        s->bl_count[bits + 1] += 2; /* move one overflow item as its brother */
  588|  3.41k|        s->bl_count[max_length]--;
  589|       |        /* The brother of the overflow item also moves one step up,
  590|       |         * but this does not affect bl_count[max_length]
  591|       |         */
  592|  3.41k|        overflow -= 2;
  593|  3.41k|    } while (overflow > 0);
  ------------------
  |  Branch (593:14): [True: 1.23k, False: 2.18k]
  ------------------
  594|       |
  595|       |    /* Now recompute all bit lengths, scanning in increasing frequency.
  596|       |     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
  597|       |     * lengths instead of fixing only the wrong ones. This idea is taken
  598|       |     * from 'ar' written by Haruhiko Okumura.)
  599|       |     */
  600|  17.5k|    for (bits = max_length; bits != 0; bits--) {
  ------------------
  |  Branch (600:29): [True: 15.3k, False: 2.18k]
  ------------------
  601|  15.3k|        n = s->bl_count[bits];
  602|  58.2k|        while (n != 0) {
  ------------------
  |  Branch (602:16): [True: 42.8k, False: 15.3k]
  ------------------
  603|  42.8k|            m = s->heap[--h];
  604|  42.8k|            if (m > max_code) continue;
  ------------------
  |  Branch (604:17): [True: 17.8k, False: 25.0k]
  ------------------
  605|  25.0k|            if ((unsigned) tree[m].Len != (unsigned) bits) {
  ------------------
  |  |   86|  25.0k|#define Len  dl.len
  ------------------
  |  Branch (605:17): [True: 3.06k, False: 22.0k]
  ------------------
  606|  3.06k|                Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
  607|  3.06k|                s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
  ------------------
  |  |   86|  3.06k|#define Len  dl.len
  ------------------
                              s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
  ------------------
  |  |   83|  3.06k|#define Freq fc.freq
  ------------------
  608|  3.06k|                tree[m].Len = (ush)bits;
  ------------------
  |  |   86|  3.06k|#define Len  dl.len
  ------------------
  609|  3.06k|            }
  610|  25.0k|            n--;
  611|  25.0k|        }
  612|  15.3k|    }
  613|  2.18k|}
trees.c:gen_codes:
  203|  85.6k|local void gen_codes(ct_data *tree, int max_code, ushf *bl_count) {
  204|  85.6k|    ush next_code[MAX_BITS+1]; /* next code value for each bit length */
  205|  85.6k|    unsigned code = 0;         /* running code value */
  206|  85.6k|    int bits;                  /* bit index */
  207|  85.6k|    int n;                     /* code index */
  208|       |
  209|       |    /* The distribution counts are first used to generate the code values
  210|       |     * without bit reversal.
  211|       |     */
  212|  1.37M|    for (bits = 1; bits <= MAX_BITS; bits++) {
  ------------------
  |  |   52|  1.37M|#define MAX_BITS 15
  ------------------
  |  Branch (212:20): [True: 1.28M, False: 85.6k]
  ------------------
  213|  1.28M|        code = (code + bl_count[bits - 1]) << 1;
  214|  1.28M|        next_code[bits] = (ush)code;
  215|  1.28M|    }
  216|       |    /* Check that the bit counts in bl_count are consistent. The last code
  217|       |     * must be all ones.
  218|       |     */
  219|  85.6k|    Assert (code + bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1,
  220|  85.6k|            "inconsistent bit counts");
  221|  85.6k|    Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
  222|       |
  223|  8.22M|    for (n = 0;  n <= max_code; n++) {
  ------------------
  |  Branch (223:18): [True: 8.13M, False: 85.6k]
  ------------------
  224|  8.13M|        int len = tree[n].Len;
  ------------------
  |  |   86|  8.13M|#define Len  dl.len
  ------------------
  225|  8.13M|        if (len == 0) continue;
  ------------------
  |  Branch (225:13): [True: 5.91M, False: 2.22M]
  ------------------
  226|       |        /* Now reverse the bits */
  227|  2.22M|        tree[n].Code = (ush)bi_reverse(next_code[len]++, len);
  ------------------
  |  |   84|  2.22M|#define Code fc.code
  ------------------
  228|       |
  229|  2.22M|        Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
  230|  2.22M|            n, (isgraph(n & 0xff) ? n : ' '), len, tree[n].Code, next_code[len] - 1));
  231|  2.22M|    }
  232|  85.6k|}
trees.c:bi_reverse:
  154|  2.22M|local unsigned bi_reverse(unsigned code, int len) {
  155|  2.22M|    unsigned res = 0;
  156|  14.5M|    do {
  157|  14.5M|        res |= code & 1;
  158|  14.5M|        code >>= 1, res <<= 1;
  159|  14.5M|    } while (--len > 0);
  ------------------
  |  Branch (159:14): [True: 12.3M, False: 2.22M]
  ------------------
  160|  2.22M|    return res >> 1;
  161|  2.22M|}
trees.c:build_bl_tree:
  800|  28.5k|local int build_bl_tree(deflate_state *s) {
  801|  28.5k|    int max_blindex;  /* index of last bit length code of non zero freq */
  802|       |
  803|       |    /* Determine the bit length frequencies for literal and distance trees */
  804|  28.5k|    scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
  805|  28.5k|    scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
  806|       |
  807|       |    /* Build the bit length tree: */
  808|  28.5k|    build_tree(s, (tree_desc *)(&(s->bl_desc)));
  809|       |    /* opt_len now includes the length of the tree representations, except the
  810|       |     * lengths of the bit lengths codes and the 5 + 5 + 4 bits for the counts.
  811|       |     */
  812|       |
  813|       |    /* Determine the number of bit length codes to send. The pkzip format
  814|       |     * requires that at least 4 bit length codes be sent. (appnote.txt says
  815|       |     * 3 but the actual value used is 4.)
  816|       |     */
  817|  66.8k|    for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
  ------------------
  |  |   46|  28.5k|#define BL_CODES  19
  ------------------
  |  Branch (817:36): [True: 66.8k, False: 0]
  ------------------
  818|  66.8k|        if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
  ------------------
  |  |   86|  66.8k|#define Len  dl.len
  ------------------
  |  Branch (818:13): [True: 28.5k, False: 38.3k]
  ------------------
  819|  66.8k|    }
  820|       |    /* Update opt_len to include the bit length tree and counts */
  821|  28.5k|    s->opt_len += 3*((ulg)max_blindex + 1) + 5 + 5 + 4;
  822|  28.5k|    Tracev((stderr, "\ndyn trees: dyn %lu, stat %lu",
  823|  28.5k|            s->opt_len, s->static_len));
  824|       |
  825|  28.5k|    return max_blindex;
  826|  28.5k|}
trees.c:scan_tree:
  712|  57.0k|local void scan_tree(deflate_state *s, ct_data *tree, int max_code) {
  713|  57.0k|    int n;                     /* iterates over all tree elements */
  714|  57.0k|    int prevlen = -1;          /* last emitted length */
  715|  57.0k|    int curlen;                /* length of current code */
  716|  57.0k|    int nextlen = tree[0].Len; /* length of next code */
  ------------------
  |  |   86|  57.0k|#define Len  dl.len
  ------------------
  717|  57.0k|    int count = 0;             /* repeat count of the current code */
  718|  57.0k|    int max_count = 7;         /* max repeat count */
  719|  57.0k|    int min_count = 4;         /* min repeat count */
  720|       |
  721|  57.0k|    if (nextlen == 0) max_count = 138, min_count = 3;
  ------------------
  |  Branch (721:9): [True: 10.4k, False: 46.6k]
  ------------------
  722|  57.0k|    tree[max_code + 1].Len = (ush)0xffff; /* guard */
  ------------------
  |  |   86|  57.0k|#define Len  dl.len
  ------------------
  723|       |
  724|  7.66M|    for (n = 0; n <= max_code; n++) {
  ------------------
  |  Branch (724:17): [True: 7.60M, False: 57.0k]
  ------------------
  725|  7.60M|        curlen = nextlen; nextlen = tree[n + 1].Len;
  ------------------
  |  |   86|  7.60M|#define Len  dl.len
  ------------------
  726|  7.60M|        if (++count < max_count && curlen == nextlen) {
  ------------------
  |  Branch (726:13): [True: 7.59M, False: 13.7k]
  |  Branch (726:36): [True: 5.24M, False: 2.34M]
  ------------------
  727|  5.24M|            continue;
  728|  5.24M|        } else if (count < min_count) {
  ------------------
  |  Branch (728:20): [True: 1.91M, False: 443k]
  ------------------
  729|  1.91M|            s->bl_tree[curlen].Freq += (ush)count;
  ------------------
  |  |   83|  1.91M|#define Freq fc.freq
  ------------------
  730|  1.91M|        } else if (curlen != 0) {
  ------------------
  |  Branch (730:20): [True: 43.9k, False: 399k]
  ------------------
  731|  43.9k|            if (curlen != prevlen) s->bl_tree[curlen].Freq++;
  ------------------
  |  |   83|  40.0k|#define Freq fc.freq
  ------------------
  |  Branch (731:17): [True: 40.0k, False: 3.91k]
  ------------------
  732|  43.9k|            s->bl_tree[REP_3_6].Freq++;
  ------------------
  |  |   53|  43.9k|#define REP_3_6      16
  ------------------
                          s->bl_tree[REP_3_6].Freq++;
  ------------------
  |  |   83|  43.9k|#define Freq fc.freq
  ------------------
  733|   399k|        } else if (count <= 10) {
  ------------------
  |  Branch (733:20): [True: 302k, False: 97.2k]
  ------------------
  734|   302k|            s->bl_tree[REPZ_3_10].Freq++;
  ------------------
  |  |   56|   302k|#define REPZ_3_10    17
  ------------------
                          s->bl_tree[REPZ_3_10].Freq++;
  ------------------
  |  |   83|   302k|#define Freq fc.freq
  ------------------
  735|   302k|        } else {
  736|  97.2k|            s->bl_tree[REPZ_11_138].Freq++;
  ------------------
  |  |   59|  97.2k|#define REPZ_11_138  18
  ------------------
                          s->bl_tree[REPZ_11_138].Freq++;
  ------------------
  |  |   83|  97.2k|#define Freq fc.freq
  ------------------
  737|  97.2k|        }
  738|  2.35M|        count = 0; prevlen = curlen;
  739|  2.35M|        if (nextlen == 0) {
  ------------------
  |  Branch (739:13): [True: 860k, False: 1.49M]
  ------------------
  740|   860k|            max_count = 138, min_count = 3;
  741|  1.49M|        } else if (curlen == nextlen) {
  ------------------
  |  Branch (741:20): [True: 6.03k, False: 1.49M]
  ------------------
  742|  6.03k|            max_count = 6, min_count = 3;
  743|  1.49M|        } else {
  744|  1.49M|            max_count = 7, min_count = 4;
  745|  1.49M|        }
  746|  2.35M|    }
  747|  57.0k|}
trees.c:compress_block:
  901|  21.7k|                          const ct_data *dtree) {
  902|  21.7k|    unsigned dist;      /* distance of matched string */
  903|  21.7k|    int lc;             /* match length or unmatched char (if dist == 0) */
  904|  21.7k|    unsigned sx = 0;    /* running index in symbol buffers */
  905|  21.7k|    unsigned code;      /* the code to send */
  906|  21.7k|    int extra;          /* number of extra bits to send */
  907|       |
  908|  9.88M|    if (s->sym_next != 0) do {
  ------------------
  |  Branch (908:9): [True: 21.4k, False: 288]
  ------------------
  909|       |#ifdef LIT_MEM
  910|       |        dist = s->d_buf[sx];
  911|       |        lc = s->l_buf[sx++];
  912|       |#else
  913|  9.88M|        dist = s->sym_buf[sx++] & 0xff;
  914|  9.88M|        dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8;
  915|  9.88M|        lc = s->sym_buf[sx++];
  916|  9.88M|#endif
  917|  9.88M|        if (dist == 0) {
  ------------------
  |  Branch (917:13): [True: 9.48M, False: 403k]
  ------------------
  918|  9.48M|            send_code(s, lc, ltree); /* send a literal byte */
  ------------------
  |  |  239|  9.48M|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|  9.48M|#define send_bits(s, value, length) \
  |  |  |  |  275|  9.48M|{ int len = length;\
  |  |  |  |  276|  9.48M|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  9.48M|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 3.25M, False: 6.23M]
  |  |  |  |  ------------------
  |  |  |  |  277|  3.25M|    int val = (int)value;\
  |  |  |  |  278|  3.25M|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  3.25M|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  3.25M|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  3.25M|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  3.25M|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  3.25M|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  3.25M|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  3.25M|}
  |  |  |  |  ------------------
  |  |  |  |  280|  3.25M|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  3.25M|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  3.25M|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  3.25M|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  6.23M|  } else {\
  |  |  |  |  283|  6.23M|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|  6.23M|    s->bi_valid += len;\
  |  |  |  |  285|  6.23M|  }\
  |  |  |  |  286|  9.48M|}
  |  |  ------------------
  ------------------
  919|  9.48M|            Tracecv(isgraph(lc), (stderr," '%c' ", lc));
  920|  9.48M|        } else {
  921|       |            /* Here, lc is the match length - MIN_MATCH */
  922|   403k|            code = _length_code[lc];
  923|   403k|            send_code(s, code + LITERALS + 1, ltree);   /* send length code */
  ------------------
  |  |  239|   403k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|   403k|#define send_bits(s, value, length) \
  |  |  |  |  275|   403k|{ int len = length;\
  |  |  |  |  276|   403k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   403k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 150k, False: 253k]
  |  |  |  |  ------------------
  |  |  |  |  277|   150k|    int val = (int)value;\
  |  |  |  |  278|   150k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|   150k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|   150k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|   150k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   150k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   150k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   150k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   150k|}
  |  |  |  |  ------------------
  |  |  |  |  280|   150k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   150k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|   150k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   150k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|   253k|  } else {\
  |  |  |  |  283|   253k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|   253k|    s->bi_valid += len;\
  |  |  |  |  285|   253k|  }\
  |  |  |  |  286|   403k|}
  |  |  ------------------
  ------------------
  924|   403k|            extra = extra_lbits[code];
  925|   403k|            if (extra != 0) {
  ------------------
  |  Branch (925:17): [True: 86.8k, False: 316k]
  ------------------
  926|  86.8k|                lc -= base_length[code];
  927|  86.8k|                send_bits(s, lc, extra);       /* send the extra length bits */
  ------------------
  |  |  274|  86.8k|#define send_bits(s, value, length) \
  |  |  275|  86.8k|{ int len = length;\
  |  |  276|  86.8k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  86.8k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 12.7k, False: 74.0k]
  |  |  ------------------
  |  |  277|  12.7k|    int val = (int)value;\
  |  |  278|  12.7k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  12.7k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  12.7k|#define put_short(s, w) { \
  |  |  |  |  145|  12.7k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  12.7k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  12.7k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  12.7k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  12.7k|}
  |  |  ------------------
  |  |  280|  12.7k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  12.7k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  12.7k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  12.7k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  74.0k|  } else {\
  |  |  283|  74.0k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  74.0k|    s->bi_valid += len;\
  |  |  285|  74.0k|  }\
  |  |  286|  86.8k|}
  ------------------
  928|  86.8k|            }
  929|   403k|            dist--; /* dist is now the match distance - 1 */
  930|   403k|            code = d_code(dist);
  ------------------
  |  |  321|   403k|   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
  |  |  ------------------
  |  |  |  Branch (321:5): [True: 286k, False: 117k]
  |  |  ------------------
  ------------------
  931|   403k|            Assert (code < D_CODES, "bad d_code");
  932|       |
  933|   403k|            send_code(s, code, dtree);       /* send the distance code */
  ------------------
  |  |  239|   403k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|   403k|#define send_bits(s, value, length) \
  |  |  |  |  275|   403k|{ int len = length;\
  |  |  |  |  276|   403k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   403k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 97.8k, False: 305k]
  |  |  |  |  ------------------
  |  |  |  |  277|  97.8k|    int val = (int)value;\
  |  |  |  |  278|  97.8k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  97.8k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  97.8k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  97.8k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  97.8k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  97.8k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  97.8k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  97.8k|}
  |  |  |  |  ------------------
  |  |  |  |  280|  97.8k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  97.8k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  97.8k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  97.8k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|   305k|  } else {\
  |  |  |  |  283|   305k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|   305k|    s->bi_valid += len;\
  |  |  |  |  285|   305k|  }\
  |  |  |  |  286|   403k|}
  |  |  ------------------
  ------------------
  934|   403k|            extra = extra_dbits[code];
  935|   403k|            if (extra != 0) {
  ------------------
  |  Branch (935:17): [True: 308k, False: 94.3k]
  ------------------
  936|   308k|                dist -= (unsigned)base_dist[code];
  937|   308k|                send_bits(s, (int)dist, extra); /* send the extra bits */
  ------------------
  |  |  274|   308k|#define send_bits(s, value, length) \
  |  |  275|   308k|{ int len = length;\
  |  |  276|   308k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|   308k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 119k, False: 189k]
  |  |  ------------------
  |  |  277|   119k|    int val = (int)value;\
  |  |  278|   119k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|   119k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|   119k|#define put_short(s, w) { \
  |  |  |  |  145|   119k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|   119k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|   119k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|   119k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|   119k|}
  |  |  ------------------
  |  |  280|   119k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|   119k|#define Buf_size 16
  |  |  ------------------
  |  |  281|   119k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|   119k|#define Buf_size 16
  |  |  ------------------
  |  |  282|   189k|  } else {\
  |  |  283|   189k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|   189k|    s->bi_valid += len;\
  |  |  285|   189k|  }\
  |  |  286|   308k|}
  ------------------
  938|   308k|            }
  939|   403k|        } /* literal or match pair ? */
  940|       |
  941|       |        /* Check for no overlay of pending_buf on needed symbols */
  942|       |#ifdef LIT_MEM
  943|       |        Assert(s->pending < 2 * (s->lit_bufsize + sx), "pendingBuf overflow");
  944|       |#else
  945|  9.88M|        Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow");
  946|  9.88M|#endif
  947|       |
  948|  9.88M|    } while (sx < s->sym_next);
  ------------------
  |  Branch (948:14): [True: 9.86M, False: 21.4k]
  ------------------
  949|       |
  950|  21.7k|    send_code(s, END_BLOCK, ltree);
  ------------------
  |  |  239|  21.7k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|  21.7k|#define send_bits(s, value, length) \
  |  |  |  |  275|  21.7k|{ int len = length;\
  |  |  |  |  276|  21.7k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  21.7k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 8.38k, False: 13.3k]
  |  |  |  |  ------------------
  |  |  |  |  277|  8.38k|    int val = (int)value;\
  |  |  |  |  278|  8.38k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  8.38k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  8.38k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  8.38k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  8.38k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  8.38k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  8.38k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  8.38k|}
  |  |  |  |  ------------------
  |  |  |  |  280|  8.38k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  8.38k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  8.38k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  8.38k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  13.3k|  } else {\
  |  |  |  |  283|  13.3k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|  13.3k|    s->bi_valid += len;\
  |  |  |  |  285|  13.3k|  }\
  |  |  |  |  286|  21.7k|}
  |  |  ------------------
  ------------------
  951|  21.7k|}
trees.c:send_all_trees:
  834|  14.8k|                          int blcodes) {
  835|  14.8k|    int rank;                    /* index in bl_order */
  836|       |
  837|  14.8k|    Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
  838|  14.8k|    Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
  839|  14.8k|            "too many codes");
  840|  14.8k|    Tracev((stderr, "\nbl counts: "));
  841|  14.8k|    send_bits(s, lcodes - 257, 5);  /* not +255 as stated in appnote.txt */
  ------------------
  |  |  274|  14.8k|#define send_bits(s, value, length) \
  |  |  275|  14.8k|{ int len = length;\
  |  |  276|  14.8k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  14.8k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 0, False: 14.8k]
  |  |  ------------------
  |  |  277|      0|    int val = (int)value;\
  |  |  278|      0|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|      0|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|      0|#define put_short(s, w) { \
  |  |  |  |  145|      0|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|      0|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|      0|}
  |  |  ------------------
  |  |  280|      0|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  281|      0|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  282|  14.8k|  } else {\
  |  |  283|  14.8k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  14.8k|    s->bi_valid += len;\
  |  |  285|  14.8k|  }\
  |  |  286|  14.8k|}
  ------------------
  842|  14.8k|    send_bits(s, dcodes - 1,   5);
  ------------------
  |  |  274|  14.8k|#define send_bits(s, value, length) \
  |  |  275|  14.8k|{ int len = length;\
  |  |  276|  14.8k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  14.8k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 5.94k, False: 8.88k]
  |  |  ------------------
  |  |  277|  5.94k|    int val = (int)value;\
  |  |  278|  5.94k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  5.94k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  5.94k|#define put_short(s, w) { \
  |  |  |  |  145|  5.94k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  5.94k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  5.94k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  5.94k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  5.94k|}
  |  |  ------------------
  |  |  280|  5.94k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  5.94k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  5.94k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  5.94k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  8.88k|  } else {\
  |  |  283|  8.88k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  8.88k|    s->bi_valid += len;\
  |  |  285|  8.88k|  }\
  |  |  286|  14.8k|}
  ------------------
  843|  14.8k|    send_bits(s, blcodes - 4,  4);  /* not -3 as stated in appnote.txt */
  ------------------
  |  |  274|  14.8k|#define send_bits(s, value, length) \
  |  |  275|  14.8k|{ int len = length;\
  |  |  276|  14.8k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  14.8k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 8.88k, False: 5.94k]
  |  |  ------------------
  |  |  277|  8.88k|    int val = (int)value;\
  |  |  278|  8.88k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  8.88k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  8.88k|#define put_short(s, w) { \
  |  |  |  |  145|  8.88k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  8.88k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  8.88k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  8.88k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  8.88k|}
  |  |  ------------------
  |  |  280|  8.88k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  8.88k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  8.88k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  8.88k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  8.88k|  } else {\
  |  |  283|  5.94k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  5.94k|    s->bi_valid += len;\
  |  |  285|  5.94k|  }\
  |  |  286|  14.8k|}
  ------------------
  844|   278k|    for (rank = 0; rank < blcodes; rank++) {
  ------------------
  |  Branch (844:20): [True: 263k, False: 14.8k]
  ------------------
  845|   263k|        Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
  846|   263k|        send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
  ------------------
  |  |  274|   263k|#define send_bits(s, value, length) \
  |  |  275|   263k|{ int len = length;\
  |  |  276|   263k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|   263k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 44.2k, False: 219k]
  |  |  ------------------
  |  |  277|  44.2k|    int val = (int)value;\
  |  |  278|  44.2k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  44.2k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  44.2k|#define put_short(s, w) { \
  |  |  |  |  145|  44.2k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  44.2k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  44.2k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  44.2k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  44.2k|}
  |  |  ------------------
  |  |  280|  44.2k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  44.2k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  44.2k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  44.2k|#define Buf_size 16
  |  |  ------------------
  |  |  282|   219k|  } else {\
  |  |  283|   219k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|   219k|    s->bi_valid += len;\
  |  |  285|   219k|  }\
  |  |  286|   263k|}
  ------------------
  847|   263k|    }
  848|  14.8k|    Tracev((stderr, "\nbl tree: sent %lu", s->bits_sent));
  849|       |
  850|  14.8k|    send_tree(s, (ct_data *)s->dyn_ltree, lcodes - 1);  /* literal tree */
  851|  14.8k|    Tracev((stderr, "\nlit tree: sent %lu", s->bits_sent));
  852|       |
  853|  14.8k|    send_tree(s, (ct_data *)s->dyn_dtree, dcodes - 1);  /* distance tree */
  854|  14.8k|    Tracev((stderr, "\ndist tree: sent %lu", s->bits_sent));
  855|  14.8k|}
trees.c:send_tree:
  753|  29.6k|local void send_tree(deflate_state *s, ct_data *tree, int max_code) {
  754|  29.6k|    int n;                     /* iterates over all tree elements */
  755|  29.6k|    int prevlen = -1;          /* last emitted length */
  756|  29.6k|    int curlen;                /* length of current code */
  757|  29.6k|    int nextlen = tree[0].Len; /* length of next code */
  ------------------
  |  |   86|  29.6k|#define Len  dl.len
  ------------------
  758|  29.6k|    int count = 0;             /* repeat count of the current code */
  759|  29.6k|    int max_count = 7;         /* max repeat count */
  760|  29.6k|    int min_count = 4;         /* min repeat count */
  761|       |
  762|       |    /* tree[max_code + 1].Len = -1; */  /* guard already set */
  763|  29.6k|    if (nextlen == 0) max_count = 138, min_count = 3;
  ------------------
  |  Branch (763:9): [True: 5.37k, False: 24.2k]
  ------------------
  764|       |
  765|  3.95M|    for (n = 0; n <= max_code; n++) {
  ------------------
  |  Branch (765:17): [True: 3.92M, False: 29.6k]
  ------------------
  766|  3.92M|        curlen = nextlen; nextlen = tree[n + 1].Len;
  ------------------
  |  |   86|  3.92M|#define Len  dl.len
  ------------------
  767|  3.92M|        if (++count < max_count && curlen == nextlen) {
  ------------------
  |  Branch (767:13): [True: 3.91M, False: 8.57k]
  |  Branch (767:36): [True: 3.10M, False: 811k]
  ------------------
  768|  3.10M|            continue;
  769|  3.10M|        } else if (count < min_count) {
  ------------------
  |  Branch (769:20): [True: 636k, False: 183k]
  ------------------
  770|   787k|            do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
  ------------------
  |  |  239|   787k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|   787k|#define send_bits(s, value, length) \
  |  |  |  |  275|   787k|{ int len = length;\
  |  |  |  |  276|   787k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   787k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 127k, False: 660k]
  |  |  |  |  ------------------
  |  |  |  |  277|   127k|    int val = (int)value;\
  |  |  |  |  278|   127k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|   127k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|   127k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|   127k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   127k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   127k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   127k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   127k|}
  |  |  |  |  ------------------
  |  |  |  |  280|   127k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   127k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|   127k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   127k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|   660k|  } else {\
  |  |  |  |  283|   660k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|   660k|    s->bi_valid += len;\
  |  |  |  |  285|   660k|  }\
  |  |  |  |  286|   787k|}
  |  |  ------------------
  ------------------
  |  Branch (770:61): [True: 150k, False: 636k]
  ------------------
  771|       |
  772|   636k|        } else if (curlen != 0) {
  ------------------
  |  Branch (772:20): [True: 19.7k, False: 163k]
  ------------------
  773|  19.7k|            if (curlen != prevlen) {
  ------------------
  |  Branch (773:17): [True: 17.6k, False: 2.10k]
  ------------------
  774|  17.6k|                send_code(s, curlen, s->bl_tree); count--;
  ------------------
  |  |  239|  17.6k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|  17.6k|#define send_bits(s, value, length) \
  |  |  |  |  275|  17.6k|{ int len = length;\
  |  |  |  |  276|  17.6k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  17.6k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 2.08k, False: 15.5k]
  |  |  |  |  ------------------
  |  |  |  |  277|  2.08k|    int val = (int)value;\
  |  |  |  |  278|  2.08k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  2.08k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  2.08k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  2.08k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  2.08k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  2.08k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  2.08k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  2.08k|}
  |  |  |  |  ------------------
  |  |  |  |  280|  2.08k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  2.08k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  2.08k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  2.08k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  15.5k|  } else {\
  |  |  |  |  283|  15.5k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|  15.5k|    s->bi_valid += len;\
  |  |  |  |  285|  15.5k|  }\
  |  |  |  |  286|  17.6k|}
  |  |  ------------------
  ------------------
  775|  17.6k|            }
  776|  19.7k|            Assert(count >= 3 && count <= 6, " 3_6?");
  777|  19.7k|            send_code(s, REP_3_6, s->bl_tree); send_bits(s, count - 3, 2);
  ------------------
  |  |  239|  19.7k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|  19.7k|#define send_bits(s, value, length) \
  |  |  |  |  275|  19.7k|{ int len = length;\
  |  |  |  |  276|  19.7k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  19.7k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 4.93k, False: 14.7k]
  |  |  |  |  ------------------
  |  |  |  |  277|  4.93k|    int val = (int)value;\
  |  |  |  |  278|  4.93k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  4.93k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  4.93k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  4.93k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  4.93k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  4.93k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  4.93k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  4.93k|}
  |  |  |  |  ------------------
  |  |  |  |  280|  4.93k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  4.93k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  4.93k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  4.93k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  14.7k|  } else {\
  |  |  |  |  283|  14.7k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|  14.7k|    s->bi_valid += len;\
  |  |  |  |  285|  14.7k|  }\
  |  |  |  |  286|  19.7k|}
  |  |  ------------------
  ------------------
                          send_code(s, REP_3_6, s->bl_tree); send_bits(s, count - 3, 2);
  ------------------
  |  |  274|  19.7k|#define send_bits(s, value, length) \
  |  |  275|  19.7k|{ int len = length;\
  |  |  276|  19.7k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  19.7k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 2.56k, False: 17.1k]
  |  |  ------------------
  |  |  277|  2.56k|    int val = (int)value;\
  |  |  278|  2.56k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  2.56k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  2.56k|#define put_short(s, w) { \
  |  |  |  |  145|  2.56k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  2.56k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  2.56k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  2.56k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  2.56k|}
  |  |  ------------------
  |  |  280|  2.56k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  2.56k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  2.56k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  2.56k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  17.1k|  } else {\
  |  |  283|  17.1k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  17.1k|    s->bi_valid += len;\
  |  |  285|  17.1k|  }\
  |  |  286|  19.7k|}
  ------------------
  778|       |
  779|   163k|        } else if (count <= 10) {
  ------------------
  |  Branch (779:20): [True: 100k, False: 63.4k]
  ------------------
  780|   100k|            send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count - 3, 3);
  ------------------
  |  |  239|   100k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|   100k|#define send_bits(s, value, length) \
  |  |  |  |  275|   100k|{ int len = length;\
  |  |  |  |  276|   100k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   100k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 18.4k, False: 81.6k]
  |  |  |  |  ------------------
  |  |  |  |  277|  18.4k|    int val = (int)value;\
  |  |  |  |  278|  18.4k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  18.4k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  18.4k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  18.4k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  18.4k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  18.4k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  18.4k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  18.4k|}
  |  |  |  |  ------------------
  |  |  |  |  280|  18.4k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  18.4k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  18.4k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  18.4k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  81.6k|  } else {\
  |  |  |  |  283|  81.6k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|  81.6k|    s->bi_valid += len;\
  |  |  |  |  285|  81.6k|  }\
  |  |  |  |  286|   100k|}
  |  |  ------------------
  ------------------
                          send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count - 3, 3);
  ------------------
  |  |  274|   100k|#define send_bits(s, value, length) \
  |  |  275|   100k|{ int len = length;\
  |  |  276|   100k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|   100k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 18.9k, False: 81.1k]
  |  |  ------------------
  |  |  277|  18.9k|    int val = (int)value;\
  |  |  278|  18.9k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  18.9k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  18.9k|#define put_short(s, w) { \
  |  |  |  |  145|  18.9k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  18.9k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  18.9k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  18.9k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  18.9k|}
  |  |  ------------------
  |  |  280|  18.9k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  18.9k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  18.9k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  18.9k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  81.1k|  } else {\
  |  |  283|  81.1k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  81.1k|    s->bi_valid += len;\
  |  |  285|  81.1k|  }\
  |  |  286|   100k|}
  ------------------
  781|       |
  782|   100k|        } else {
  783|  63.4k|            send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count - 11, 7);
  ------------------
  |  |  239|  63.4k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|  63.4k|#define send_bits(s, value, length) \
  |  |  |  |  275|  63.4k|{ int len = length;\
  |  |  |  |  276|  63.4k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  63.4k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 11.4k, False: 52.0k]
  |  |  |  |  ------------------
  |  |  |  |  277|  11.4k|    int val = (int)value;\
  |  |  |  |  278|  11.4k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  11.4k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  11.4k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  11.4k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  11.4k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  11.4k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  11.4k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  11.4k|}
  |  |  |  |  ------------------
  |  |  |  |  280|  11.4k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  11.4k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  11.4k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  11.4k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  52.0k|  } else {\
  |  |  |  |  283|  52.0k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|  52.0k|    s->bi_valid += len;\
  |  |  |  |  285|  52.0k|  }\
  |  |  |  |  286|  63.4k|}
  |  |  ------------------
  ------------------
                          send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count - 11, 7);
  ------------------
  |  |  274|  63.4k|#define send_bits(s, value, length) \
  |  |  275|  63.4k|{ int len = length;\
  |  |  276|  63.4k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  63.4k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 27.6k, False: 35.8k]
  |  |  ------------------
  |  |  277|  27.6k|    int val = (int)value;\
  |  |  278|  27.6k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  27.6k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  27.6k|#define put_short(s, w) { \
  |  |  |  |  145|  27.6k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  27.6k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  27.6k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  27.6k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  27.6k|}
  |  |  ------------------
  |  |  280|  27.6k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  27.6k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  27.6k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  27.6k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  35.8k|  } else {\
  |  |  283|  35.8k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  35.8k|    s->bi_valid += len;\
  |  |  285|  35.8k|  }\
  |  |  286|  63.4k|}
  ------------------
  784|  63.4k|        }
  785|   820k|        count = 0; prevlen = curlen;
  786|   820k|        if (nextlen == 0) {
  ------------------
  |  Branch (786:13): [True: 276k, False: 543k]
  ------------------
  787|   276k|            max_count = 138, min_count = 3;
  788|   543k|        } else if (curlen == nextlen) {
  ------------------
  |  Branch (788:20): [True: 3.24k, False: 540k]
  ------------------
  789|  3.24k|            max_count = 6, min_count = 3;
  790|   540k|        } else {
  791|   540k|            max_count = 7, min_count = 4;
  792|   540k|        }
  793|   820k|    }
  794|  29.6k|}

zcalloc:
  303|  26.8k|voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) {
  304|  26.8k|    (void)opaque;
  305|  26.8k|    return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
  ------------------
  |  Branch (305:12): [True: 26.8k, Folded]
  ------------------
  306|  26.8k|                              (voidpf)calloc(items, size);
  307|  26.8k|}
zcfree:
  309|  26.8k|void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) {
  310|  26.8k|    (void)opaque;
  311|  26.8k|    free(ptr);
  312|  26.8k|}

