test_dict_deflate:
   28|  4.17k|{
   29|  4.17k|    z_stream c_stream; /* compression stream */
   30|  4.17k|    int err;
   31|  4.17k|    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|  4.17k|    int method = Z_DEFLATED; /* The deflate compression method (the only one
  ------------------
  |  |  213|  4.17k|#define Z_DEFLATED   8
  ------------------
   39|       |                                supported in this version) */
   40|  4.17k|    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|  4.17k|    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|  4.17k|    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|  4.17k|    if (level == 0 || level == 1)
  ------------------
  |  Branch (54:9): [True: 294, False: 3.88k]
  |  Branch (54:23): [True: 364, False: 3.51k]
  ------------------
   55|    658|      level = -1;
   56|       |
   57|  4.17k|    c_stream.zalloc = zalloc;
   58|  4.17k|    c_stream.zfree = zfree;
   59|  4.17k|    c_stream.opaque = (void *)0;
   60|       |
   61|  4.17k|    err = deflateInit2(&c_stream, level, method, windowBits, memLevel, strategy);
  ------------------
  |  | 1937|  4.17k|          deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
  |  | 1938|  4.17k|                        (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
  |  |  ------------------
  |  |  |  |   44|  4.17k|#define ZLIB_VERSION "1.3.2.1-motley"
  |  |  ------------------
  ------------------
   62|  4.17k|    CHECK_ERR(err, "deflateInit");
  ------------------
  |  |   10|  4.17k|#define CHECK_ERR(err, msg) { \
  |  |   11|  4.17k|    if (err != Z_OK) { \
  |  |  ------------------
  |  |  |  |  181|  8.35k|#define Z_OK            0
  |  |  ------------------
  |  |  |  Branch (11:9): [True: 0, False: 4.17k]
  |  |  ------------------
  |  |   12|      0|        fprintf(stderr, "%s error: %d\n", msg, err); \
  |  |   13|      0|        return 0; \
  |  |   14|      0|    } \
  |  |   15|  4.17k|}
  ------------------
   63|       |
   64|  4.17k|    err = deflateSetDictionary(
   65|  4.17k|        &c_stream, (const unsigned char *)data, dictionaryLen);
   66|  4.17k|    CHECK_ERR(err, "deflateSetDictionary");
  ------------------
  |  |   10|  4.17k|#define CHECK_ERR(err, msg) { \
  |  |   11|  4.17k|    if (err != Z_OK) { \
  |  |  ------------------
  |  |  |  |  181|  8.35k|#define Z_OK            0
  |  |  ------------------
  |  |  |  Branch (11:9): [True: 0, False: 4.17k]
  |  |  ------------------
  |  |   12|      0|        fprintf(stderr, "%s error: %d\n", msg, err); \
  |  |   13|      0|        return 0; \
  |  |   14|      0|    } \
  |  |   15|  4.17k|}
  ------------------
   67|       |
   68|       |    /* deflateBound does not provide enough space for low compression levels. */
   69|  4.17k|    *comprLen = 100 + 2 * deflateBound(&c_stream, dataLen);
   70|  4.17k|    *compr = (uint8_t *)calloc(1, *comprLen);
   71|       |
   72|  4.17k|    dictId = c_stream.adler;
   73|  4.17k|    c_stream.next_out = *compr;
   74|  4.17k|    c_stream.avail_out = (unsigned int)(*comprLen);
   75|       |
   76|  4.17k|    c_stream.next_in = (Bytef *)data;
   77|  4.17k|    c_stream.avail_in = dataLen;
   78|       |
   79|  4.17k|    err = deflate(&c_stream, Z_FINISH);
  ------------------
  |  |  176|  4.17k|#define Z_FINISH        4
  ------------------
   80|  4.17k|    if (err != Z_STREAM_END) {
  ------------------
  |  |  182|  4.17k|#define Z_STREAM_END    1
  ------------------
  |  Branch (80:9): [True: 0, False: 4.17k]
  ------------------
   81|      0|        fprintf(stderr, "deflate dict should report Z_STREAM_END\n");
   82|      0|        return 0;
   83|      0|    }
   84|  4.17k|    err = deflateEnd(&c_stream);
   85|  4.17k|    CHECK_ERR(err, "deflateEnd");
  ------------------
  |  |   10|  4.17k|#define CHECK_ERR(err, msg) { \
  |  |   11|  4.17k|    if (err != Z_OK) { \
  |  |  ------------------
  |  |  |  |  181|  8.35k|#define Z_OK            0
  |  |  ------------------
  |  |  |  Branch (11:9): [True: 0, False: 4.17k]
  |  |  ------------------
  |  |   12|      0|        fprintf(stderr, "%s error: %d\n", msg, err); \
  |  |   13|      0|        return 0; \
  |  |   14|      0|    } \
  |  |   15|  4.17k|}
  ------------------
   86|  4.17k|    return 0;
   87|  4.17k|}
test_dict_inflate:
   92|  4.17k|int test_dict_inflate(unsigned char *compr, size_t comprLen) {
   93|  4.17k|  int err;
   94|  4.17k|  z_stream d_stream; /* decompression stream */
   95|  4.17k|  unsigned char *uncompr;
   96|       |
   97|  4.17k|  d_stream.zalloc = zalloc;
   98|  4.17k|  d_stream.zfree = zfree;
   99|  4.17k|  d_stream.opaque = (void *)0;
  100|       |
  101|  4.17k|  d_stream.next_in = compr;
  102|  4.17k|  d_stream.avail_in = (unsigned int)comprLen;
  103|       |
  104|  4.17k|  err = inflateInit(&d_stream);
  ------------------
  |  | 1935|  4.17k|          inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
  |  |  ------------------
  |  |  |  |   44|  4.17k|#define ZLIB_VERSION "1.3.2.1-motley"
  |  |  ------------------
  ------------------
  105|  4.17k|  CHECK_ERR(err, "inflateInit");
  ------------------
  |  |   10|  4.17k|#define CHECK_ERR(err, msg) { \
  |  |   11|  4.17k|    if (err != Z_OK) { \
  |  |  ------------------
  |  |  |  |  181|  8.35k|#define Z_OK            0
  |  |  ------------------
  |  |  |  Branch (11:9): [True: 0, False: 4.17k]
  |  |  ------------------
  |  |   12|      0|        fprintf(stderr, "%s error: %d\n", msg, err); \
  |  |   13|      0|        return 0; \
  |  |   14|      0|    } \
  |  |   15|  4.17k|}
  ------------------
  106|       |
  107|  4.17k|  uncompr = (uint8_t *)calloc(1, dataLen);
  108|  4.17k|  d_stream.next_out = uncompr;
  109|  4.17k|  d_stream.avail_out = (unsigned int)dataLen;
  110|       |
  111|  8.08k|  for (;;) {
  112|  8.08k|    err = inflate(&d_stream, Z_NO_FLUSH);
  ------------------
  |  |  172|  8.08k|#define Z_NO_FLUSH      0
  ------------------
  113|  8.08k|    if (err == Z_STREAM_END)
  ------------------
  |  |  182|  8.08k|#define Z_STREAM_END    1
  ------------------
  |  Branch (113:9): [True: 4.17k, False: 3.90k]
  ------------------
  114|  4.17k|      break;
  115|  3.90k|    if (err == Z_NEED_DICT) {
  ------------------
  |  |  183|  3.90k|#define Z_NEED_DICT     2
  ------------------
  |  Branch (115:9): [True: 3.90k, False: 0]
  ------------------
  116|  3.90k|      if (d_stream.adler != dictId) {
  ------------------
  |  Branch (116:11): [True: 0, False: 3.90k]
  ------------------
  117|      0|        fprintf(stderr, "unexpected dictionary");
  118|      0|        return 0;
  119|      0|      }
  120|  3.90k|      err = inflateSetDictionary(
  121|  3.90k|          &d_stream, (const unsigned char *)data, dictionaryLen);
  122|  3.90k|    }
  123|  3.90k|    CHECK_ERR(err, "inflate with dict");
  ------------------
  |  |   10|  3.90k|#define CHECK_ERR(err, msg) { \
  |  |   11|  3.90k|    if (err != Z_OK) { \
  |  |  ------------------
  |  |  |  |  181|  7.81k|#define Z_OK            0
  |  |  ------------------
  |  |  |  Branch (11:9): [True: 0, False: 3.90k]
  |  |  ------------------
  |  |   12|      0|        fprintf(stderr, "%s error: %d\n", msg, err); \
  |  |   13|      0|        return 0; \
  |  |   14|      0|    } \
  |  |   15|  3.90k|}
  ------------------
  124|  3.90k|  }
  125|       |
  126|  4.17k|  err = inflateEnd(&d_stream);
  127|  4.17k|  CHECK_ERR(err, "inflateEnd");
  ------------------
  |  |   10|  4.17k|#define CHECK_ERR(err, msg) { \
  |  |   11|  4.17k|    if (err != Z_OK) { \
  |  |  ------------------
  |  |  |  |  181|  8.35k|#define Z_OK            0
  |  |  ------------------
  |  |  |  Branch (11:9): [True: 0, False: 4.17k]
  |  |  ------------------
  |  |   12|      0|        fprintf(stderr, "%s error: %d\n", msg, err); \
  |  |   13|      0|        return 0; \
  |  |   14|      0|    } \
  |  |   15|  4.17k|}
  ------------------
  128|       |
  129|  4.17k|  if (memcmp(uncompr, data, dataLen)) {
  ------------------
  |  Branch (129:7): [True: 0, False: 4.17k]
  ------------------
  130|      0|    fprintf(stderr, "bad inflate with dict\n");
  131|      0|    return 0;
  132|      0|  }
  133|       |
  134|  4.17k|  free(uncompr);
  135|  4.17k|  return 0;
  136|  4.17k|}
LLVMFuzzerTestOneInput:
  138|  4.18k|int LLVMFuzzerTestOneInput(const uint8_t *d, size_t size) {
  139|  4.18k|  size_t comprLen = 0;
  140|  4.18k|  uint8_t *compr;
  141|       |
  142|       |  /* Discard inputs larger than 100Kb. */
  143|  4.18k|  static size_t kMaxSize = 100 * 1024;
  144|       |
  145|  4.18k|  if (size < 1 || size > kMaxSize)
  ------------------
  |  Branch (145:7): [True: 0, False: 4.18k]
  |  Branch (145:19): [True: 9, False: 4.17k]
  ------------------
  146|      9|    return 0;
  147|       |
  148|  4.17k|  data = d;
  149|  4.17k|  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|  4.17k|  dictionaryLen = data[0];
  155|  4.17k|  if (dictionaryLen > dataLen)
  ------------------
  |  Branch (155:7): [True: 1.19k, False: 2.98k]
  ------------------
  156|  1.19k|    dictionaryLen = dataLen;
  157|       |
  158|  4.17k|  test_dict_deflate(&compr, &comprLen);
  159|  4.17k|  test_dict_inflate(compr, comprLen);
  160|       |
  161|  4.17k|  free(compr);
  162|       |
  163|       |  /* This function must return 0. */
  164|  4.17k|  return 0;
  165|  4.18k|}

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

deflateInit2_:
  389|  4.17k|                          const char *version, int stream_size) {
  390|  4.17k|    deflate_state *s;
  391|  4.17k|    int wrap = 1;
  392|  4.17k|    static const char my_version[] = ZLIB_VERSION;
  ------------------
  |  |   44|  4.17k|#define ZLIB_VERSION "1.3.2.1-motley"
  ------------------
  393|       |
  394|  4.17k|    if (version == Z_NULL || version[0] != my_version[0] ||
  ------------------
  |  |  216|  8.35k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (394:9): [True: 0, False: 4.17k]
  |  Branch (394:30): [True: 0, False: 4.17k]
  ------------------
  395|  4.17k|        stream_size != sizeof(z_stream)) {
  ------------------
  |  Branch (395:9): [True: 0, False: 4.17k]
  ------------------
  396|      0|        return Z_VERSION_ERROR;
  ------------------
  |  |  189|      0|#define Z_VERSION_ERROR (-6)
  ------------------
  397|      0|    }
  398|  4.17k|    if (strm == Z_NULL) return Z_STREAM_ERROR;
  ------------------
  |  |  216|  4.17k|#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: 4.17k]
  ------------------
  399|       |
  400|  4.17k|    strm->msg = Z_NULL;
  ------------------
  |  |  216|  4.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  401|  4.17k|    if (strm->zalloc == (alloc_func)0) {
  ------------------
  |  Branch (401:9): [True: 4.17k, False: 0]
  ------------------
  402|       |#ifdef Z_SOLO
  403|       |        return Z_STREAM_ERROR;
  404|       |#else
  405|  4.17k|        strm->zalloc = zcalloc;
  406|  4.17k|        strm->opaque = (voidpf)0;
  407|  4.17k|#endif
  408|  4.17k|    }
  409|  4.17k|    if (strm->zfree == (free_func)0)
  ------------------
  |  Branch (409:9): [True: 4.17k, False: 0]
  ------------------
  410|       |#ifdef Z_SOLO
  411|       |        return Z_STREAM_ERROR;
  412|       |#else
  413|  4.17k|        strm->zfree = zcfree;
  414|  4.17k|#endif
  415|       |
  416|       |#ifdef FASTEST
  417|       |    if (level != 0) level = 1;
  418|       |#else
  419|  4.17k|    if (level == Z_DEFAULT_COMPRESSION) level = 6;
  ------------------
  |  |  197|  4.17k|#define Z_DEFAULT_COMPRESSION  (-1)
  ------------------
  |  Branch (419:9): [True: 1.24k, False: 2.93k]
  ------------------
  420|  4.17k|#endif
  421|       |
  422|  4.17k|    if (windowBits < 0) { /* suppress zlib wrapper */
  ------------------
  |  Branch (422:9): [True: 0, False: 4.17k]
  ------------------
  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|  4.17k|#ifdef GZIP
  429|  4.17k|    else if (windowBits > 15) {
  ------------------
  |  Branch (429:14): [True: 0, False: 4.17k]
  ------------------
  430|      0|        wrap = 2;       /* write gzip wrapper instead */
  431|      0|        windowBits -= 16;
  432|      0|    }
  433|  4.17k|#endif
  434|  4.17k|    if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
  ------------------
  |  |  277|  8.35k|#    define MAX_MEM_LEVEL 9
  ------------------
                  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
  ------------------
  |  |  213|  8.35k|#define Z_DEFLATED   8
  ------------------
  |  Branch (434:9): [True: 0, False: 4.17k]
  |  Branch (434:25): [True: 0, False: 4.17k]
  |  Branch (434:53): [True: 0, False: 4.17k]
  ------------------
  435|  4.17k|        windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
  ------------------
  |  Branch (435:9): [True: 0, False: 4.17k]
  |  Branch (435:27): [True: 0, False: 4.17k]
  |  Branch (435:46): [True: 0, False: 4.17k]
  |  Branch (435:59): [True: 0, False: 4.17k]
  ------------------
  436|  4.17k|        strategy < 0 || strategy > Z_FIXED || (windowBits == 8 && wrap != 1)) {
  ------------------
  |  |  203|  8.35k|#define Z_FIXED               4
  ------------------
  |  Branch (436:9): [True: 0, False: 4.17k]
  |  Branch (436:25): [True: 0, False: 4.17k]
  |  Branch (436:48): [True: 737, False: 3.43k]
  |  Branch (436:67): [True: 0, False: 737]
  ------------------
  437|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  438|      0|    }
  439|  4.17k|    if (windowBits == 8) windowBits = 9;  /* until 256-byte window bug fixed */
  ------------------
  |  Branch (439:9): [True: 737, False: 3.43k]
  ------------------
  440|  4.17k|    s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
  ------------------
  |  |  253|  4.17k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  441|  4.17k|    if (s == Z_NULL) return Z_MEM_ERROR;
  ------------------
  |  |  216|  4.17k|#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: 4.17k]
  ------------------
  442|  4.17k|    zmemzero(s, sizeof(deflate_state));
  ------------------
  |  |  218|  4.17k|#    define zmemzero(dest, len) memset(dest, 0, len)
  ------------------
  443|  4.17k|    strm->state = (struct internal_state FAR *)s;
  444|  4.17k|    s->strm = strm;
  445|  4.17k|    s->status = INIT_STATE;     /* to pass state test in deflateReset() */
  ------------------
  |  |   58|  4.17k|#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
  ------------------
  446|       |
  447|  4.17k|    s->wrap = wrap;
  448|  4.17k|    s->gzhead = Z_NULL;
  ------------------
  |  |  216|  4.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  449|  4.17k|    s->w_bits = (uInt)windowBits;
  450|  4.17k|    s->w_size = 1 << s->w_bits;
  451|  4.17k|    s->w_mask = s->w_size - 1;
  452|       |
  453|  4.17k|    s->hash_bits = (uInt)memLevel + 7;
  454|  4.17k|    s->hash_size = 1 << s->hash_bits;
  455|  4.17k|    s->hash_mask = s->hash_size - 1;
  456|  4.17k|    s->hash_shift =  ((s->hash_bits + MIN_MATCH-1) / MIN_MATCH);
  ------------------
  |  |   92|  4.17k|#define MIN_MATCH  3
  ------------------
                  s->hash_shift =  ((s->hash_bits + MIN_MATCH-1) / MIN_MATCH);
  ------------------
  |  |   92|  4.17k|#define MIN_MATCH  3
  ------------------
  457|       |
  458|  4.17k|    s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
  ------------------
  |  |  253|  4.17k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  459|  4.17k|    s->prev   = (Posf *)  ZALLOC(strm, s->w_size, sizeof(Pos));
  ------------------
  |  |  253|  4.17k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  460|  4.17k|    s->head   = (Posf *)  ZALLOC(strm, s->hash_size, sizeof(Pos));
  ------------------
  |  |  253|  4.17k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  461|       |
  462|  4.17k|    s->high_water = 0;      /* nothing written to s->window yet */
  463|       |
  464|  4.17k|    s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
  465|       |
  466|       |    /* We overlay pending_buf and sym_buf. This works since the average size
  467|       |     * for length/distance pairs over any compressed block is assured to be 31
  468|       |     * bits or less.
  469|       |     *
  470|       |     * Analysis: The longest fixed codes are a length code of 8 bits plus 5
  471|       |     * extra bits, for lengths 131 to 257. The longest fixed distance codes are
  472|       |     * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest
  473|       |     * possible fixed-codes length/distance pair is then 31 bits total.
  474|       |     *
  475|       |     * sym_buf starts one-fourth of the way into pending_buf. So there are
  476|       |     * three bytes in sym_buf for every four bytes in pending_buf. Each symbol
  477|       |     * in sym_buf is three bytes -- two for the distance and one for the
  478|       |     * literal/length. As each symbol is consumed, the pointer to the next
  479|       |     * sym_buf value to read moves forward three bytes. From that symbol, up to
  480|       |     * 31 bits are written to pending_buf. The closest the written pending_buf
  481|       |     * bits gets to the next sym_buf symbol to read is just before the last
  482|       |     * code is written. At that time, 31*(n - 2) bits have been written, just
  483|       |     * after 24*(n - 2) bits have been consumed from sym_buf. sym_buf starts at
  484|       |     * 8*n bits into pending_buf. (Note that the symbol buffer fills when n - 1
  485|       |     * symbols are written.) The closest the writing gets to what is unread is
  486|       |     * then n + 14 bits. Here n is lit_bufsize, which is 16384 by default, and
  487|       |     * can range from 128 to 32768.
  488|       |     *
  489|       |     * Therefore, at a minimum, there are 142 bits of space between what is
  490|       |     * written and what is read in the overlain buffers, so the symbols cannot
  491|       |     * be overwritten by the compressed data. That space is actually 139 bits,
  492|       |     * due to the three-bit fixed-code block header.
  493|       |     *
  494|       |     * That covers the case where either Z_FIXED is specified, forcing fixed
  495|       |     * codes, or when the use of fixed codes is chosen, because that choice
  496|       |     * results in a smaller compressed block than dynamic codes. That latter
  497|       |     * condition then assures that the above analysis also covers all dynamic
  498|       |     * blocks. A dynamic-code block will only be chosen to be emitted if it has
  499|       |     * fewer bits than a fixed-code block would for the same set of symbols.
  500|       |     * Therefore its average symbol length is assured to be less than 31. So
  501|       |     * the compressed data for a dynamic block also cannot overwrite the
  502|       |     * symbols from which it is being constructed.
  503|       |     */
  504|       |
  505|  4.17k|    s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, LIT_BUFS);
  ------------------
  |  |  253|  4.17k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  506|  4.17k|    s->pending_buf_size = (ulg)s->lit_bufsize * 4;
  507|       |
  508|  4.17k|    if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
  ------------------
  |  |  216|  8.35k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
  ------------------
  |  |  216|  8.35k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
  ------------------
  |  |  216|  8.35k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (508:9): [True: 0, False: 4.17k]
  |  Branch (508:32): [True: 0, False: 4.17k]
  |  Branch (508:53): [True: 0, False: 4.17k]
  ------------------
  509|  4.17k|        s->pending_buf == Z_NULL) {
  ------------------
  |  |  216|  4.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (509:9): [True: 0, False: 4.17k]
  ------------------
  510|      0|        s->status = FINISH_STATE;
  ------------------
  |  |   67|      0|#define FINISH_STATE 666    /* stream complete */
  ------------------
  511|      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]
  |  |  ------------------
  ------------------
  512|      0|        deflateEnd (strm);
  513|      0|        return Z_MEM_ERROR;
  ------------------
  |  |  187|      0|#define Z_MEM_ERROR    (-4)
  ------------------
  514|      0|    }
  515|       |#ifdef LIT_MEM
  516|       |    s->d_buf = (ushf *)(s->pending_buf + (s->lit_bufsize << 1));
  517|       |    s->l_buf = s->pending_buf + (s->lit_bufsize << 2);
  518|       |    s->sym_end = s->lit_bufsize - 1;
  519|       |#else
  520|  4.17k|    s->sym_buf = s->pending_buf + s->lit_bufsize;
  521|  4.17k|    s->sym_end = (s->lit_bufsize - 1) * 3;
  522|  4.17k|#endif
  523|       |    /* We avoid equality with lit_bufsize*3 because of wraparound at 64K
  524|       |     * on 16 bit machines and because stored blocks are restricted to
  525|       |     * 64K-1 bytes.
  526|       |     */
  527|       |
  528|  4.17k|    s->level = level;
  529|  4.17k|    s->strategy = strategy;
  530|  4.17k|    s->method = (Byte)method;
  531|       |
  532|  4.17k|    return deflateReset(strm);
  533|  4.17k|}
deflateSetDictionary:
  560|  4.17k|                                 uInt  dictLength) {
  561|  4.17k|    deflate_state *s;
  562|  4.17k|    uInt str, n;
  563|  4.17k|    int wrap;
  564|  4.17k|    unsigned avail;
  565|  4.17k|    z_const unsigned char *next;
  566|       |
  567|  4.17k|    if (deflateStateCheck(strm) || dictionary == Z_NULL)
  ------------------
  |  |  216|  4.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (567:9): [True: 0, False: 4.17k]
  |  Branch (567:36): [True: 0, False: 4.17k]
  ------------------
  568|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  569|  4.17k|    s = strm->state;
  570|  4.17k|    wrap = s->wrap;
  571|  4.17k|    if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead)
  ------------------
  |  |   58|  4.17k|#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
  ------------------
  |  Branch (571:9): [True: 0, False: 4.17k]
  |  Branch (571:23): [True: 4.17k, False: 0]
  |  Branch (571:36): [True: 0, False: 4.17k]
  |  Branch (571:64): [True: 0, False: 4.17k]
  ------------------
  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|  4.17k|    if (wrap == 1)
  ------------------
  |  Branch (575:9): [True: 4.17k, False: 0]
  ------------------
  576|  4.17k|        strm->adler = adler32(strm->adler, dictionary, dictLength);
  577|  4.17k|    s->wrap = 0;                    /* avoid computing Adler-32 in read_buf */
  578|       |
  579|       |    /* if dictionary would fill window, just replace the history */
  580|  4.17k|    if (dictLength >= s->w_size) {
  ------------------
  |  Branch (580:9): [True: 0, False: 4.17k]
  ------------------
  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|  4.17k|    avail = strm->avail_in;
  593|  4.17k|    next = strm->next_in;
  594|  4.17k|    strm->avail_in = dictLength;
  595|  4.17k|    strm->next_in = (z_const Bytef *)dictionary;
  596|  4.17k|    fill_window(s);
  597|  7.89k|    while (s->lookahead >= MIN_MATCH) {
  ------------------
  |  |   92|  7.89k|#define MIN_MATCH  3
  ------------------
  |  Branch (597:12): [True: 3.71k, False: 4.17k]
  ------------------
  598|  3.71k|        str = s->strstart;
  599|  3.71k|        n = s->lookahead - (MIN_MATCH-1);
  ------------------
  |  |   92|  3.71k|#define MIN_MATCH  3
  ------------------
  600|   358k|        do {
  601|   358k|            UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]);
  ------------------
  |  |  141|   358k|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  ------------------
  602|   358k|#ifndef FASTEST
  603|   358k|            s->prev[str & s->w_mask] = s->head[s->ins_h];
  604|   358k|#endif
  605|   358k|            s->head[s->ins_h] = (Pos)str;
  606|   358k|            str++;
  607|   358k|        } while (--n);
  ------------------
  |  Branch (607:18): [True: 354k, False: 3.71k]
  ------------------
  608|  3.71k|        s->strstart = str;
  609|  3.71k|        s->lookahead = MIN_MATCH-1;
  ------------------
  |  |   92|  3.71k|#define MIN_MATCH  3
  ------------------
  610|  3.71k|        fill_window(s);
  611|  3.71k|    }
  612|  4.17k|    s->strstart += s->lookahead;
  613|  4.17k|    s->block_start = (long)s->strstart;
  614|  4.17k|    s->insert = s->lookahead;
  615|  4.17k|    s->lookahead = 0;
  616|  4.17k|    s->match_length = s->prev_length = MIN_MATCH-1;
  ------------------
  |  |   92|  4.17k|#define MIN_MATCH  3
  ------------------
  617|  4.17k|    s->match_available = 0;
  618|  4.17k|    strm->next_in = next;
  619|  4.17k|    strm->avail_in = avail;
  620|  4.17k|    s->wrap = wrap;
  621|  4.17k|    return Z_OK;
  ------------------
  |  |  181|  4.17k|#define Z_OK            0
  ------------------
  622|  4.17k|}
deflateResetKeep:
  644|  4.17k|int ZEXPORT deflateResetKeep(z_streamp strm) {
  645|  4.17k|    deflate_state *s;
  646|       |
  647|  4.17k|    if (deflateStateCheck(strm)) {
  ------------------
  |  Branch (647:9): [True: 0, False: 4.17k]
  ------------------
  648|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  649|      0|    }
  650|       |
  651|  4.17k|    strm->total_in = strm->total_out = 0;
  652|  4.17k|    strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
  ------------------
  |  |  216|  4.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  653|  4.17k|    strm->data_type = Z_UNKNOWN;
  ------------------
  |  |  210|  4.17k|#define Z_UNKNOWN  2
  ------------------
  654|       |
  655|  4.17k|    s = (deflate_state *)strm->state;
  656|  4.17k|    s->pending = 0;
  657|  4.17k|    s->pending_out = s->pending_buf;
  658|       |
  659|  4.17k|    if (s->wrap < 0) {
  ------------------
  |  Branch (659:9): [True: 0, False: 4.17k]
  ------------------
  660|      0|        s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
  661|      0|    }
  662|  4.17k|    s->status =
  663|  4.17k|#ifdef GZIP
  664|  4.17k|        s->wrap == 2 ? GZIP_STATE :
  ------------------
  |  |   60|      0|#  define GZIP_STATE  57    /* gzip header -> BUSY_STATE | EXTRA_STATE */
  ------------------
  |  Branch (664:9): [True: 0, False: 4.17k]
  ------------------
  665|  4.17k|#endif
  666|  4.17k|        INIT_STATE;
  ------------------
  |  |   58|  8.35k|#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
  ------------------
  667|  4.17k|    strm->adler =
  668|  4.17k|#ifdef GZIP
  669|  4.17k|        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: 4.17k]
  ------------------
  670|  4.17k|#endif
  671|  4.17k|        adler32(0L, Z_NULL, 0);
  ------------------
  |  |  216|  4.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  672|  4.17k|    s->last_flush = -2;
  673|       |
  674|  4.17k|    _tr_init(s);
  675|       |
  676|  4.17k|    return Z_OK;
  ------------------
  |  |  181|  4.17k|#define Z_OK            0
  ------------------
  677|  4.17k|}
deflateReset:
  704|  4.17k|int ZEXPORT deflateReset(z_streamp strm) {
  705|  4.17k|    int ret;
  706|       |
  707|  4.17k|    ret = deflateResetKeep(strm);
  708|  4.17k|    if (ret == Z_OK)
  ------------------
  |  |  181|  4.17k|#define Z_OK            0
  ------------------
  |  Branch (708:9): [True: 4.17k, False: 0]
  ------------------
  709|  4.17k|        lm_init(strm->state);
  710|  4.17k|    return ret;
  711|  4.17k|}
deflateBound_z:
  856|  4.17k|z_size_t ZEXPORT deflateBound_z(z_streamp strm, z_size_t sourceLen) {
  857|  4.17k|    deflate_state *s;
  858|  4.17k|    z_size_t fixedlen, storelen, wraplen, bound;
  859|       |
  860|       |    /* upper bound for fixed blocks with 9-bit literals and length 255
  861|       |       (memLevel == 2, which is the lowest that may not use stored blocks) --
  862|       |       ~13% overhead plus a small constant */
  863|  4.17k|    fixedlen = sourceLen + (sourceLen >> 3) + (sourceLen >> 8) +
  864|  4.17k|               (sourceLen >> 9) + 4;
  865|  4.17k|    if (fixedlen < sourceLen)
  ------------------
  |  Branch (865:9): [True: 0, False: 4.17k]
  ------------------
  866|      0|        fixedlen = (z_size_t)-1;
  867|       |
  868|       |    /* upper bound for stored blocks with length 127 (memLevel == 1) --
  869|       |       ~4% overhead plus a small constant */
  870|  4.17k|    storelen = sourceLen + (sourceLen >> 5) + (sourceLen >> 7) +
  871|  4.17k|               (sourceLen >> 11) + 7;
  872|  4.17k|    if (storelen < sourceLen)
  ------------------
  |  Branch (872:9): [True: 0, False: 4.17k]
  ------------------
  873|      0|        storelen = (z_size_t)-1;
  874|       |
  875|       |    /* if can't get parameters, return larger bound plus a wrapper */
  876|  4.17k|    if (deflateStateCheck(strm)) {
  ------------------
  |  Branch (876:9): [True: 0, False: 4.17k]
  ------------------
  877|      0|        bound = fixedlen > storelen ? fixedlen : storelen;
  ------------------
  |  Branch (877:17): [True: 0, False: 0]
  ------------------
  878|      0|        return bound + 18 < bound ? (z_size_t)-1 : bound + 18;
  ------------------
  |  Branch (878:16): [True: 0, False: 0]
  ------------------
  879|      0|    }
  880|       |
  881|       |    /* compute wrapper length */
  882|  4.17k|    s = strm->state;
  883|  4.17k|    switch (s->wrap < 0 ? -s->wrap : s->wrap) {
  ------------------
  |  Branch (883:13): [True: 0, False: 4.17k]
  ------------------
  884|      0|    case 0:                                 /* raw deflate */
  ------------------
  |  Branch (884:5): [True: 0, False: 4.17k]
  ------------------
  885|      0|        wraplen = 0;
  886|      0|        break;
  887|  4.17k|    case 1:                                 /* zlib wrapper */
  ------------------
  |  Branch (887:5): [True: 4.17k, False: 0]
  ------------------
  888|  4.17k|        wraplen = 6 + (s->strstart ? 4 : 0);
  ------------------
  |  Branch (888:24): [True: 3.90k, False: 269]
  ------------------
  889|  4.17k|        break;
  890|      0|#ifdef GZIP
  891|      0|    case 2:                                 /* gzip wrapper */
  ------------------
  |  Branch (891:5): [True: 0, False: 4.17k]
  ------------------
  892|      0|        wraplen = 18;
  893|      0|        if (s->gzhead != Z_NULL) {          /* user-supplied gzip header */
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (893:13): [True: 0, False: 0]
  ------------------
  894|      0|            Bytef *str;
  895|      0|            if (s->gzhead->extra != Z_NULL)
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (895:17): [True: 0, False: 0]
  ------------------
  896|      0|                wraplen += 2 + s->gzhead->extra_len;
  897|      0|            str = s->gzhead->name;
  898|      0|            if (str != Z_NULL)
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (898:17): [True: 0, False: 0]
  ------------------
  899|      0|                do {
  900|      0|                    wraplen++;
  901|      0|                } while (*str++);
  ------------------
  |  Branch (901:26): [True: 0, False: 0]
  ------------------
  902|      0|            str = s->gzhead->comment;
  903|      0|            if (str != Z_NULL)
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (903:17): [True: 0, False: 0]
  ------------------
  904|      0|                do {
  905|      0|                    wraplen++;
  906|      0|                } while (*str++);
  ------------------
  |  Branch (906:26): [True: 0, False: 0]
  ------------------
  907|      0|            if (s->gzhead->hcrc)
  ------------------
  |  Branch (907:17): [True: 0, False: 0]
  ------------------
  908|      0|                wraplen += 2;
  909|      0|        }
  910|      0|        break;
  911|      0|#endif
  912|      0|    default:                                /* for compiler happiness */
  ------------------
  |  Branch (912:5): [True: 0, False: 4.17k]
  ------------------
  913|      0|        wraplen = 18;
  914|  4.17k|    }
  915|       |
  916|       |    /* if not default parameters, return one of the conservative bounds */
  917|  4.17k|    if (s->w_bits != 15 || s->hash_bits != 8 + 7) {
  ------------------
  |  Branch (917:9): [True: 3.55k, False: 622]
  |  Branch (917:28): [True: 556, False: 66]
  ------------------
  918|  4.11k|        bound = s->w_bits <= s->hash_bits && s->level ? fixedlen :
  ------------------
  |  Branch (918:17): [True: 1.97k, False: 2.13k]
  |  Branch (918:46): [True: 1.97k, False: 0]
  ------------------
  919|  4.11k|                                                        storelen;
  920|  4.11k|        return bound + wraplen < bound ? (z_size_t)-1 : bound + wraplen;
  ------------------
  |  Branch (920:16): [True: 0, False: 4.11k]
  ------------------
  921|  4.11k|    }
  922|       |
  923|       |    /* default settings: return tight bound for that case -- ~0.03% overhead
  924|       |       plus a small constant */
  925|     66|    bound = sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
  926|     66|            (sourceLen >> 25) + 13 - 6 + wraplen;
  927|     66|    return bound < sourceLen ? (z_size_t)-1 : bound;
  ------------------
  |  Branch (927:12): [True: 0, False: 66]
  ------------------
  928|  4.17k|}
deflateBound:
  929|  4.17k|uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen) {
  930|  4.17k|    z_size_t bound = deflateBound_z(strm, sourceLen);
  931|  4.17k|    return (uLong)bound != bound ? (uLong)-1 : (uLong)bound;
  ------------------
  |  Branch (931:12): [True: 0, False: 4.17k]
  ------------------
  932|  4.17k|}
deflate:
  981|  4.17k|int ZEXPORT deflate(z_streamp strm, int flush) {
  982|  4.17k|    int old_flush; /* value of flush param for previous deflate call */
  983|  4.17k|    deflate_state *s;
  984|       |
  985|  4.17k|    if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) {
  ------------------
  |  |  177|  8.35k|#define Z_BLOCK         5
  ------------------
  |  Branch (985:9): [True: 0, False: 4.17k]
  |  Branch (985:36): [True: 0, False: 4.17k]
  |  Branch (985:55): [True: 0, False: 4.17k]
  ------------------
  986|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  987|      0|    }
  988|  4.17k|    s = strm->state;
  989|       |
  990|  4.17k|    if (strm->next_out == Z_NULL ||
  ------------------
  |  |  216|  8.35k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (990:9): [True: 0, False: 4.17k]
  ------------------
  991|  4.17k|        (strm->avail_in != 0 && strm->next_in == Z_NULL) ||
  ------------------
  |  |  216|  4.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (991:10): [True: 4.17k, False: 0]
  |  Branch (991:33): [True: 0, False: 4.17k]
  ------------------
  992|  4.17k|        (s->status == FINISH_STATE && flush != Z_FINISH)) {
  ------------------
  |  |   67|  8.35k|#define FINISH_STATE 666    /* stream complete */
  ------------------
                      (s->status == FINISH_STATE && flush != Z_FINISH)) {
  ------------------
  |  |  176|      0|#define Z_FINISH        4
  ------------------
  |  Branch (992:10): [True: 0, False: 4.17k]
  |  Branch (992:39): [True: 0, False: 0]
  ------------------
  993|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  994|      0|    }
  995|  4.17k|    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 (995:9): [True: 0, False: 4.17k]
  ------------------
  996|       |
  997|  4.17k|    old_flush = s->last_flush;
  998|  4.17k|    s->last_flush = flush;
  999|       |
 1000|       |    /* Flush as much pending output as possible */
 1001|  4.17k|    if (s->pending != 0) {
  ------------------
  |  Branch (1001:9): [True: 0, False: 4.17k]
  ------------------
 1002|      0|        flush_pending(strm);
 1003|      0|        if (strm->avail_out == 0) {
  ------------------
  |  Branch (1003:13): [True: 0, False: 0]
  ------------------
 1004|       |            /* Since avail_out is 0, deflate will be called again with
 1005|       |             * more output space, but possibly with both pending and
 1006|       |             * avail_in equal to zero. There won't be anything to do,
 1007|       |             * but this is not an error situation so make sure we
 1008|       |             * return OK instead of BUF_ERROR at next call of deflate:
 1009|       |             */
 1010|      0|            s->last_flush = -1;
 1011|      0|            return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1012|      0|        }
 1013|       |
 1014|       |    /* Make sure there is something to do and avoid duplicate consecutive
 1015|       |     * flushes. For repeated and useless calls with Z_FINISH, we keep
 1016|       |     * returning Z_STREAM_END instead of Z_BUF_ERROR.
 1017|       |     */
 1018|  4.17k|    } 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|  4.17k|#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0))
  |  |  ------------------
  |  |  |  Branch (133:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1018:16): [True: 0, False: 4.17k]
  |  Branch (1018:39): [True: 0, False: 0]
  ------------------
 1019|      0|               flush != Z_FINISH) {
  ------------------
  |  |  176|      0|#define Z_FINISH        4
  ------------------
  |  Branch (1019:16): [True: 0, False: 0]
  ------------------
 1020|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1021|      0|    }
 1022|       |
 1023|       |    /* User must not provide more input after the first FINISH: */
 1024|  4.17k|    if (s->status == FINISH_STATE && strm->avail_in != 0) {
  ------------------
  |  |   67|  8.35k|#define FINISH_STATE 666    /* stream complete */
  ------------------
  |  Branch (1024:9): [True: 0, False: 4.17k]
  |  Branch (1024:38): [True: 0, False: 0]
  ------------------
 1025|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1026|      0|    }
 1027|       |
 1028|       |    /* Write the header */
 1029|  4.17k|    if (s->status == INIT_STATE && s->wrap == 0)
  ------------------
  |  |   58|  8.35k|#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
  ------------------
  |  Branch (1029:9): [True: 4.17k, False: 0]
  |  Branch (1029:36): [True: 0, False: 4.17k]
  ------------------
 1030|      0|        s->status = BUSY_STATE;
  ------------------
  |  |   66|      0|#define BUSY_STATE   113    /* deflate -> FINISH_STATE */
  ------------------
 1031|  4.17k|    if (s->status == INIT_STATE) {
  ------------------
  |  |   58|  4.17k|#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
  ------------------
  |  Branch (1031:9): [True: 4.17k, False: 0]
  ------------------
 1032|       |        /* zlib header */
 1033|  4.17k|        uInt header = (Z_DEFLATED + ((s->w_bits - 8) << 4)) << 8;
  ------------------
  |  |  213|  4.17k|#define Z_DEFLATED   8
  ------------------
 1034|  4.17k|        uInt level_flags;
 1035|       |
 1036|  4.17k|        if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
  ------------------
  |  |  201|  8.35k|#define Z_HUFFMAN_ONLY        2
  ------------------
  |  Branch (1036:13): [True: 2.59k, False: 1.57k]
  |  Branch (1036:46): [True: 0, False: 1.57k]
  ------------------
 1037|  2.59k|            level_flags = 0;
 1038|  1.57k|        else if (s->level < 6)
  ------------------
  |  Branch (1038:18): [True: 817, False: 761]
  ------------------
 1039|    817|            level_flags = 1;
 1040|    761|        else if (s->level == 6)
  ------------------
  |  Branch (1040:18): [True: 625, False: 136]
  ------------------
 1041|    625|            level_flags = 2;
 1042|    136|        else
 1043|    136|            level_flags = 3;
 1044|  4.17k|        header |= (level_flags << 6);
 1045|  4.17k|        if (s->strstart != 0) header |= PRESET_DICT;
  ------------------
  |  |   96|  3.90k|#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
  ------------------
  |  Branch (1045:13): [True: 3.90k, False: 269]
  ------------------
 1046|  4.17k|        header += 31 - (header % 31);
 1047|       |
 1048|  4.17k|        putShortMSB(s, header);
 1049|       |
 1050|       |        /* Save the adler32 of the preset dictionary: */
 1051|  4.17k|        if (s->strstart != 0) {
  ------------------
  |  Branch (1051:13): [True: 3.90k, False: 269]
  ------------------
 1052|  3.90k|            putShortMSB(s, (uInt)(strm->adler >> 16));
 1053|  3.90k|            putShortMSB(s, (uInt)(strm->adler & 0xffff));
 1054|  3.90k|        }
 1055|  4.17k|        strm->adler = adler32(0L, Z_NULL, 0);
  ------------------
  |  |  216|  4.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
 1056|  4.17k|        s->status = BUSY_STATE;
  ------------------
  |  |   66|  4.17k|#define BUSY_STATE   113    /* deflate -> FINISH_STATE */
  ------------------
 1057|       |
 1058|       |        /* Compression must start with an empty pending buffer */
 1059|  4.17k|        flush_pending(strm);
 1060|  4.17k|        if (s->pending != 0) {
  ------------------
  |  Branch (1060:13): [True: 0, False: 4.17k]
  ------------------
 1061|      0|            s->last_flush = -1;
 1062|      0|            return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1063|      0|        }
 1064|  4.17k|    }
 1065|  4.17k|#ifdef GZIP
 1066|  4.17k|    if (s->status == GZIP_STATE) {
  ------------------
  |  |   60|  4.17k|#  define GZIP_STATE  57    /* gzip header -> BUSY_STATE | EXTRA_STATE */
  ------------------
  |  Branch (1066:9): [True: 0, False: 4.17k]
  ------------------
 1067|       |        /* gzip header */
 1068|      0|        strm->adler = crc32(0L, Z_NULL, 0);
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
 1069|      0|        put_byte(s, 31);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1070|      0|        put_byte(s, 139);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1071|      0|        put_byte(s, 8);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1072|      0|        if (s->gzhead == Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1072:13): [True: 0, False: 0]
  ------------------
 1073|      0|            put_byte(s, 0);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1074|      0|            put_byte(s, 0);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1075|      0|            put_byte(s, 0);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1076|      0|            put_byte(s, 0);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1077|      0|            put_byte(s, 0);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1078|      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]
  |  |  ------------------
  ------------------
 1079|      0|                     (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
 1080|      0|                      4 : 0));
 1081|      0|            put_byte(s, OS_CODE);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1082|      0|            s->status = BUSY_STATE;
  ------------------
  |  |   66|      0|#define BUSY_STATE   113    /* deflate -> FINISH_STATE */
  ------------------
 1083|       |
 1084|       |            /* Compression must start with an empty pending buffer */
 1085|      0|            flush_pending(strm);
 1086|      0|            if (s->pending != 0) {
  ------------------
  |  Branch (1086:17): [True: 0, False: 0]
  ------------------
 1087|      0|                s->last_flush = -1;
 1088|      0|                return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1089|      0|            }
 1090|      0|        }
 1091|      0|        else {
 1092|      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]
  |  |  ------------------
  ------------------
 1093|      0|                     (s->gzhead->hcrc ? 2 : 0) +
 1094|      0|                     (s->gzhead->extra == Z_NULL ? 0 : 4) +
 1095|      0|                     (s->gzhead->name == Z_NULL ? 0 : 8) +
 1096|      0|                     (s->gzhead->comment == Z_NULL ? 0 : 16)
 1097|      0|                     );
 1098|      0|            put_byte(s, (Byte)(s->gzhead->time & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1099|      0|            put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1100|      0|            put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1101|      0|            put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1102|      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]
  |  |  ------------------
  ------------------
 1103|      0|                     (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
 1104|      0|                      4 : 0));
 1105|      0|            put_byte(s, s->gzhead->os & 0xff);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1106|      0|            if (s->gzhead->extra != Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1106:17): [True: 0, False: 0]
  ------------------
 1107|      0|                put_byte(s, s->gzhead->extra_len & 0xff);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1108|      0|                put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1109|      0|            }
 1110|      0|            if (s->gzhead->hcrc)
  ------------------
  |  Branch (1110:17): [True: 0, False: 0]
  ------------------
 1111|      0|                strm->adler = crc32_z(strm->adler, s->pending_buf,
 1112|      0|                                      s->pending);
 1113|      0|            s->gzindex = 0;
 1114|      0|            s->status = EXTRA_STATE;
  ------------------
  |  |   62|      0|#define EXTRA_STATE   69    /* gzip extra block -> NAME_STATE */
  ------------------
 1115|      0|        }
 1116|      0|    }
 1117|  4.17k|    if (s->status == EXTRA_STATE) {
  ------------------
  |  |   62|  4.17k|#define EXTRA_STATE   69    /* gzip extra block -> NAME_STATE */
  ------------------
  |  Branch (1117:9): [True: 0, False: 4.17k]
  ------------------
 1118|      0|        if (s->gzhead->extra != Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1118:13): [True: 0, False: 0]
  ------------------
 1119|      0|            ulg beg = s->pending;   /* start of bytes to update crc */
 1120|      0|            ulg left = (s->gzhead->extra_len & 0xffff) - s->gzindex;
 1121|      0|            while (s->pending + left > s->pending_buf_size) {
  ------------------
  |  Branch (1121:20): [True: 0, False: 0]
  ------------------
 1122|      0|                ulg copy = s->pending_buf_size - s->pending;
 1123|      0|                zmemcpy(s->pending_buf + s->pending,
  ------------------
  |  |  216|      0|#    define zmemcpy memcpy
  ------------------
 1124|      0|                        s->gzhead->extra + s->gzindex, copy);
 1125|      0|                s->pending = s->pending_buf_size;
 1126|      0|                HCRC_UPDATE(beg);
  ------------------
  |  |  974|      0|    do { \
  |  |  975|      0|        if (s->gzhead->hcrc && s->pending > (beg)) \
  |  |  ------------------
  |  |  |  Branch (975:13): [True: 0, False: 0]
  |  |  |  Branch (975:32): [True: 0, False: 0]
  |  |  ------------------
  |  |  976|      0|            strm->adler = crc32_z(strm->adler, s->pending_buf + (beg), \
  |  |  977|      0|                                  s->pending - (beg)); \
  |  |  978|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (978:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1127|      0|                s->gzindex += copy;
 1128|      0|                flush_pending(strm);
 1129|      0|                if (s->pending != 0) {
  ------------------
  |  Branch (1129:21): [True: 0, False: 0]
  ------------------
 1130|      0|                    s->last_flush = -1;
 1131|      0|                    return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1132|      0|                }
 1133|      0|                beg = 0;
 1134|      0|                left -= copy;
 1135|      0|            }
 1136|      0|            zmemcpy(s->pending_buf + s->pending,
  ------------------
  |  |  216|      0|#    define zmemcpy memcpy
  ------------------
 1137|      0|                    s->gzhead->extra + s->gzindex, left);
 1138|      0|            s->pending += left;
 1139|      0|            HCRC_UPDATE(beg);
  ------------------
  |  |  974|      0|    do { \
  |  |  975|      0|        if (s->gzhead->hcrc && s->pending > (beg)) \
  |  |  ------------------
  |  |  |  Branch (975:13): [True: 0, False: 0]
  |  |  |  Branch (975:32): [True: 0, False: 0]
  |  |  ------------------
  |  |  976|      0|            strm->adler = crc32_z(strm->adler, s->pending_buf + (beg), \
  |  |  977|      0|                                  s->pending - (beg)); \
  |  |  978|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (978:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1140|      0|            s->gzindex = 0;
 1141|      0|        }
 1142|      0|        s->status = NAME_STATE;
  ------------------
  |  |   63|      0|#define NAME_STATE    73    /* gzip file name -> COMMENT_STATE */
  ------------------
 1143|      0|    }
 1144|  4.17k|    if (s->status == NAME_STATE) {
  ------------------
  |  |   63|  4.17k|#define NAME_STATE    73    /* gzip file name -> COMMENT_STATE */
  ------------------
  |  Branch (1144:9): [True: 0, False: 4.17k]
  ------------------
 1145|      0|        if (s->gzhead->name != Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1145:13): [True: 0, False: 0]
  ------------------
 1146|      0|            ulg beg = s->pending;   /* start of bytes to update crc */
 1147|      0|            int val;
 1148|      0|            do {
 1149|      0|                if (s->pending == s->pending_buf_size) {
  ------------------
  |  Branch (1149:21): [True: 0, False: 0]
  ------------------
 1150|      0|                    HCRC_UPDATE(beg);
  ------------------
  |  |  974|      0|    do { \
  |  |  975|      0|        if (s->gzhead->hcrc && s->pending > (beg)) \
  |  |  ------------------
  |  |  |  Branch (975:13): [True: 0, False: 0]
  |  |  |  Branch (975:32): [True: 0, False: 0]
  |  |  ------------------
  |  |  976|      0|            strm->adler = crc32_z(strm->adler, s->pending_buf + (beg), \
  |  |  977|      0|                                  s->pending - (beg)); \
  |  |  978|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (978:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1151|      0|                    flush_pending(strm);
 1152|      0|                    if (s->pending != 0) {
  ------------------
  |  Branch (1152:25): [True: 0, False: 0]
  ------------------
 1153|      0|                        s->last_flush = -1;
 1154|      0|                        return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1155|      0|                    }
 1156|      0|                    beg = 0;
 1157|      0|                }
 1158|      0|                val = s->gzhead->name[s->gzindex++];
 1159|      0|                put_byte(s, val);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1160|      0|            } while (val != 0);
  ------------------
  |  Branch (1160:22): [True: 0, False: 0]
  ------------------
 1161|      0|            HCRC_UPDATE(beg);
  ------------------
  |  |  974|      0|    do { \
  |  |  975|      0|        if (s->gzhead->hcrc && s->pending > (beg)) \
  |  |  ------------------
  |  |  |  Branch (975:13): [True: 0, False: 0]
  |  |  |  Branch (975:32): [True: 0, False: 0]
  |  |  ------------------
  |  |  976|      0|            strm->adler = crc32_z(strm->adler, s->pending_buf + (beg), \
  |  |  977|      0|                                  s->pending - (beg)); \
  |  |  978|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (978:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1162|      0|            s->gzindex = 0;
 1163|      0|        }
 1164|      0|        s->status = COMMENT_STATE;
  ------------------
  |  |   64|      0|#define COMMENT_STATE 91    /* gzip comment -> HCRC_STATE */
  ------------------
 1165|      0|    }
 1166|  4.17k|    if (s->status == COMMENT_STATE) {
  ------------------
  |  |   64|  4.17k|#define COMMENT_STATE 91    /* gzip comment -> HCRC_STATE */
  ------------------
  |  Branch (1166:9): [True: 0, False: 4.17k]
  ------------------
 1167|      0|        if (s->gzhead->comment != Z_NULL) {
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (1167:13): [True: 0, False: 0]
  ------------------
 1168|      0|            ulg beg = s->pending;   /* start of bytes to update crc */
 1169|      0|            int val;
 1170|      0|            do {
 1171|      0|                if (s->pending == s->pending_buf_size) {
  ------------------
  |  Branch (1171:21): [True: 0, False: 0]
  ------------------
 1172|      0|                    HCRC_UPDATE(beg);
  ------------------
  |  |  974|      0|    do { \
  |  |  975|      0|        if (s->gzhead->hcrc && s->pending > (beg)) \
  |  |  ------------------
  |  |  |  Branch (975:13): [True: 0, False: 0]
  |  |  |  Branch (975:32): [True: 0, False: 0]
  |  |  ------------------
  |  |  976|      0|            strm->adler = crc32_z(strm->adler, s->pending_buf + (beg), \
  |  |  977|      0|                                  s->pending - (beg)); \
  |  |  978|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (978:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1173|      0|                    flush_pending(strm);
 1174|      0|                    if (s->pending != 0) {
  ------------------
  |  Branch (1174:25): [True: 0, False: 0]
  ------------------
 1175|      0|                        s->last_flush = -1;
 1176|      0|                        return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1177|      0|                    }
 1178|      0|                    beg = 0;
 1179|      0|                }
 1180|      0|                val = s->gzhead->comment[s->gzindex++];
 1181|      0|                put_byte(s, val);
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1182|      0|            } while (val != 0);
  ------------------
  |  Branch (1182:22): [True: 0, False: 0]
  ------------------
 1183|      0|            HCRC_UPDATE(beg);
  ------------------
  |  |  974|      0|    do { \
  |  |  975|      0|        if (s->gzhead->hcrc && s->pending > (beg)) \
  |  |  ------------------
  |  |  |  Branch (975:13): [True: 0, False: 0]
  |  |  |  Branch (975:32): [True: 0, False: 0]
  |  |  ------------------
  |  |  976|      0|            strm->adler = crc32_z(strm->adler, s->pending_buf + (beg), \
  |  |  977|      0|                                  s->pending - (beg)); \
  |  |  978|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (978:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1184|      0|        }
 1185|      0|        s->status = HCRC_STATE;
  ------------------
  |  |   65|      0|#define HCRC_STATE   103    /* gzip header CRC -> BUSY_STATE */
  ------------------
 1186|      0|    }
 1187|  4.17k|    if (s->status == HCRC_STATE) {
  ------------------
  |  |   65|  4.17k|#define HCRC_STATE   103    /* gzip header CRC -> BUSY_STATE */
  ------------------
  |  Branch (1187:9): [True: 0, False: 4.17k]
  ------------------
 1188|      0|        if (s->gzhead->hcrc) {
  ------------------
  |  Branch (1188:13): [True: 0, False: 0]
  ------------------
 1189|      0|            if (s->pending + 2 > s->pending_buf_size) {
  ------------------
  |  Branch (1189:17): [True: 0, False: 0]
  ------------------
 1190|      0|                flush_pending(strm);
 1191|      0|                if (s->pending != 0) {
  ------------------
  |  Branch (1191:21): [True: 0, False: 0]
  ------------------
 1192|      0|                    s->last_flush = -1;
 1193|      0|                    return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1194|      0|                }
 1195|      0|            }
 1196|      0|            put_byte(s, (Byte)(strm->adler & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1197|      0|            put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1198|      0|            strm->adler = crc32(0L, Z_NULL, 0);
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
 1199|      0|        }
 1200|      0|        s->status = BUSY_STATE;
  ------------------
  |  |   66|      0|#define BUSY_STATE   113    /* deflate -> FINISH_STATE */
  ------------------
 1201|       |
 1202|       |        /* Compression must start with an empty pending buffer */
 1203|      0|        flush_pending(strm);
 1204|      0|        if (s->pending != 0) {
  ------------------
  |  Branch (1204:13): [True: 0, False: 0]
  ------------------
 1205|      0|            s->last_flush = -1;
 1206|      0|            return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1207|      0|        }
 1208|      0|    }
 1209|  4.17k|#endif
 1210|       |
 1211|       |    /* Start a new block or continue the current one.
 1212|       |     */
 1213|  4.17k|    if (strm->avail_in != 0 || s->lookahead != 0 ||
  ------------------
  |  Branch (1213:9): [True: 4.17k, False: 0]
  |  Branch (1213:32): [True: 0, False: 0]
  ------------------
 1214|  4.17k|        (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 (1214:10): [True: 0, False: 0]
  |  Branch (1214:33): [True: 0, False: 0]
  ------------------
 1215|  4.17k|        block_state bstate;
 1216|       |
 1217|  4.17k|        bstate = s->level == 0 ? deflate_stored(s, flush) :
  ------------------
  |  Branch (1217:18): [True: 0, False: 4.17k]
  ------------------
 1218|  4.17k|                 s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :
  ------------------
  |  |  201|  4.17k|#define Z_HUFFMAN_ONLY        2
  ------------------
  |  Branch (1218:18): [True: 1.07k, False: 3.10k]
  ------------------
 1219|  4.17k|                 s->strategy == Z_RLE ? deflate_rle(s, flush) :
  ------------------
  |  |  202|  3.10k|#define Z_RLE                 3
  ------------------
  |  Branch (1219:18): [True: 911, False: 2.19k]
  ------------------
 1220|  3.10k|                 (*(configuration_table[s->level].func))(s, flush);
 1221|       |
 1222|  4.17k|        if (bstate == finish_started || bstate == finish_done) {
  ------------------
  |  Branch (1222:13): [True: 0, False: 4.17k]
  |  Branch (1222:41): [True: 4.17k, False: 0]
  ------------------
 1223|  4.17k|            s->status = FINISH_STATE;
  ------------------
  |  |   67|  4.17k|#define FINISH_STATE 666    /* stream complete */
  ------------------
 1224|  4.17k|        }
 1225|  4.17k|        if (bstate == need_more || bstate == finish_started) {
  ------------------
  |  Branch (1225:13): [True: 0, False: 4.17k]
  |  Branch (1225:36): [True: 0, False: 4.17k]
  ------------------
 1226|      0|            if (strm->avail_out == 0) {
  ------------------
  |  Branch (1226:17): [True: 0, False: 0]
  ------------------
 1227|      0|                s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
 1228|      0|            }
 1229|      0|            return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1230|       |            /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
 1231|       |             * of deflate should use the same flush parameter to make sure
 1232|       |             * that the flush is complete. So we don't have to output an
 1233|       |             * empty block here, this will be done at next call. This also
 1234|       |             * ensures that for a very small output buffer, we emit at most
 1235|       |             * one empty block.
 1236|       |             */
 1237|      0|        }
 1238|  4.17k|        if (bstate == block_done) {
  ------------------
  |  Branch (1238:13): [True: 0, False: 4.17k]
  ------------------
 1239|      0|            if (flush == Z_PARTIAL_FLUSH) {
  ------------------
  |  |  173|      0|#define Z_PARTIAL_FLUSH 1
  ------------------
  |  Branch (1239:17): [True: 0, False: 0]
  ------------------
 1240|      0|                _tr_align(s);
 1241|      0|            } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */
  ------------------
  |  |  177|      0|#define Z_BLOCK         5
  ------------------
  |  Branch (1241:24): [True: 0, False: 0]
  ------------------
 1242|      0|                _tr_stored_block(s, (char*)0, 0L, 0);
 1243|       |                /* For a full flush, this empty block will be recognized
 1244|       |                 * as a special marker by inflate_sync().
 1245|       |                 */
 1246|      0|                if (flush == Z_FULL_FLUSH) {
  ------------------
  |  |  175|      0|#define Z_FULL_FLUSH    3
  ------------------
  |  Branch (1246:21): [True: 0, False: 0]
  ------------------
 1247|      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]
  |  |  ------------------
  ------------------
 1248|      0|                    if (s->lookahead == 0) {
  ------------------
  |  Branch (1248:25): [True: 0, False: 0]
  ------------------
 1249|      0|                        s->strstart = 0;
 1250|      0|                        s->block_start = 0L;
 1251|      0|                        s->insert = 0;
 1252|      0|                    }
 1253|      0|                }
 1254|      0|            }
 1255|      0|            flush_pending(strm);
 1256|      0|            if (strm->avail_out == 0) {
  ------------------
  |  Branch (1256:17): [True: 0, False: 0]
  ------------------
 1257|      0|              s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
 1258|      0|              return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
 1259|      0|            }
 1260|      0|        }
 1261|  4.17k|    }
 1262|       |
 1263|  4.17k|    if (flush != Z_FINISH) return Z_OK;
  ------------------
  |  |  176|  4.17k|#define Z_FINISH        4
  ------------------
                  if (flush != Z_FINISH) return Z_OK;
  ------------------
  |  |  181|      0|#define Z_OK            0
  ------------------
  |  Branch (1263:9): [True: 0, False: 4.17k]
  ------------------
 1264|  4.17k|    if (s->wrap <= 0) return Z_STREAM_END;
  ------------------
  |  |  182|      0|#define Z_STREAM_END    1
  ------------------
  |  Branch (1264:9): [True: 0, False: 4.17k]
  ------------------
 1265|       |
 1266|       |    /* Write the trailer */
 1267|  4.17k|#ifdef GZIP
 1268|  4.17k|    if (s->wrap == 2) {
  ------------------
  |  Branch (1268:9): [True: 0, False: 4.17k]
  ------------------
 1269|      0|        put_byte(s, (Byte)(strm->adler & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1270|      0|        put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1271|      0|        put_byte(s, (Byte)((strm->adler >> 16) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1272|      0|        put_byte(s, (Byte)((strm->adler >> 24) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1273|      0|        put_byte(s, (Byte)(strm->total_in & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1274|      0|        put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1275|      0|        put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1276|      0|        put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));
  ------------------
  |  |  293|      0|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
 1277|      0|    }
 1278|  4.17k|    else
 1279|  4.17k|#endif
 1280|  4.17k|    {
 1281|  4.17k|        putShortMSB(s, (uInt)(strm->adler >> 16));
 1282|  4.17k|        putShortMSB(s, (uInt)(strm->adler & 0xffff));
 1283|  4.17k|    }
 1284|  4.17k|    flush_pending(strm);
 1285|       |    /* If avail_out is zero, the application will call deflate again
 1286|       |     * to flush the rest.
 1287|       |     */
 1288|  4.17k|    if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */
  ------------------
  |  Branch (1288:9): [True: 4.17k, False: 0]
  ------------------
 1289|  4.17k|    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|  4.17k|#define Z_STREAM_END    1
  ------------------
  |  Branch (1289:12): [True: 0, False: 4.17k]
  ------------------
 1290|  4.17k|}
deflateEnd:
 1293|  4.17k|int ZEXPORT deflateEnd(z_streamp strm) {
 1294|  4.17k|    int status;
 1295|       |
 1296|  4.17k|    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (1296:9): [True: 0, False: 4.17k]
  ------------------
 1297|       |
 1298|  4.17k|    status = strm->state->status;
 1299|       |
 1300|       |    /* Deallocate in reverse order of allocations: */
 1301|  4.17k|    TRY_FREE(strm, strm->state->pending_buf);
  ------------------
  |  |  255|  4.17k|#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
  |  |  ------------------
  |  |  |  |  254|  4.17k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  |  |  ------------------
  |  |  |  Branch (255:29): [True: 4.17k, False: 0]
  |  |  ------------------
  ------------------
 1302|  4.17k|    TRY_FREE(strm, strm->state->head);
  ------------------
  |  |  255|  4.17k|#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
  |  |  ------------------
  |  |  |  |  254|  4.17k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  |  |  ------------------
  |  |  |  Branch (255:29): [True: 4.17k, False: 0]
  |  |  ------------------
  ------------------
 1303|  4.17k|    TRY_FREE(strm, strm->state->prev);
  ------------------
  |  |  255|  4.17k|#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
  |  |  ------------------
  |  |  |  |  254|  4.17k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  |  |  ------------------
  |  |  |  Branch (255:29): [True: 4.17k, False: 0]
  |  |  ------------------
  ------------------
 1304|  4.17k|    TRY_FREE(strm, strm->state->window);
  ------------------
  |  |  255|  4.17k|#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
  |  |  ------------------
  |  |  |  |  254|  4.17k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  |  |  ------------------
  |  |  |  Branch (255:29): [True: 4.17k, False: 0]
  |  |  ------------------
  ------------------
 1305|       |
 1306|  4.17k|    ZFREE(strm, strm->state);
  ------------------
  |  |  254|  4.17k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
 1307|  4.17k|    strm->state = Z_NULL;
  ------------------
  |  |  216|  4.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
 1308|       |
 1309|  4.17k|    return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
  ------------------
  |  |   66|  4.17k|#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|  4.17k|#define Z_OK            0
  ------------------
  |  Branch (1309:12): [True: 0, False: 4.17k]
  ------------------
 1310|  4.17k|}
deflate.c:deflateStateCheck:
  538|  20.8k|local int deflateStateCheck(z_streamp strm) {
  539|  20.8k|    deflate_state *s;
  540|  20.8k|    if (strm == Z_NULL ||
  ------------------
  |  |  216|  41.7k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (540:9): [True: 0, False: 20.8k]
  ------------------
  541|  20.8k|        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
  ------------------
  |  Branch (541:9): [True: 0, False: 20.8k]
  |  Branch (541:42): [True: 0, False: 20.8k]
  ------------------
  542|      0|        return 1;
  543|  20.8k|    s = strm->state;
  544|  20.8k|    if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE &&
  ------------------
  |  |  216|  41.7k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE &&
  ------------------
  |  |   58|  41.7k|#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
  ------------------
  |  Branch (544:9): [True: 0, False: 20.8k]
  |  Branch (544:24): [True: 0, False: 20.8k]
  |  Branch (544:44): [True: 4.17k, False: 16.7k]
  ------------------
  545|  4.17k|#ifdef GZIP
  546|  4.17k|                                           s->status != GZIP_STATE &&
  ------------------
  |  |   60|  25.0k|#  define GZIP_STATE  57    /* gzip header -> BUSY_STATE | EXTRA_STATE */
  ------------------
  |  Branch (546:44): [True: 4.17k, False: 0]
  ------------------
  547|  4.17k|#endif
  548|  4.17k|                                           s->status != EXTRA_STATE &&
  ------------------
  |  |   62|  25.0k|#define EXTRA_STATE   69    /* gzip extra block -> NAME_STATE */
  ------------------
  |  Branch (548:44): [True: 4.17k, False: 0]
  ------------------
  549|  4.17k|                                           s->status != NAME_STATE &&
  ------------------
  |  |   63|  25.0k|#define NAME_STATE    73    /* gzip file name -> COMMENT_STATE */
  ------------------
  |  Branch (549:44): [True: 4.17k, False: 0]
  ------------------
  550|  4.17k|                                           s->status != COMMENT_STATE &&
  ------------------
  |  |   64|  25.0k|#define COMMENT_STATE 91    /* gzip comment -> HCRC_STATE */
  ------------------
  |  Branch (550:44): [True: 4.17k, False: 0]
  ------------------
  551|  4.17k|                                           s->status != HCRC_STATE &&
  ------------------
  |  |   65|  25.0k|#define HCRC_STATE   103    /* gzip header CRC -> BUSY_STATE */
  ------------------
  |  Branch (551:44): [True: 4.17k, False: 0]
  ------------------
  552|  4.17k|                                           s->status != BUSY_STATE &&
  ------------------
  |  |   66|  25.0k|#define BUSY_STATE   113    /* deflate -> FINISH_STATE */
  ------------------
  |  Branch (552:44): [True: 4.17k, False: 0]
  ------------------
  553|  4.17k|                                           s->status != FINISH_STATE))
  ------------------
  |  |   67|  4.17k|#define FINISH_STATE 666    /* stream complete */
  ------------------
  |  Branch (553:44): [True: 0, False: 4.17k]
  ------------------
  554|      0|        return 1;
  555|  20.8k|    return 0;
  556|  20.8k|}
deflate.c:fill_window:
  252|   289k|local void fill_window(deflate_state *s) {
  253|   289k|    unsigned n;
  254|   289k|    unsigned more;    /* Amount of free space at the end of the window. */
  255|   289k|    uInt wsize = s->w_size;
  256|       |
  257|   289k|    Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
  258|       |
  259|   289k|    do {
  260|   289k|        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|   289k|        if (sizeof(int) <= 2) {
  ------------------
  |  Branch (267:13): [Folded, False: 289k]
  ------------------
  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|   289k|        if (s->strstart >= wsize + MAX_DIST(s)) {
  ------------------
  |  |  301|   289k|#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
  |  |  ------------------
  |  |  |  |  296|   289k|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|   289k|#define MAX_MATCH  258
  |  |  |  |  ------------------
  |  |  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|   289k|#define MIN_MATCH  3
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (285:13): [True: 18.4k, False: 271k]
  ------------------
  286|       |
  287|  18.4k|            zmemcpy(s->window, s->window + wsize, (unsigned)wsize - more);
  ------------------
  |  |  216|  18.4k|#    define zmemcpy memcpy
  ------------------
  288|  18.4k|            s->match_start -= wsize;
  289|  18.4k|            s->strstart    -= wsize; /* we now have strstart >= MAX_DIST */
  290|  18.4k|            s->block_start -= (long) wsize;
  291|  18.4k|            if (s->insert > s->strstart)
  ------------------
  |  Branch (291:17): [True: 0, False: 18.4k]
  ------------------
  292|      0|                s->insert = s->strstart;
  293|  18.4k|            slide_hash(s);
  294|  18.4k|            more += wsize;
  295|  18.4k|        }
  296|   289k|        if (s->strm->avail_in == 0) break;
  ------------------
  |  Branch (296:13): [True: 263k, False: 25.9k]
  ------------------
  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.9k|        Assert(more >= 2, "more < 2");
  310|       |
  311|  25.9k|        n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
  312|  25.9k|        s->lookahead += n;
  313|       |
  314|       |        /* Initialize the hash value now that we have some input: */
  315|  25.9k|        if (s->lookahead + s->insert >= MIN_MATCH) {
  ------------------
  |  |   92|  25.9k|#define MIN_MATCH  3
  ------------------
  |  Branch (315:13): [True: 25.7k, False: 254]
  ------------------
  316|  25.7k|            uInt str = s->strstart - s->insert;
  317|  25.7k|            s->ins_h = s->window[str];
  318|  25.7k|            UPDATE_HASH(s, s->ins_h, s->window[str + 1]);
  ------------------
  |  |  141|  25.7k|#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|  33.3k|            while (s->insert) {
  ------------------
  |  Branch (322:20): [True: 7.62k, False: 25.6k]
  ------------------
  323|  7.62k|                UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]);
  ------------------
  |  |  141|  7.62k|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  ------------------
  324|  7.62k|#ifndef FASTEST
  325|  7.62k|                s->prev[str & s->w_mask] = s->head[s->ins_h];
  326|  7.62k|#endif
  327|  7.62k|                s->head[s->ins_h] = (Pos)str;
  328|  7.62k|                str++;
  329|  7.62k|                s->insert--;
  330|  7.62k|                if (s->lookahead + s->insert < MIN_MATCH)
  ------------------
  |  |   92|  7.62k|#define MIN_MATCH  3
  ------------------
  |  Branch (330:21): [True: 27, False: 7.59k]
  ------------------
  331|     27|                    break;
  332|  7.62k|            }
  333|  25.7k|        }
  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.9k|    } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
  ------------------
  |  |  296|  51.9k|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   93|  25.9k|#define MAX_MATCH  258
  |  |  ------------------
  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   92|  25.9k|#define MIN_MATCH  3
  |  |  ------------------
  ------------------
  |  Branch (338:14): [True: 6.27k, False: 19.6k]
  |  Branch (338:46): [True: 0, False: 6.27k]
  ------------------
  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|   289k|    if (s->high_water < s->window_size) {
  ------------------
  |  Branch (347:9): [True: 173k, False: 115k]
  ------------------
  348|   173k|        ulg curr = s->strstart + (ulg)(s->lookahead);
  349|   173k|        ulg init;
  350|       |
  351|   173k|        if (s->high_water < curr) {
  ------------------
  |  Branch (351:13): [True: 5.96k, False: 167k]
  ------------------
  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.96k|            init = s->window_size - curr;
  356|  5.96k|            if (init > WIN_INIT)
  ------------------
  |  |  306|  5.96k|#define WIN_INIT MAX_MATCH
  |  |  ------------------
  |  |  |  |   93|  5.96k|#define MAX_MATCH  258
  |  |  ------------------
  ------------------
  |  Branch (356:17): [True: 5.06k, False: 900]
  ------------------
  357|  5.06k|                init = WIN_INIT;
  ------------------
  |  |  306|  5.06k|#define WIN_INIT MAX_MATCH
  |  |  ------------------
  |  |  |  |   93|  5.06k|#define MAX_MATCH  258
  |  |  ------------------
  ------------------
  358|  5.96k|            zmemzero(s->window + curr, (unsigned)init);
  ------------------
  |  |  218|  5.96k|#    define zmemzero(dest, len) memset(dest, 0, len)
  ------------------
  359|  5.96k|            s->high_water = curr + init;
  360|  5.96k|        }
  361|   167k|        else if (s->high_water < (ulg)curr + WIN_INIT) {
  ------------------
  |  |  306|   167k|#define WIN_INIT MAX_MATCH
  |  |  ------------------
  |  |  |  |   93|   167k|#define MAX_MATCH  258
  |  |  ------------------
  ------------------
  |  Branch (361:18): [True: 2.38k, False: 165k]
  ------------------
  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.38k|            init = (ulg)curr + WIN_INIT - s->high_water;
  ------------------
  |  |  306|  2.38k|#define WIN_INIT MAX_MATCH
  |  |  ------------------
  |  |  |  |   93|  2.38k|#define MAX_MATCH  258
  |  |  ------------------
  ------------------
  367|  2.38k|            if (init > s->window_size - s->high_water)
  ------------------
  |  Branch (367:17): [True: 0, False: 2.38k]
  ------------------
  368|      0|                init = s->window_size - s->high_water;
  369|  2.38k|            zmemzero(s->window + s->high_water, (unsigned)init);
  ------------------
  |  |  218|  2.38k|#    define zmemzero(dest, len) memset(dest, 0, len)
  ------------------
  370|  2.38k|            s->high_water += init;
  371|  2.38k|        }
  372|   173k|    }
  373|       |
  374|   289k|    Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
  375|   289k|           "not enough room for search");
  376|   289k|}
deflate.c:read_buf:
  219|  25.9k|local unsigned read_buf(z_streamp strm, Bytef *buf, unsigned size) {
  220|  25.9k|    unsigned len = strm->avail_in;
  221|       |
  222|  25.9k|    if (len > size) len = size;
  ------------------
  |  Branch (222:9): [True: 17.8k, False: 8.08k]
  ------------------
  223|  25.9k|    if (len == 0) return 0;
  ------------------
  |  Branch (223:9): [True: 0, False: 25.9k]
  ------------------
  224|       |
  225|  25.9k|    strm->avail_in  -= len;
  226|       |
  227|  25.9k|    zmemcpy(buf, strm->next_in, len);
  ------------------
  |  |  216|  25.9k|#    define zmemcpy memcpy
  ------------------
  228|  25.9k|    if (strm->state->wrap == 1) {
  ------------------
  |  Branch (228:9): [True: 22.0k, False: 3.90k]
  ------------------
  229|  22.0k|        strm->adler = adler32(strm->adler, buf, len);
  230|  22.0k|    }
  231|  3.90k|#ifdef GZIP
  232|  3.90k|    else if (strm->state->wrap == 2) {
  ------------------
  |  Branch (232:14): [True: 0, False: 3.90k]
  ------------------
  233|      0|        strm->adler = crc32(strm->adler, buf, len);
  234|      0|    }
  235|  25.9k|#endif
  236|  25.9k|    strm->next_in  += len;
  237|  25.9k|    strm->total_in += len;
  238|       |
  239|  25.9k|    return len;
  240|  25.9k|}
deflate.c:lm_init:
  682|  4.17k|local void lm_init(deflate_state *s) {
  683|  4.17k|    s->window_size = (ulg)2L*s->w_size;
  684|       |
  685|  4.17k|    CLEAR_HASH(s);
  ------------------
  |  |  171|  4.17k|    do { \
  |  |  172|  4.17k|        s->head[s->hash_size - 1] = NIL; \
  |  |  ------------------
  |  |  |  |   85|  4.17k|#define NIL 0
  |  |  ------------------
  |  |  173|  4.17k|        zmemzero(s->head, (unsigned)(s->hash_size - 1)*sizeof(*s->head)); \
  |  |  ------------------
  |  |  |  |  218|  4.17k|#    define zmemzero(dest, len) memset(dest, 0, len)
  |  |  ------------------
  |  |  174|  4.17k|        s->slid = 0; \
  |  |  175|  4.17k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (175:14): [Folded, False: 4.17k]
  |  |  ------------------
  ------------------
  686|       |
  687|       |    /* Set the default configuration parameters:
  688|       |     */
  689|  4.17k|    s->max_lazy_match   = configuration_table[s->level].max_lazy;
  690|  4.17k|    s->good_match       = configuration_table[s->level].good_length;
  691|  4.17k|    s->nice_match       = configuration_table[s->level].nice_length;
  692|  4.17k|    s->max_chain_length = configuration_table[s->level].max_chain;
  693|       |
  694|  4.17k|    s->strstart = 0;
  695|  4.17k|    s->block_start = 0L;
  696|  4.17k|    s->lookahead = 0;
  697|  4.17k|    s->insert = 0;
  698|  4.17k|    s->match_length = s->prev_length = MIN_MATCH-1;
  ------------------
  |  |   92|  4.17k|#define MIN_MATCH  3
  ------------------
  699|  4.17k|    s->match_available = 0;
  700|  4.17k|    s->ins_h = 0;
  701|  4.17k|}
deflate.c:deflate_fast:
 1857|    819|local block_state deflate_fast(deflate_state *s, int flush) {
 1858|    819|    IPos hash_head;       /* head of the hash chain */
 1859|    819|    int bflush;           /* set if current block must be flushed */
 1860|       |
 1861|  1.23M|    for (;;) {
 1862|       |        /* Make sure that we always have enough lookahead, except
 1863|       |         * at the end of the input file. We need MAX_MATCH bytes
 1864|       |         * for the next match, plus MIN_MATCH bytes to insert the
 1865|       |         * string following the next match.
 1866|       |         */
 1867|  1.23M|        if (s->lookahead < MIN_LOOKAHEAD) {
  ------------------
  |  |  296|  1.23M|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   93|  1.23M|#define MAX_MATCH  258
  |  |  ------------------
  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   92|  1.23M|#define MIN_MATCH  3
  |  |  ------------------
  ------------------
  |  Branch (1867:13): [True: 60.7k, False: 1.17M]
  ------------------
 1868|  60.7k|            fill_window(s);
 1869|  60.7k|            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
  ------------------
  |  |  296|   121k|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   93|  60.7k|#define MAX_MATCH  258
  |  |  ------------------
  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   92|  60.7k|#define MIN_MATCH  3
  |  |  ------------------
  ------------------
                          if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
  ------------------
  |  |  172|  57.1k|#define Z_NO_FLUSH      0
  ------------------
  |  Branch (1869:17): [True: 57.1k, False: 3.62k]
  |  Branch (1869:49): [True: 0, False: 57.1k]
  ------------------
 1870|      0|                return need_more;
 1871|      0|            }
 1872|  60.7k|            if (s->lookahead == 0) break; /* flush the current block */
  ------------------
  |  Branch (1872:17): [True: 819, False: 59.9k]
  ------------------
 1873|  60.7k|        }
 1874|       |
 1875|       |        /* Insert the string window[strstart .. strstart + 2] in the
 1876|       |         * dictionary, and set hash_head to the head of the hash chain:
 1877|       |         */
 1878|  1.23M|        hash_head = NIL;
  ------------------
  |  |   85|  1.23M|#define NIL 0
  ------------------
 1879|  1.23M|        if (s->lookahead >= MIN_MATCH) {
  ------------------
  |  |   92|  1.23M|#define MIN_MATCH  3
  ------------------
  |  Branch (1879:13): [True: 1.23M, False: 764]
  ------------------
 1880|  1.23M|            INSERT_STRING(s, s->strstart, hash_head);
  ------------------
  |  |  161|  1.23M|   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
  |  |  ------------------
  |  |  |  |  141|  1.23M|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  |  |  ------------------
  |  |  162|  1.23M|    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
  |  |  163|  1.23M|    s->head[s->ins_h] = (Pos)(str))
  ------------------
 1881|  1.23M|        }
 1882|       |
 1883|       |        /* Find the longest match, discarding those <= prev_length.
 1884|       |         * At this point we have always match_length < MIN_MATCH
 1885|       |         */
 1886|  1.23M|        if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
  ------------------
  |  |   85|  2.47M|#define NIL 0
  ------------------
                      if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
  ------------------
  |  |  301|   532k|#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
  |  |  ------------------
  |  |  |  |  296|   532k|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|   532k|#define MAX_MATCH  258
  |  |  |  |  ------------------
  |  |  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|   532k|#define MIN_MATCH  3
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1886:13): [True: 532k, False: 704k]
  |  Branch (1886:33): [True: 424k, False: 107k]
  ------------------
 1887|       |            /* To simplify the code, we prevent matches with the string
 1888|       |             * of window index 0 (in particular we have to avoid a match
 1889|       |             * of the string with itself at the start of the input file).
 1890|       |             */
 1891|   424k|            s->match_length = longest_match (s, hash_head);
 1892|       |            /* longest_match() sets match_start */
 1893|   424k|        }
 1894|  1.23M|        if (s->match_length >= MIN_MATCH) {
  ------------------
  |  |   92|  1.23M|#define MIN_MATCH  3
  ------------------
  |  Branch (1894:13): [True: 155k, False: 1.08M]
  ------------------
 1895|   155k|            check_match(s, s->strstart, s->match_start, (int)s->match_length);
 1896|       |
 1897|   155k|            _tr_tally_dist(s, s->strstart - s->match_start,
  ------------------
  |  |  366|   155k|  { uch len = (uch)(length); \
  |  |  367|   155k|    ush dist = (ush)(distance); \
  |  |  368|   155k|    s->sym_buf[s->sym_next++] = (uch)dist; \
  |  |  369|   155k|    s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \
  |  |  370|   155k|    s->sym_buf[s->sym_next++] = len; \
  |  |  371|   155k|    dist--; \
  |  |  372|   155k|    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
  |  |  ------------------
  |  |  |  |   37|   155k|#define LITERALS  256
  |  |  ------------------
  |  |                   s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
  |  |  ------------------
  |  |  |  |   83|   155k|#define Freq fc.freq
  |  |  ------------------
  |  |  373|   155k|    s->dyn_dtree[d_code(dist)].Freq++; \
  |  |  ------------------
  |  |  |  |  321|   155k|   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 82.9k, False: 72.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   s->dyn_dtree[d_code(dist)].Freq++; \
  |  |  ------------------
  |  |  |  |   83|   155k|#define Freq fc.freq
  |  |  ------------------
  |  |  374|   155k|    flush = (s->sym_next == s->sym_end); \
  |  |  375|   155k|  }
  ------------------
 1898|   155k|                           s->match_length - MIN_MATCH, bflush);
 1899|       |
 1900|   155k|            s->lookahead -= s->match_length;
 1901|       |
 1902|       |            /* Insert new strings in the hash table only if the match length
 1903|       |             * is not too large. This saves time but degrades compression.
 1904|       |             */
 1905|   155k|#ifndef FASTEST
 1906|   155k|            if (s->match_length <= s->max_insert_length &&
  ------------------
  |  |  186|   310k|#   define max_insert_length  max_lazy_match
  ------------------
  |  Branch (1906:17): [True: 88.3k, False: 67.1k]
  ------------------
 1907|  88.3k|                s->lookahead >= MIN_MATCH) {
  ------------------
  |  |   92|  88.3k|#define MIN_MATCH  3
  ------------------
  |  Branch (1907:17): [True: 88.0k, False: 350]
  ------------------
 1908|  88.0k|                s->match_length--; /* string at strstart already in table */
 1909|   230k|                do {
 1910|   230k|                    s->strstart++;
 1911|   230k|                    INSERT_STRING(s, s->strstart, hash_head);
  ------------------
  |  |  161|   230k|   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
  |  |  ------------------
  |  |  |  |  141|   230k|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  |  |  ------------------
  |  |  162|   230k|    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
  |  |  163|   230k|    s->head[s->ins_h] = (Pos)(str))
  ------------------
 1912|       |                    /* strstart never exceeds WSIZE-MAX_MATCH, so there are
 1913|       |                     * always MIN_MATCH bytes ahead.
 1914|       |                     */
 1915|   230k|                } while (--s->match_length != 0);
  ------------------
  |  Branch (1915:26): [True: 142k, False: 88.0k]
  ------------------
 1916|  88.0k|                s->strstart++;
 1917|  88.0k|            } else
 1918|  67.4k|#endif
 1919|  67.4k|            {
 1920|  67.4k|                s->strstart += s->match_length;
 1921|  67.4k|                s->match_length = 0;
 1922|  67.4k|                s->ins_h = s->window[s->strstart];
 1923|  67.4k|                UPDATE_HASH(s, s->ins_h, s->window[s->strstart + 1]);
  ------------------
  |  |  141|  67.4k|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  ------------------
 1924|       |#if MIN_MATCH != 3
 1925|       |                Call UPDATE_HASH() MIN_MATCH-3 more times
 1926|       |#endif
 1927|       |                /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
 1928|       |                 * matter since it will be recomputed at next deflate call.
 1929|       |                 */
 1930|  67.4k|            }
 1931|  1.08M|        } else {
 1932|       |            /* No match, output a literal byte */
 1933|  1.08M|            Tracevv((stderr,"%c", s->window[s->strstart]));
 1934|  1.08M|            _tr_tally_lit(s, s->window[s->strstart], bflush);
  ------------------
  |  |  358|  1.08M|  { uch cc = (c); \
  |  |  359|  1.08M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  360|  1.08M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  361|  1.08M|    s->sym_buf[s->sym_next++] = cc; \
  |  |  362|  1.08M|    s->dyn_ltree[cc].Freq++; \
  |  |  ------------------
  |  |  |  |   83|  1.08M|#define Freq fc.freq
  |  |  ------------------
  |  |  363|  1.08M|    flush = (s->sym_next == s->sym_end); \
  |  |  364|  1.08M|   }
  ------------------
 1935|  1.08M|            s->lookahead--;
 1936|  1.08M|            s->strstart++;
 1937|  1.08M|        }
 1938|  1.23M|        if (bflush) FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1642|  1.99k|#define FLUSH_BLOCK(s, last) { \
  |  | 1643|  1.99k|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1630|  1.99k|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1631|  1.99k|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1631:24): [True: 1.64k, False: 350]
  |  |  |  |  ------------------
  |  |  |  | 1632|  1.99k|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1633|  1.99k|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    350|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1634|  1.99k|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1635|  1.99k|                (last)); \
  |  |  |  | 1636|  1.99k|   s->block_start = s->strstart; \
  |  |  |  | 1637|  1.99k|   flush_pending(s->strm); \
  |  |  |  | 1638|  1.99k|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1639|  1.99k|}
  |  |  ------------------
  |  | 1644|  1.99k|   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
  |  |  ------------------
  |  |  |  Branch (1644:8): [True: 0, False: 1.99k]
  |  |  |  Branch (1644:40): [Folded, False: 0]
  |  |  ------------------
  |  | 1645|  1.99k|}
  ------------------
  |  Branch (1938:13): [True: 1.99k, False: 1.23M]
  ------------------
 1939|  1.23M|    }
 1940|    819|    s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
  ------------------
  |  |   92|    819|#define MIN_MATCH  3
  ------------------
                  s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
  ------------------
  |  |   92|    819|#define MIN_MATCH  3
  ------------------
  |  Branch (1940:17): [True: 0, False: 819]
  ------------------
 1941|    819|    if (flush == Z_FINISH) {
  ------------------
  |  |  176|    819|#define Z_FINISH        4
  ------------------
  |  Branch (1941:9): [True: 819, False: 0]
  ------------------
 1942|    819|        FLUSH_BLOCK(s, 1);
  ------------------
  |  | 1642|    819|#define FLUSH_BLOCK(s, last) { \
  |  | 1643|    819|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1630|    819|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1631|    819|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1631:24): [True: 739, False: 80]
  |  |  |  |  ------------------
  |  |  |  | 1632|    819|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1633|    819|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|     80|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1634|    819|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1635|    819|                (last)); \
  |  |  |  | 1636|    819|   s->block_start = s->strstart; \
  |  |  |  | 1637|    819|   flush_pending(s->strm); \
  |  |  |  | 1638|    819|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1639|    819|}
  |  |  ------------------
  |  | 1644|    819|   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
  |  |  ------------------
  |  |  |  Branch (1644:8): [True: 0, False: 819]
  |  |  |  Branch (1644:40): [True: 0, Folded]
  |  |  ------------------
  |  | 1645|    819|}
  ------------------
 1943|    819|        return finish_done;
 1944|    819|    }
 1945|      0|    if (s->sym_next)
  ------------------
  |  Branch (1945:9): [True: 0, False: 0]
  ------------------
 1946|      0|        FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1642|      0|#define FLUSH_BLOCK(s, last) { \
  |  | 1643|      0|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1630|      0|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1631|      0|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1631:24): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1632|      0|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1633|      0|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1634|      0|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1635|      0|                (last)); \
  |  |  |  | 1636|      0|   s->block_start = s->strstart; \
  |  |  |  | 1637|      0|   flush_pending(s->strm); \
  |  |  |  | 1638|      0|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1639|      0|}
  |  |  ------------------
  |  | 1644|      0|   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
  |  |  ------------------
  |  |  |  Branch (1644:8): [True: 0, False: 0]
  |  |  |  Branch (1644:40): [Folded, False: 0]
  |  |  ------------------
  |  | 1645|      0|}
  ------------------
 1947|      0|    return block_done;
 1948|      0|}
deflate.c:longest_match:
 1389|  1.55M|local uInt longest_match(deflate_state *s, IPos cur_match) {
 1390|  1.55M|    unsigned chain_length = s->max_chain_length;/* max hash chain length */
 1391|  1.55M|    Bytef *scan = s->window + s->strstart;      /* current string */
 1392|  1.55M|    Bytef *match;                               /* matched string */
 1393|  1.55M|    int len;                                    /* length of current match */
 1394|  1.55M|    int best_len = (int)s->prev_length;         /* best match length so far */
 1395|  1.55M|    int nice_match = s->nice_match;             /* stop if match long enough */
 1396|  1.55M|    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
  ------------------
  |  |  301|  1.55M|#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
  |  |  ------------------
  |  |  |  |  296|  1.55M|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|  1.55M|#define MAX_MATCH  258
  |  |  |  |  ------------------
  |  |  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|  1.55M|#define MIN_MATCH  3
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1396:18): [True: 1.03M, False: 511k]
  ------------------
 1397|  1.03M|        s->strstart - (IPos)MAX_DIST(s) : NIL;
  ------------------
  |  |  301|  1.03M|#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
  |  |  ------------------
  |  |  |  |  296|  1.03M|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|  1.03M|#define MAX_MATCH  258
  |  |  |  |  ------------------
  |  |  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|  1.03M|#define MIN_MATCH  3
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      s->strstart - (IPos)MAX_DIST(s) : NIL;
  ------------------
  |  |   85|   511k|#define NIL 0
  ------------------
 1398|       |    /* Stop when cur_match becomes <= limit. To simplify the code,
 1399|       |     * we prevent matches with the string of window index 0.
 1400|       |     */
 1401|  1.55M|    Posf *prev = s->prev;
 1402|  1.55M|    uInt wmask = s->w_mask;
 1403|       |
 1404|       |#ifdef UNALIGNED_OK
 1405|       |    /* Compare two bytes at a time. Note: this is not always beneficial.
 1406|       |     * Try with and without -DUNALIGNED_OK to check.
 1407|       |     */
 1408|       |    Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
 1409|       |    ush scan_start = *(ushf*)scan;
 1410|       |    ush scan_end   = *(ushf*)(scan + best_len - 1);
 1411|       |#else
 1412|  1.55M|    Bytef *strend = s->window + s->strstart + MAX_MATCH;
  ------------------
  |  |   93|  1.55M|#define MAX_MATCH  258
  ------------------
 1413|  1.55M|    Byte scan_end1  = scan[best_len - 1];
 1414|  1.55M|    Byte scan_end   = scan[best_len];
 1415|  1.55M|#endif
 1416|       |
 1417|       |    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
 1418|       |     * It is easy to get rid of this optimization if necessary.
 1419|       |     */
 1420|  1.55M|    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
 1421|       |
 1422|       |    /* Do not waste too much time if we already have a good match: */
 1423|  1.55M|    if (s->prev_length >= s->good_match) {
  ------------------
  |  Branch (1423:9): [True: 37.2k, False: 1.51M]
  ------------------
 1424|  37.2k|        chain_length >>= 2;
 1425|  37.2k|    }
 1426|       |    /* Do not look for matches beyond the end of the input. This is necessary
 1427|       |     * to make deflate deterministic.
 1428|       |     */
 1429|  1.55M|    if ((uInt)nice_match > s->lookahead) nice_match = (int)s->lookahead;
  ------------------
  |  Branch (1429:9): [True: 31.7k, False: 1.51M]
  ------------------
 1430|       |
 1431|  1.55M|    Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
 1432|  1.55M|           "need lookahead");
 1433|       |
 1434|  15.5M|    do {
 1435|  15.5M|        Assert(cur_match < s->strstart, "no future");
 1436|  15.5M|        match = s->window + cur_match;
 1437|       |
 1438|       |        /* Skip to next match if the match length cannot increase
 1439|       |         * or if the match length is less than 2.  Note that the checks below
 1440|       |         * for insufficient lookahead only occur occasionally for performance
 1441|       |         * reasons.  Therefore uninitialized memory will be accessed, and
 1442|       |         * conditional jumps will be made that depend on those values.
 1443|       |         * However the length of the match is limited to the lookahead, so
 1444|       |         * the output of deflate is not affected by the uninitialized values.
 1445|       |         */
 1446|       |#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
 1447|       |        /* This code assumes sizeof(unsigned short) == 2. Do not use
 1448|       |         * UNALIGNED_OK if your compiler uses a different size.
 1449|       |         */
 1450|       |        if (*(ushf*)(match + best_len - 1) != scan_end ||
 1451|       |            *(ushf*)match != scan_start) continue;
 1452|       |
 1453|       |        /* It is not necessary to compare scan[2] and match[2] since they are
 1454|       |         * always equal when the other bytes match, given that the hash keys
 1455|       |         * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
 1456|       |         * strstart + 3, + 5, up to strstart + 257. We check for insufficient
 1457|       |         * lookahead only every 4th comparison; the 128th check will be made
 1458|       |         * at strstart + 257. If MAX_MATCH-2 is not a multiple of 8, it is
 1459|       |         * necessary to put more guard bytes at the end of the window, or
 1460|       |         * to check more often for insufficient lookahead.
 1461|       |         */
 1462|       |        Assert(scan[2] == match[2], "scan[2]?");
 1463|       |        scan++, match++;
 1464|       |        do {
 1465|       |        } while (*(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
 1466|       |                 *(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
 1467|       |                 *(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
 1468|       |                 *(ushf*)(scan += 2) == *(ushf*)(match += 2) &&
 1469|       |                 scan < strend);
 1470|       |        /* The funny "do {}" generates better code on most compilers */
 1471|       |
 1472|       |        /* Here, scan <= window + strstart + 257 */
 1473|       |        Assert(scan <= s->window + (unsigned)(s->window_size - 1),
 1474|       |               "wild scan");
 1475|       |        if (*scan == *match) scan++;
 1476|       |
 1477|       |        len = (MAX_MATCH - 1) - (int)(strend - scan);
 1478|       |        scan = strend - (MAX_MATCH-1);
 1479|       |
 1480|       |#else /* UNALIGNED_OK */
 1481|       |
 1482|  15.5M|        if (match[best_len]     != scan_end  ||
  ------------------
  |  Branch (1482:13): [True: 11.8M, False: 3.69M]
  ------------------
 1483|  3.69M|            match[best_len - 1] != scan_end1 ||
  ------------------
  |  Branch (1483:13): [True: 1.19M, False: 2.50M]
  ------------------
 1484|  2.50M|            *match              != *scan     ||
  ------------------
  |  Branch (1484:13): [True: 1.42M, False: 1.08M]
  ------------------
 1485|  14.4M|            *++match            != scan[1])      continue;
  ------------------
  |  Branch (1485:13): [True: 3.88k, False: 1.07M]
  ------------------
 1486|       |
 1487|       |        /* The check at best_len - 1 can be removed because it will be made
 1488|       |         * again later. (This heuristic is not always a win.)
 1489|       |         * It is not necessary to compare scan[2] and match[2] since they
 1490|       |         * are always equal when the other bytes match, given that
 1491|       |         * the hash keys are equal and that HASH_BITS >= 8.
 1492|       |         */
 1493|  1.07M|        scan += 2, match++;
 1494|  1.07M|        Assert(*scan == *match, "match[2]?");
 1495|       |
 1496|       |        /* We check for insufficient lookahead only every 8th comparison;
 1497|       |         * the 256th check will be made at strstart + 258.
 1498|       |         */
 1499|  3.62M|        do {
 1500|  3.62M|        } while (*++scan == *++match && *++scan == *++match &&
  ------------------
  |  Branch (1500:18): [True: 3.28M, False: 339k]
  |  Branch (1500:41): [True: 3.11M, False: 165k]
  ------------------
 1501|  3.11M|                 *++scan == *++match && *++scan == *++match &&
  ------------------
  |  Branch (1501:18): [True: 2.99M, False: 118k]
  |  Branch (1501:41): [True: 2.89M, False: 107k]
  ------------------
 1502|  2.89M|                 *++scan == *++match && *++scan == *++match &&
  ------------------
  |  Branch (1502:18): [True: 2.77M, False: 114k]
  |  Branch (1502:41): [True: 2.68M, False: 87.2k]
  ------------------
 1503|  2.68M|                 *++scan == *++match && *++scan == *++match &&
  ------------------
  |  Branch (1503:18): [True: 2.62M, False: 69.1k]
  |  Branch (1503:41): [True: 2.55M, False: 65.9k]
  ------------------
 1504|  2.55M|                 scan < strend);
  ------------------
  |  Branch (1504:18): [True: 2.54M, False: 10.7k]
  ------------------
 1505|       |
 1506|  1.07M|        Assert(scan <= s->window + (unsigned)(s->window_size - 1),
 1507|  1.07M|               "wild scan");
 1508|       |
 1509|  1.07M|        len = MAX_MATCH - (int)(strend - scan);
  ------------------
  |  |   93|  1.07M|#define MAX_MATCH  258
  ------------------
 1510|  1.07M|        scan = strend - MAX_MATCH;
  ------------------
  |  |   93|  1.07M|#define MAX_MATCH  258
  ------------------
 1511|       |
 1512|  1.07M|#endif /* UNALIGNED_OK */
 1513|       |
 1514|  1.07M|        if (len > best_len) {
  ------------------
  |  Branch (1514:13): [True: 909k, False: 169k]
  ------------------
 1515|   909k|            s->match_start = cur_match;
 1516|   909k|            best_len = len;
 1517|   909k|            if (len >= nice_match) break;
  ------------------
  |  Branch (1517:17): [True: 32.1k, False: 876k]
  ------------------
 1518|       |#ifdef UNALIGNED_OK
 1519|       |            scan_end = *(ushf*)(scan + best_len - 1);
 1520|       |#else
 1521|   876k|            scan_end1  = scan[best_len - 1];
 1522|   876k|            scan_end   = scan[best_len];
 1523|   876k|#endif
 1524|   876k|        }
 1525|  15.5M|    } while ((cur_match = prev[cur_match & wmask]) > limit
  ------------------
  |  Branch (1525:14): [True: 14.1M, False: 1.36M]
  ------------------
 1526|  14.1M|             && --chain_length != 0);
  ------------------
  |  Branch (1526:17): [True: 13.9M, False: 151k]
  ------------------
 1527|       |
 1528|  1.55M|    if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
  ------------------
  |  Branch (1528:9): [True: 1.54M, False: 564]
  ------------------
 1529|    564|    return s->lookahead;
 1530|  1.55M|}
deflate.c:deflate_slow:
 1956|  1.37k|local block_state deflate_slow(deflate_state *s, int flush) {
 1957|  1.37k|    IPos hash_head;          /* head of hash chain */
 1958|  1.37k|    int bflush;              /* set if current block must be flushed */
 1959|       |
 1960|       |    /* Process the input block. */
 1961|  2.57M|    for (;;) {
 1962|       |        /* Make sure that we always have enough lookahead, except
 1963|       |         * at the end of the input file. We need MAX_MATCH bytes
 1964|       |         * for the next match, plus MIN_MATCH bytes to insert the
 1965|       |         * string following the next match.
 1966|       |         */
 1967|  2.57M|        if (s->lookahead < MIN_LOOKAHEAD) {
  ------------------
  |  |  296|  2.57M|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   93|  2.57M|#define MAX_MATCH  258
  |  |  ------------------
  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   92|  2.57M|#define MIN_MATCH  3
  |  |  ------------------
  ------------------
  |  Branch (1967:13): [True: 123k, False: 2.44M]
  ------------------
 1968|   123k|            fill_window(s);
 1969|   123k|            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
  ------------------
  |  |  296|   246k|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   93|   123k|#define MAX_MATCH  258
  |  |  ------------------
  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  ------------------
  |  |  |  |   92|   123k|#define MIN_MATCH  3
  |  |  ------------------
  ------------------
                          if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
  ------------------
  |  |  172|   115k|#define Z_NO_FLUSH      0
  ------------------
  |  Branch (1969:17): [True: 115k, False: 7.19k]
  |  Branch (1969:49): [True: 0, False: 115k]
  ------------------
 1970|      0|                return need_more;
 1971|      0|            }
 1972|   123k|            if (s->lookahead == 0) break; /* flush the current block */
  ------------------
  |  Branch (1972:17): [True: 1.37k, False: 121k]
  ------------------
 1973|   123k|        }
 1974|       |
 1975|       |        /* Insert the string window[strstart .. strstart + 2] in the
 1976|       |         * dictionary, and set hash_head to the head of the hash chain:
 1977|       |         */
 1978|  2.56M|        hash_head = NIL;
  ------------------
  |  |   85|  2.56M|#define NIL 0
  ------------------
 1979|  2.56M|        if (s->lookahead >= MIN_MATCH) {
  ------------------
  |  |   92|  2.56M|#define MIN_MATCH  3
  ------------------
  |  Branch (1979:13): [True: 2.56M, False: 1.47k]
  ------------------
 1980|  2.56M|            INSERT_STRING(s, s->strstart, hash_head);
  ------------------
  |  |  161|  2.56M|   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
  |  |  ------------------
  |  |  |  |  141|  2.56M|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  |  |  ------------------
  |  |  162|  2.56M|    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
  |  |  163|  2.56M|    s->head[s->ins_h] = (Pos)(str))
  ------------------
 1981|  2.56M|        }
 1982|       |
 1983|       |        /* Find the longest match, discarding those <= prev_length.
 1984|       |         */
 1985|  2.56M|        s->prev_length = s->match_length, s->prev_match = s->match_start;
 1986|  2.56M|        s->match_length = MIN_MATCH-1;
  ------------------
  |  |   92|  2.56M|#define MIN_MATCH  3
  ------------------
 1987|       |
 1988|  2.56M|        if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
  ------------------
  |  |   85|  5.13M|#define NIL 0
  ------------------
  |  Branch (1988:13): [True: 1.52M, False: 1.04M]
  |  Branch (1988:33): [True: 1.48M, False: 41.3k]
  ------------------
 1989|  1.48M|            s->strstart - hash_head <= MAX_DIST(s)) {
  ------------------
  |  |  301|  1.48M|#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
  |  |  ------------------
  |  |  |  |  296|  1.48M|#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|  1.48M|#define MAX_MATCH  258
  |  |  |  |  ------------------
  |  |  |  |               #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|  1.48M|#define MIN_MATCH  3
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1989:13): [True: 1.12M, False: 358k]
  ------------------
 1990|       |            /* To simplify the code, we prevent matches with the string
 1991|       |             * of window index 0 (in particular we have to avoid a match
 1992|       |             * of the string with itself at the start of the input file).
 1993|       |             */
 1994|  1.12M|            s->match_length = longest_match (s, hash_head);
 1995|       |            /* longest_match() sets match_start */
 1996|       |
 1997|  1.12M|            if (s->match_length <= 5 && (s->strategy == Z_FILTERED
  ------------------
  |  |  200|  1.90M|#define Z_FILTERED            1
  ------------------
  |  Branch (1997:17): [True: 952k, False: 173k]
  |  Branch (1997:42): [True: 138k, False: 813k]
  ------------------
 1998|   813k|#if TOO_FAR <= 32767
 1999|   813k|                || (s->match_length == MIN_MATCH &&
  ------------------
  |  |   92|  1.62M|#define MIN_MATCH  3
  ------------------
  |  Branch (1999:21): [True: 130k, False: 683k]
  ------------------
 2000|   130k|                    s->strstart - s->match_start > TOO_FAR)
  ------------------
  |  |   89|   130k|#  define TOO_FAR 4096
  ------------------
  |  Branch (2000:21): [True: 4.82k, False: 125k]
  ------------------
 2001|   952k|#endif
 2002|   952k|                )) {
 2003|       |
 2004|       |                /* If prev_match is also MIN_MATCH, match_start is garbage
 2005|       |                 * but we will ignore the current match anyway.
 2006|       |                 */
 2007|   143k|                s->match_length = MIN_MATCH-1;
  ------------------
  |  |   92|   143k|#define MIN_MATCH  3
  ------------------
 2008|   143k|            }
 2009|  1.12M|        }
 2010|       |        /* If there was a match at the previous step and the current
 2011|       |         * match is not better, output the previous match:
 2012|       |         */
 2013|  2.56M|        if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
  ------------------
  |  |   92|  5.13M|#define MIN_MATCH  3
  ------------------
  |  Branch (2013:13): [True: 233k, False: 2.33M]
  |  Branch (2013:44): [True: 218k, False: 15.5k]
  ------------------
 2014|   218k|            uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
  ------------------
  |  |   92|   218k|#define MIN_MATCH  3
  ------------------
 2015|       |            /* Do not insert strings in hash table beyond this. */
 2016|       |
 2017|   218k|            check_match(s, s->strstart - 1, s->prev_match, (int)s->prev_length);
 2018|       |
 2019|   218k|            _tr_tally_dist(s, s->strstart - 1 - s->prev_match,
  ------------------
  |  |  366|   218k|  { uch len = (uch)(length); \
  |  |  367|   218k|    ush dist = (ush)(distance); \
  |  |  368|   218k|    s->sym_buf[s->sym_next++] = (uch)dist; \
  |  |  369|   218k|    s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \
  |  |  370|   218k|    s->sym_buf[s->sym_next++] = len; \
  |  |  371|   218k|    dist--; \
  |  |  372|   218k|    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
  |  |  ------------------
  |  |  |  |   37|   218k|#define LITERALS  256
  |  |  ------------------
  |  |                   s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
  |  |  ------------------
  |  |  |  |   83|   218k|#define Freq fc.freq
  |  |  ------------------
  |  |  373|   218k|    s->dyn_dtree[d_code(dist)].Freq++; \
  |  |  ------------------
  |  |  |  |  321|   218k|   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 166k, False: 51.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   s->dyn_dtree[d_code(dist)].Freq++; \
  |  |  ------------------
  |  |  |  |   83|   218k|#define Freq fc.freq
  |  |  ------------------
  |  |  374|   218k|    flush = (s->sym_next == s->sym_end); \
  |  |  375|   218k|  }
  ------------------
 2020|   218k|                           s->prev_length - MIN_MATCH, bflush);
 2021|       |
 2022|       |            /* Insert in hash table all strings up to the end of the match.
 2023|       |             * strstart - 1 and strstart are already inserted. If there is not
 2024|       |             * enough lookahead, the last two strings are not inserted in
 2025|       |             * the hash table.
 2026|       |             */
 2027|   218k|            s->lookahead -= s->prev_length - 1;
 2028|   218k|            s->prev_length -= 2;
 2029|  4.11M|            do {
 2030|  4.11M|                if (++s->strstart <= max_insert) {
  ------------------
  |  Branch (2030:21): [True: 4.11M, False: 1.24k]
  ------------------
 2031|  4.11M|                    INSERT_STRING(s, s->strstart, hash_head);
  ------------------
  |  |  161|  4.11M|   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
  |  |  ------------------
  |  |  |  |  141|  4.11M|#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
  |  |  ------------------
  |  |  162|  4.11M|    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
  |  |  163|  4.11M|    s->head[s->ins_h] = (Pos)(str))
  ------------------
 2032|  4.11M|                }
 2033|  4.11M|            } while (--s->prev_length != 0);
  ------------------
  |  Branch (2033:22): [True: 3.89M, False: 218k]
  ------------------
 2034|   218k|            s->match_available = 0;
 2035|   218k|            s->match_length = MIN_MATCH-1;
  ------------------
  |  |   92|   218k|#define MIN_MATCH  3
  ------------------
 2036|   218k|            s->strstart++;
 2037|       |
 2038|   218k|            if (bflush) FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1642|    874|#define FLUSH_BLOCK(s, last) { \
  |  | 1643|    874|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1630|    874|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1631|    874|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1631:24): [True: 670, False: 204]
  |  |  |  |  ------------------
  |  |  |  | 1632|    874|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1633|    874|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    204|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1634|    874|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1635|    874|                (last)); \
  |  |  |  | 1636|    874|   s->block_start = s->strstart; \
  |  |  |  | 1637|    874|   flush_pending(s->strm); \
  |  |  |  | 1638|    874|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1639|    874|}
  |  |  ------------------
  |  | 1644|    874|   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
  |  |  ------------------
  |  |  |  Branch (1644:8): [True: 0, False: 874]
  |  |  |  Branch (1644:40): [Folded, False: 0]
  |  |  ------------------
  |  | 1645|    874|}
  ------------------
  |  Branch (2038:17): [True: 874, False: 217k]
  ------------------
 2039|       |
 2040|  2.35M|        } else if (s->match_available) {
  ------------------
  |  Branch (2040:20): [True: 2.13M, False: 219k]
  ------------------
 2041|       |            /* If there was no match at the previous position, output a
 2042|       |             * single literal. If there was a match but the current match
 2043|       |             * is longer, truncate the previous match to a single literal.
 2044|       |             */
 2045|  2.13M|            Tracevv((stderr,"%c", s->window[s->strstart - 1]));
 2046|  2.13M|            _tr_tally_lit(s, s->window[s->strstart - 1], bflush);
  ------------------
  |  |  358|  2.13M|  { uch cc = (c); \
  |  |  359|  2.13M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  360|  2.13M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  361|  2.13M|    s->sym_buf[s->sym_next++] = cc; \
  |  |  362|  2.13M|    s->dyn_ltree[cc].Freq++; \
  |  |  ------------------
  |  |  |  |   83|  2.13M|#define Freq fc.freq
  |  |  ------------------
  |  |  363|  2.13M|    flush = (s->sym_next == s->sym_end); \
  |  |  364|  2.13M|   }
  ------------------
 2047|  2.13M|            if (bflush) {
  ------------------
  |  Branch (2047:17): [True: 5.72k, False: 2.12M]
  ------------------
 2048|  5.72k|                FLUSH_BLOCK_ONLY(s, 0);
  ------------------
  |  | 1630|  5.72k|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  | 1631|  5.72k|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  ------------------
  |  |  |  Branch (1631:24): [True: 4.92k, False: 793]
  |  |  ------------------
  |  | 1632|  5.72k|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  | 1633|  5.72k|                   (charf *)Z_NULL), \
  |  |  ------------------
  |  |  |  |  216|    793|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  ------------------
  |  | 1634|  5.72k|                (ulg)((long)s->strstart - s->block_start), \
  |  | 1635|  5.72k|                (last)); \
  |  | 1636|  5.72k|   s->block_start = s->strstart; \
  |  | 1637|  5.72k|   flush_pending(s->strm); \
  |  | 1638|  5.72k|   Tracev((stderr,"[FLUSH]")); \
  |  | 1639|  5.72k|}
  ------------------
 2049|  5.72k|            }
 2050|  2.13M|            s->strstart++;
 2051|  2.13M|            s->lookahead--;
 2052|  2.13M|            if (s->strm->avail_out == 0) return need_more;
  ------------------
  |  Branch (2052:17): [True: 0, False: 2.13M]
  ------------------
 2053|  2.13M|        } else {
 2054|       |            /* There is no previous match to compare with, wait for
 2055|       |             * the next step to decide.
 2056|       |             */
 2057|   219k|            s->match_available = 1;
 2058|   219k|            s->strstart++;
 2059|   219k|            s->lookahead--;
 2060|   219k|        }
 2061|  2.56M|    }
 2062|  1.37k|    Assert (flush != Z_NO_FLUSH, "no flush?");
 2063|  1.37k|    if (s->match_available) {
  ------------------
  |  Branch (2063:9): [True: 730, False: 642]
  ------------------
 2064|    730|        Tracevv((stderr,"%c", s->window[s->strstart - 1]));
 2065|    730|        _tr_tally_lit(s, s->window[s->strstart - 1], bflush);
  ------------------
  |  |  358|    730|  { uch cc = (c); \
  |  |  359|    730|    s->sym_buf[s->sym_next++] = 0; \
  |  |  360|    730|    s->sym_buf[s->sym_next++] = 0; \
  |  |  361|    730|    s->sym_buf[s->sym_next++] = cc; \
  |  |  362|    730|    s->dyn_ltree[cc].Freq++; \
  |  |  ------------------
  |  |  |  |   83|    730|#define Freq fc.freq
  |  |  ------------------
  |  |  363|    730|    flush = (s->sym_next == s->sym_end); \
  |  |  364|    730|   }
  ------------------
 2066|    730|        s->match_available = 0;
 2067|    730|    }
 2068|  1.37k|    s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
  ------------------
  |  |   92|  1.37k|#define MIN_MATCH  3
  ------------------
                  s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
  ------------------
  |  |   92|  1.37k|#define MIN_MATCH  3
  ------------------
  |  Branch (2068:17): [True: 1, False: 1.37k]
  ------------------
 2069|  1.37k|    if (flush == Z_FINISH) {
  ------------------
  |  |  176|  1.37k|#define Z_FINISH        4
  ------------------
  |  Branch (2069:9): [True: 1.37k, False: 0]
  ------------------
 2070|  1.37k|        FLUSH_BLOCK(s, 1);
  ------------------
  |  | 1642|  1.37k|#define FLUSH_BLOCK(s, last) { \
  |  | 1643|  1.37k|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1630|  1.37k|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1631|  1.37k|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1631:24): [True: 1.16k, False: 211]
  |  |  |  |  ------------------
  |  |  |  | 1632|  1.37k|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1633|  1.37k|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    211|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1634|  1.37k|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1635|  1.37k|                (last)); \
  |  |  |  | 1636|  1.37k|   s->block_start = s->strstart; \
  |  |  |  | 1637|  1.37k|   flush_pending(s->strm); \
  |  |  |  | 1638|  1.37k|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1639|  1.37k|}
  |  |  ------------------
  |  | 1644|  1.37k|   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
  |  |  ------------------
  |  |  |  Branch (1644:8): [True: 0, False: 1.37k]
  |  |  |  Branch (1644:40): [True: 0, Folded]
  |  |  ------------------
  |  | 1645|  1.37k|}
  ------------------
 2071|  1.37k|        return finish_done;
 2072|  1.37k|    }
 2073|      0|    if (s->sym_next)
  ------------------
  |  Branch (2073:9): [True: 0, False: 0]
  ------------------
 2074|      0|        FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1642|      0|#define FLUSH_BLOCK(s, last) { \
  |  | 1643|      0|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1630|      0|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1631|      0|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1631:24): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1632|      0|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1633|      0|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1634|      0|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1635|      0|                (last)); \
  |  |  |  | 1636|      0|   s->block_start = s->strstart; \
  |  |  |  | 1637|      0|   flush_pending(s->strm); \
  |  |  |  | 1638|      0|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1639|      0|}
  |  |  ------------------
  |  | 1644|      0|   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
  |  |  ------------------
  |  |  |  Branch (1644:8): [True: 0, False: 0]
  |  |  |  Branch (1644:40): [Folded, False: 0]
  |  |  ------------------
  |  | 1645|      0|}
  ------------------
 2075|      0|    return block_done;
 2076|      0|}
deflate.c:slide_hash:
  187|  18.4k|local void slide_hash(deflate_state *s) {
  188|  18.4k|    unsigned n, m;
  189|  18.4k|    Posf *p;
  190|  18.4k|    uInt wsize = s->w_size;
  191|       |
  192|  18.4k|    n = s->hash_size;
  193|  18.4k|    p = &s->head[n];
  194|   298M|    do {
  195|   298M|        m = *--p;
  196|   298M|        *p = (Pos)(m >= wsize ? m - wsize : NIL);
  ------------------
  |  |   85|   296M|#define NIL 0
  ------------------
  |  Branch (196:20): [True: 1.40M, False: 296M]
  ------------------
  197|   298M|    } while (--n);
  ------------------
  |  Branch (197:14): [True: 298M, False: 18.4k]
  ------------------
  198|  18.4k|#ifndef FASTEST
  199|  18.4k|    n = wsize;
  200|  18.4k|    p = &s->prev[n];
  201|  12.9M|    do {
  202|  12.9M|        m = *--p;
  203|  12.9M|        *p = (Pos)(m >= wsize ? m - wsize : NIL);
  ------------------
  |  |   85|  9.90M|#define NIL 0
  ------------------
  |  Branch (203:20): [True: 3.00M, False: 9.90M]
  ------------------
  204|       |        /* If n is not on any hash chain, prev[n] is garbage but
  205|       |         * its value will never be used.
  206|       |         */
  207|  12.9M|    } while (--n);
  ------------------
  |  Branch (207:14): [True: 12.8M, False: 18.4k]
  ------------------
  208|  18.4k|#endif
  209|  18.4k|    s->slid = 1;
  210|  18.4k|}
deflate.c:flush_pending:
  950|  40.4k|local void flush_pending(z_streamp strm) {
  951|  40.4k|    unsigned len;
  952|  40.4k|    deflate_state *s = strm->state;
  953|       |
  954|  40.4k|    _tr_flush_bits(s);
  955|  40.4k|    len = s->pending > strm->avail_out ? strm->avail_out :
  ------------------
  |  Branch (955:11): [True: 0, False: 40.4k]
  ------------------
  956|  40.4k|                                         (unsigned)s->pending;
  957|  40.4k|    if (len == 0) return;
  ------------------
  |  Branch (957:9): [True: 0, False: 40.4k]
  ------------------
  958|       |
  959|  40.4k|    zmemcpy(strm->next_out, s->pending_out, len);
  ------------------
  |  |  216|  40.4k|#    define zmemcpy memcpy
  ------------------
  960|  40.4k|    strm->next_out  += len;
  961|  40.4k|    s->pending_out  += len;
  962|  40.4k|    strm->total_out += len;
  963|  40.4k|    strm->avail_out -= len;
  964|  40.4k|    s->pending      -= len;
  965|  40.4k|    if (s->pending == 0) {
  ------------------
  |  Branch (965:9): [True: 40.4k, False: 0]
  ------------------
  966|  40.4k|        s->pending_out = s->pending_buf;
  967|  40.4k|    }
  968|  40.4k|}
deflate.c:putShortMSB:
  939|  20.3k|local void putShortMSB(deflate_state *s, uInt b) {
  940|  20.3k|    put_byte(s, (Byte)(b >> 8));
  ------------------
  |  |  293|  20.3k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
  941|  20.3k|    put_byte(s, (Byte)(b & 0xff));
  ------------------
  |  |  293|  20.3k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
  942|  20.3k|}
deflate.c:deflate_rle:
 2084|    911|local block_state deflate_rle(deflate_state *s, int flush) {
 2085|    911|    int bflush;             /* set if current block must be flushed */
 2086|    911|    uInt prev;              /* byte at distance one to match */
 2087|    911|    Bytef *scan, *strend;   /* scan goes up to strend for length of run */
 2088|       |
 2089|  2.16M|    for (;;) {
 2090|       |        /* Make sure that we always have enough lookahead, except
 2091|       |         * at the end of the input file. We need MAX_MATCH bytes
 2092|       |         * for the longest run, plus one for the unrolled loop.
 2093|       |         */
 2094|  2.16M|        if (s->lookahead <= MAX_MATCH) {
  ------------------
  |  |   93|  2.16M|#define MAX_MATCH  258
  ------------------
  |  Branch (2094:13): [True: 90.3k, False: 2.07M]
  ------------------
 2095|  90.3k|            fill_window(s);
 2096|  90.3k|            if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) {
  ------------------
  |  |   93|   180k|#define MAX_MATCH  258
  ------------------
                          if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) {
  ------------------
  |  |  172|  87.1k|#define Z_NO_FLUSH      0
  ------------------
  |  Branch (2096:17): [True: 87.1k, False: 3.24k]
  |  Branch (2096:46): [True: 0, False: 87.1k]
  ------------------
 2097|      0|                return need_more;
 2098|      0|            }
 2099|  90.3k|            if (s->lookahead == 0) break; /* flush the current block */
  ------------------
  |  Branch (2099:17): [True: 911, False: 89.4k]
  ------------------
 2100|  90.3k|        }
 2101|       |
 2102|       |        /* See how many times the previous byte repeats */
 2103|  2.16M|        s->match_length = 0;
 2104|  2.16M|        if (s->lookahead >= MIN_MATCH && s->strstart > 0) {
  ------------------
  |  |   92|  4.33M|#define MIN_MATCH  3
  ------------------
  |  Branch (2104:13): [True: 2.16M, False: 1.28k]
  |  Branch (2104:42): [True: 2.16M, False: 0]
  ------------------
 2105|  2.16M|            scan = s->window + s->strstart - 1;
 2106|  2.16M|            prev = *scan;
 2107|  2.16M|            if (prev == *++scan && prev == *++scan && prev == *++scan) {
  ------------------
  |  Branch (2107:17): [True: 165k, False: 1.99M]
  |  Branch (2107:36): [True: 73.6k, False: 91.8k]
  |  Branch (2107:55): [True: 54.4k, False: 19.2k]
  ------------------
 2108|  54.4k|                strend = s->window + s->strstart + MAX_MATCH;
  ------------------
  |  |   93|  54.4k|#define MAX_MATCH  258
  ------------------
 2109|   236k|                do {
 2110|   236k|                } while (prev == *++scan && prev == *++scan &&
  ------------------
  |  Branch (2110:26): [True: 217k, False: 19.4k]
  |  Branch (2110:45): [True: 207k, False: 9.50k]
  ------------------
 2111|   207k|                         prev == *++scan && prev == *++scan &&
  ------------------
  |  Branch (2111:26): [True: 203k, False: 4.76k]
  |  Branch (2111:45): [True: 199k, False: 3.67k]
  ------------------
 2112|   199k|                         prev == *++scan && prev == *++scan &&
  ------------------
  |  Branch (2112:26): [True: 196k, False: 3.06k]
  |  Branch (2112:45): [True: 193k, False: 3.06k]
  ------------------
 2113|   193k|                         prev == *++scan && prev == *++scan &&
  ------------------
  |  Branch (2113:26): [True: 191k, False: 2.17k]
  |  Branch (2113:45): [True: 186k, False: 4.64k]
  ------------------
 2114|   186k|                         scan < strend);
  ------------------
  |  Branch (2114:26): [True: 182k, False: 4.15k]
  ------------------
 2115|  54.4k|                s->match_length = MAX_MATCH - (uInt)(strend - scan);
  ------------------
  |  |   93|  54.4k|#define MAX_MATCH  258
  ------------------
 2116|  54.4k|                if (s->match_length > s->lookahead)
  ------------------
  |  Branch (2116:21): [True: 38, False: 54.4k]
  ------------------
 2117|     38|                    s->match_length = s->lookahead;
 2118|  54.4k|            }
 2119|  2.16M|            Assert(scan <= s->window + (uInt)(s->window_size - 1),
 2120|  2.16M|                   "wild scan");
 2121|  2.16M|        }
 2122|       |
 2123|       |        /* Emit match if have run of MIN_MATCH or longer, else emit literal */
 2124|  2.16M|        if (s->match_length >= MIN_MATCH) {
  ------------------
  |  |   92|  2.16M|#define MIN_MATCH  3
  ------------------
  |  Branch (2124:13): [True: 54.4k, False: 2.11M]
  ------------------
 2125|  54.4k|            check_match(s, s->strstart, s->strstart - 1, (int)s->match_length);
 2126|       |
 2127|  54.4k|            _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush);
  ------------------
  |  |  366|  54.4k|  { uch len = (uch)(length); \
  |  |  367|  54.4k|    ush dist = (ush)(distance); \
  |  |  368|  54.4k|    s->sym_buf[s->sym_next++] = (uch)dist; \
  |  |  369|  54.4k|    s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \
  |  |  370|  54.4k|    s->sym_buf[s->sym_next++] = len; \
  |  |  371|  54.4k|    dist--; \
  |  |  372|  54.4k|    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
  |  |  ------------------
  |  |  |  |   37|  54.4k|#define LITERALS  256
  |  |  ------------------
  |  |                   s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
  |  |  ------------------
  |  |  |  |   83|  54.4k|#define Freq fc.freq
  |  |  ------------------
  |  |  373|  54.4k|    s->dyn_dtree[d_code(dist)].Freq++; \
  |  |  ------------------
  |  |  |  |  321|  54.4k|   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 54.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   s->dyn_dtree[d_code(dist)].Freq++; \
  |  |  ------------------
  |  |  |  |   83|  54.4k|#define Freq fc.freq
  |  |  ------------------
  |  |  374|  54.4k|    flush = (s->sym_next == s->sym_end); \
  |  |  375|  54.4k|  }
  ------------------
 2128|       |
 2129|  54.4k|            s->lookahead -= s->match_length;
 2130|  54.4k|            s->strstart += s->match_length;
 2131|  54.4k|            s->match_length = 0;
 2132|  2.11M|        } else {
 2133|       |            /* No match, output a literal byte */
 2134|  2.11M|            Tracevv((stderr,"%c", s->window[s->strstart]));
 2135|  2.11M|            _tr_tally_lit(s, s->window[s->strstart], bflush);
  ------------------
  |  |  358|  2.11M|  { uch cc = (c); \
  |  |  359|  2.11M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  360|  2.11M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  361|  2.11M|    s->sym_buf[s->sym_next++] = cc; \
  |  |  362|  2.11M|    s->dyn_ltree[cc].Freq++; \
  |  |  ------------------
  |  |  |  |   83|  2.11M|#define Freq fc.freq
  |  |  ------------------
  |  |  363|  2.11M|    flush = (s->sym_next == s->sym_end); \
  |  |  364|  2.11M|   }
  ------------------
 2136|  2.11M|            s->lookahead--;
 2137|  2.11M|            s->strstart++;
 2138|  2.11M|        }
 2139|  2.16M|        if (bflush) FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1642|  4.26k|#define FLUSH_BLOCK(s, last) { \
  |  | 1643|  4.26k|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1630|  4.26k|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1631|  4.26k|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1631:24): [True: 3.69k, False: 572]
  |  |  |  |  ------------------
  |  |  |  | 1632|  4.26k|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1633|  4.26k|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    572|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1634|  4.26k|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1635|  4.26k|                (last)); \
  |  |  |  | 1636|  4.26k|   s->block_start = s->strstart; \
  |  |  |  | 1637|  4.26k|   flush_pending(s->strm); \
  |  |  |  | 1638|  4.26k|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1639|  4.26k|}
  |  |  ------------------
  |  | 1644|  4.26k|   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
  |  |  ------------------
  |  |  |  Branch (1644:8): [True: 0, False: 4.26k]
  |  |  |  Branch (1644:40): [Folded, False: 0]
  |  |  ------------------
  |  | 1645|  4.26k|}
  ------------------
  |  Branch (2139:13): [True: 4.26k, False: 2.16M]
  ------------------
 2140|  2.16M|    }
 2141|    911|    s->insert = 0;
 2142|    911|    if (flush == Z_FINISH) {
  ------------------
  |  |  176|    911|#define Z_FINISH        4
  ------------------
  |  Branch (2142:9): [True: 911, False: 0]
  ------------------
 2143|    911|        FLUSH_BLOCK(s, 1);
  ------------------
  |  | 1642|    911|#define FLUSH_BLOCK(s, last) { \
  |  | 1643|    911|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1630|    911|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1631|    911|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1631:24): [True: 824, False: 87]
  |  |  |  |  ------------------
  |  |  |  | 1632|    911|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1633|    911|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|     87|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1634|    911|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1635|    911|                (last)); \
  |  |  |  | 1636|    911|   s->block_start = s->strstart; \
  |  |  |  | 1637|    911|   flush_pending(s->strm); \
  |  |  |  | 1638|    911|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1639|    911|}
  |  |  ------------------
  |  | 1644|    911|   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
  |  |  ------------------
  |  |  |  Branch (1644:8): [True: 0, False: 911]
  |  |  |  Branch (1644:40): [True: 0, Folded]
  |  |  ------------------
  |  | 1645|    911|}
  ------------------
 2144|    911|        return finish_done;
 2145|    911|    }
 2146|      0|    if (s->sym_next)
  ------------------
  |  Branch (2146:9): [True: 0, False: 0]
  ------------------
 2147|      0|        FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1642|      0|#define FLUSH_BLOCK(s, last) { \
  |  | 1643|      0|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1630|      0|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1631|      0|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1631:24): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1632|      0|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1633|      0|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1634|      0|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1635|      0|                (last)); \
  |  |  |  | 1636|      0|   s->block_start = s->strstart; \
  |  |  |  | 1637|      0|   flush_pending(s->strm); \
  |  |  |  | 1638|      0|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1639|      0|}
  |  |  ------------------
  |  | 1644|      0|   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
  |  |  ------------------
  |  |  |  Branch (1644:8): [True: 0, False: 0]
  |  |  |  Branch (1644:40): [Folded, False: 0]
  |  |  ------------------
  |  | 1645|      0|}
  ------------------
 2148|      0|    return block_done;
 2149|      0|}
deflate.c:deflate_huff:
 2155|  1.07k|local block_state deflate_huff(deflate_state *s, int flush) {
 2156|  1.07k|    int bflush;             /* set if current block must be flushed */
 2157|       |
 2158|  5.63M|    for (;;) {
 2159|       |        /* Make sure that we have a literal to write. */
 2160|  5.63M|        if (s->lookahead == 0) {
  ------------------
  |  Branch (2160:13): [True: 7.33k, False: 5.63M]
  ------------------
 2161|  7.33k|            fill_window(s);
 2162|  7.33k|            if (s->lookahead == 0) {
  ------------------
  |  Branch (2162:17): [True: 1.07k, False: 6.26k]
  ------------------
 2163|  1.07k|                if (flush == Z_NO_FLUSH)
  ------------------
  |  |  172|  1.07k|#define Z_NO_FLUSH      0
  ------------------
  |  Branch (2163:21): [True: 0, False: 1.07k]
  ------------------
 2164|      0|                    return need_more;
 2165|  1.07k|                break;      /* flush the current block */
 2166|  1.07k|            }
 2167|  7.33k|        }
 2168|       |
 2169|       |        /* Output a literal byte */
 2170|  5.63M|        s->match_length = 0;
 2171|  5.63M|        Tracevv((stderr,"%c", s->window[s->strstart]));
 2172|  5.63M|        _tr_tally_lit(s, s->window[s->strstart], bflush);
  ------------------
  |  |  358|  5.63M|  { uch cc = (c); \
  |  |  359|  5.63M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  360|  5.63M|    s->sym_buf[s->sym_next++] = 0; \
  |  |  361|  5.63M|    s->sym_buf[s->sym_next++] = cc; \
  |  |  362|  5.63M|    s->dyn_ltree[cc].Freq++; \
  |  |  ------------------
  |  |  |  |   83|  5.63M|#define Freq fc.freq
  |  |  ------------------
  |  |  363|  5.63M|    flush = (s->sym_next == s->sym_end); \
  |  |  364|  5.63M|   }
  ------------------
 2173|  5.63M|        s->lookahead--;
 2174|  5.63M|        s->strstart++;
 2175|  5.63M|        if (bflush) FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1642|  15.0k|#define FLUSH_BLOCK(s, last) { \
  |  | 1643|  15.0k|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1630|  15.0k|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1631|  15.0k|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1631:24): [True: 14.1k, False: 926]
  |  |  |  |  ------------------
  |  |  |  | 1632|  15.0k|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1633|  15.0k|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    926|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1634|  15.0k|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1635|  15.0k|                (last)); \
  |  |  |  | 1636|  15.0k|   s->block_start = s->strstart; \
  |  |  |  | 1637|  15.0k|   flush_pending(s->strm); \
  |  |  |  | 1638|  15.0k|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1639|  15.0k|}
  |  |  ------------------
  |  | 1644|  15.0k|   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
  |  |  ------------------
  |  |  |  Branch (1644:8): [True: 0, False: 15.0k]
  |  |  |  Branch (1644:40): [Folded, False: 0]
  |  |  ------------------
  |  | 1645|  15.0k|}
  ------------------
  |  Branch (2175:13): [True: 15.0k, False: 5.62M]
  ------------------
 2176|  5.63M|    }
 2177|  1.07k|    s->insert = 0;
 2178|  1.07k|    if (flush == Z_FINISH) {
  ------------------
  |  |  176|  1.07k|#define Z_FINISH        4
  ------------------
  |  Branch (2178:9): [True: 1.07k, False: 0]
  ------------------
 2179|  1.07k|        FLUSH_BLOCK(s, 1);
  ------------------
  |  | 1642|  1.07k|#define FLUSH_BLOCK(s, last) { \
  |  | 1643|  1.07k|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1630|  1.07k|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1631|  1.07k|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1631:24): [True: 958, False: 116]
  |  |  |  |  ------------------
  |  |  |  | 1632|  1.07k|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1633|  1.07k|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|    116|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1634|  1.07k|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1635|  1.07k|                (last)); \
  |  |  |  | 1636|  1.07k|   s->block_start = s->strstart; \
  |  |  |  | 1637|  1.07k|   flush_pending(s->strm); \
  |  |  |  | 1638|  1.07k|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1639|  1.07k|}
  |  |  ------------------
  |  | 1644|  1.07k|   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
  |  |  ------------------
  |  |  |  Branch (1644:8): [True: 0, False: 1.07k]
  |  |  |  Branch (1644:40): [True: 0, Folded]
  |  |  ------------------
  |  | 1645|  1.07k|}
  ------------------
 2180|  1.07k|        return finish_done;
 2181|  1.07k|    }
 2182|      0|    if (s->sym_next)
  ------------------
  |  Branch (2182:9): [True: 0, False: 0]
  ------------------
 2183|      0|        FLUSH_BLOCK(s, 0);
  ------------------
  |  | 1642|      0|#define FLUSH_BLOCK(s, last) { \
  |  | 1643|      0|   FLUSH_BLOCK_ONLY(s, last); \
  |  |  ------------------
  |  |  |  | 1630|      0|#define FLUSH_BLOCK_ONLY(s, last) { \
  |  |  |  | 1631|      0|   _tr_flush_block(s, (s->block_start >= 0L ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1631:24): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1632|      0|                   (charf *)&s->window[(unsigned)s->block_start] : \
  |  |  |  | 1633|      0|                   (charf *)Z_NULL), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  |  |  |  |  ------------------
  |  |  |  | 1634|      0|                (ulg)((long)s->strstart - s->block_start), \
  |  |  |  | 1635|      0|                (last)); \
  |  |  |  | 1636|      0|   s->block_start = s->strstart; \
  |  |  |  | 1637|      0|   flush_pending(s->strm); \
  |  |  |  | 1638|      0|   Tracev((stderr,"[FLUSH]")); \
  |  |  |  | 1639|      0|}
  |  |  ------------------
  |  | 1644|      0|   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
  |  |  ------------------
  |  |  |  Branch (1644:8): [True: 0, False: 0]
  |  |  |  Branch (1644:40): [Folded, False: 0]
  |  |  ------------------
  |  | 1645|      0|}
  ------------------
 2184|      0|    return block_done;
 2185|      0|}

inflate_fast:
   50|  21.6k|void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) {
   51|  21.6k|    struct inflate_state FAR *state;
   52|  21.6k|    z_const unsigned char FAR *in;      /* local strm->next_in */
   53|  21.6k|    z_const unsigned char FAR *last;    /* have enough input while in < last */
   54|  21.6k|    unsigned char FAR *out;     /* local strm->next_out */
   55|  21.6k|    unsigned char FAR *beg;     /* inflate()'s initial strm->next_out */
   56|  21.6k|    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|  21.6k|    unsigned wsize;             /* window size or zero if not using window */
   61|  21.6k|    unsigned whave;             /* valid bytes in the window */
   62|  21.6k|    unsigned wnext;             /* window write index */
   63|  21.6k|    unsigned char FAR *window;  /* allocated sliding window, if wsize != 0 */
   64|  21.6k|    unsigned long hold;         /* local strm->hold */
   65|  21.6k|    unsigned bits;              /* local strm->bits */
   66|  21.6k|    code const FAR *lcode;      /* local strm->lencode */
   67|  21.6k|    code const FAR *dcode;      /* local strm->distcode */
   68|  21.6k|    unsigned lmask;             /* mask for first level of length codes */
   69|  21.6k|    unsigned dmask;             /* mask for first level of distance codes */
   70|  21.6k|    code const *here;           /* retrieved table entry */
   71|  21.6k|    unsigned op;                /* code bits, operation, extra bits, or */
   72|       |                                /*  window position, window bytes to copy */
   73|  21.6k|    unsigned len;               /* match length, unused bytes */
   74|  21.6k|    unsigned dist;              /* match distance */
   75|  21.6k|    unsigned char FAR *from;    /* where to copy match from */
   76|       |
   77|       |    /* copy state to local variables */
   78|  21.6k|    state = (struct inflate_state FAR *)strm->state;
   79|  21.6k|    in = strm->next_in;
   80|  21.6k|    last = in + (strm->avail_in - 5);
   81|  21.6k|    out = strm->next_out;
   82|  21.6k|    beg = out - (start - strm->avail_out);
   83|  21.6k|    end = out + (strm->avail_out - 257);
   84|       |#ifdef INFLATE_STRICT
   85|       |    dmax = state->dmax;
   86|       |#endif
   87|  21.6k|    wsize = state->wsize;
   88|  21.6k|    whave = state->whave;
   89|  21.6k|    wnext = state->wnext;
   90|  21.6k|    window = state->window;
   91|  21.6k|    hold = state->hold;
   92|  21.6k|    bits = state->bits;
   93|  21.6k|    lcode = state->lencode;
   94|  21.6k|    dcode = state->distcode;
   95|  21.6k|    lmask = (1U << state->lenbits) - 1;
   96|  21.6k|    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.73M|    do {
  101|  9.73M|        if (bits < 15) {
  ------------------
  |  Branch (101:13): [True: 3.41M, False: 6.32M]
  ------------------
  102|  3.41M|            hold += (unsigned long)(*in++) << bits;
  103|  3.41M|            bits += 8;
  104|  3.41M|            hold += (unsigned long)(*in++) << bits;
  105|  3.41M|            bits += 8;
  106|  3.41M|        }
  107|  9.73M|        here = lcode + (hold & lmask);
  108|  9.89M|      dolen:
  109|  9.89M|        op = (unsigned)(here->bits);
  110|  9.89M|        hold >>= op;
  111|  9.89M|        bits -= op;
  112|  9.89M|        op = (unsigned)(here->op);
  113|  9.89M|        if (op == 0) {                          /* literal */
  ------------------
  |  Branch (113:13): [True: 9.31M, False: 582k]
  ------------------
  114|  9.31M|            Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ?
  115|  9.31M|                    "inflate:         literal '%c'\n" :
  116|  9.31M|                    "inflate:         literal 0x%02x\n", here->val));
  117|  9.31M|            *out++ = (unsigned char)(here->val);
  118|  9.31M|        }
  119|   582k|        else if (op & 16) {                     /* length base */
  ------------------
  |  Branch (119:18): [True: 404k, False: 178k]
  ------------------
  120|   404k|            len = (unsigned)(here->val);
  121|   404k|            op &= 15;                           /* number of extra bits */
  122|   404k|            if (op) {
  ------------------
  |  Branch (122:17): [True: 83.1k, False: 321k]
  ------------------
  123|  83.1k|                if (bits < op) {
  ------------------
  |  Branch (123:21): [True: 323, False: 82.8k]
  ------------------
  124|    323|                    hold += (unsigned long)(*in++) << bits;
  125|    323|                    bits += 8;
  126|    323|                }
  127|  83.1k|                len += (unsigned)hold & ((1U << op) - 1);
  128|  83.1k|                hold >>= op;
  129|  83.1k|                bits -= op;
  130|  83.1k|            }
  131|   404k|            Tracevv((stderr, "inflate:         length %u\n", len));
  132|   404k|            if (bits < 15) {
  ------------------
  |  Branch (132:17): [True: 157k, False: 247k]
  ------------------
  133|   157k|                hold += (unsigned long)(*in++) << bits;
  134|   157k|                bits += 8;
  135|   157k|                hold += (unsigned long)(*in++) << bits;
  136|   157k|                bits += 8;
  137|   157k|            }
  138|   404k|            here = dcode + (hold & dmask);
  139|   409k|          dodist:
  140|   409k|            op = (unsigned)(here->bits);
  141|   409k|            hold >>= op;
  142|   409k|            bits -= op;
  143|   409k|            op = (unsigned)(here->op);
  144|   409k|            if (op & 16) {                      /* distance base */
  ------------------
  |  Branch (144:17): [True: 404k, False: 5.41k]
  ------------------
  145|   404k|                dist = (unsigned)(here->val);
  146|   404k|                op &= 15;                       /* number of extra bits */
  147|   404k|                if (bits < op) {
  ------------------
  |  Branch (147:21): [True: 1.42k, False: 402k]
  ------------------
  148|  1.42k|                    hold += (unsigned long)(*in++) << bits;
  149|  1.42k|                    bits += 8;
  150|  1.42k|                    if (bits < op) {
  ------------------
  |  Branch (150:25): [True: 10, False: 1.41k]
  ------------------
  151|     10|                        hold += (unsigned long)(*in++) << bits;
  152|     10|                        bits += 8;
  153|     10|                    }
  154|  1.42k|                }
  155|   404k|                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|   404k|                hold >>= op;
  165|   404k|                bits -= op;
  166|   404k|                Tracevv((stderr, "inflate:         distance %u\n", dist));
  167|   404k|                op = (unsigned)(out - beg);     /* max distance in output */
  168|   404k|                if (dist > op) {                /* see if copy from window */
  ------------------
  |  Branch (168:21): [True: 4.25k, False: 400k]
  ------------------
  169|  4.25k|                    op = dist - op;             /* distance back in window */
  170|  4.25k|                    if (op > whave) {
  ------------------
  |  Branch (170:25): [True: 0, False: 4.25k]
  ------------------
  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|  4.25k|                    from = window;
  198|  4.25k|                    if (wnext == 0) {           /* very common case */
  ------------------
  |  Branch (198:25): [True: 0, False: 4.25k]
  ------------------
  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|  4.25k|                    else if (wnext < op) {      /* wrap around window */
  ------------------
  |  Branch (208:30): [True: 0, False: 4.25k]
  ------------------
  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|  4.25k|                    else {                      /* contiguous in window */
  228|  4.25k|                        from += wnext - op;
  229|  4.25k|                        if (op < len) {         /* some from window */
  ------------------
  |  Branch (229:29): [True: 319, False: 3.93k]
  ------------------
  230|    319|                            len -= op;
  231|  8.10k|                            do {
  232|  8.10k|                                *out++ = *from++;
  233|  8.10k|                            } while (--op);
  ------------------
  |  Branch (233:38): [True: 7.78k, False: 319]
  ------------------
  234|    319|                            from = out - dist;  /* rest from output */
  235|    319|                        }
  236|  4.25k|                    }
  237|  56.0k|                    while (len > 2) {
  ------------------
  |  Branch (237:28): [True: 51.7k, False: 4.25k]
  ------------------
  238|  51.7k|                        *out++ = *from++;
  239|  51.7k|                        *out++ = *from++;
  240|  51.7k|                        *out++ = *from++;
  241|  51.7k|                        len -= 3;
  242|  51.7k|                    }
  243|  4.25k|                    if (len) {
  ------------------
  |  Branch (243:25): [True: 1.86k, False: 2.38k]
  ------------------
  244|  1.86k|                        *out++ = *from++;
  245|  1.86k|                        if (len > 1)
  ------------------
  |  Branch (245:29): [True: 1.00k, False: 862]
  ------------------
  246|  1.00k|                            *out++ = *from++;
  247|  1.86k|                    }
  248|  4.25k|                }
  249|   400k|                else {
  250|   400k|                    from = out - dist;          /* copy direct from output */
  251|  2.81M|                    do {                        /* minimum length is three */
  252|  2.81M|                        *out++ = *from++;
  253|  2.81M|                        *out++ = *from++;
  254|  2.81M|                        *out++ = *from++;
  255|  2.81M|                        len -= 3;
  256|  2.81M|                    } while (len > 2);
  ------------------
  |  Branch (256:30): [True: 2.41M, False: 400k]
  ------------------
  257|   400k|                    if (len) {
  ------------------
  |  Branch (257:25): [True: 183k, False: 216k]
  ------------------
  258|   183k|                        *out++ = *from++;
  259|   183k|                        if (len > 1)
  ------------------
  |  Branch (259:29): [True: 78.5k, False: 105k]
  ------------------
  260|  78.5k|                            *out++ = *from++;
  261|   183k|                    }
  262|   400k|                }
  263|   404k|            }
  264|  5.41k|            else if ((op & 64) == 0) {          /* 2nd level distance code */
  ------------------
  |  Branch (264:22): [True: 5.41k, False: 0]
  ------------------
  265|  5.41k|                here = dcode + here->val + (hold & ((1U << op) - 1));
  266|  5.41k|                goto dodist;
  267|  5.41k|            }
  268|      0|            else {
  269|      0|                strm->msg = (z_const char *)"invalid distance code";
  270|      0|                state->mode = BAD;
  271|      0|                break;
  272|      0|            }
  273|   409k|        }
  274|   178k|        else if ((op & 64) == 0) {              /* 2nd level length code */
  ------------------
  |  Branch (274:18): [True: 158k, False: 19.7k]
  ------------------
  275|   158k|            here = lcode + here->val + (hold & ((1U << op) - 1));
  276|   158k|            goto dolen;
  277|   158k|        }
  278|  19.7k|        else if (op & 32) {                     /* end-of-block */
  ------------------
  |  Branch (278:18): [True: 19.7k, False: 0]
  ------------------
  279|  19.7k|            Tracevv((stderr, "inflate:         end of block\n"));
  280|  19.7k|            state->mode = TYPE;
  281|  19.7k|            break;
  282|  19.7k|        }
  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.89M|    } while (in < last && out < end);
  ------------------
  |  Branch (288:14): [True: 9.71M, False: 0]
  |  Branch (288:27): [True: 9.71M, False: 1.90k]
  ------------------
  289|       |
  290|       |    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
  291|  21.6k|    len = bits >> 3;
  292|  21.6k|    in -= len;
  293|  21.6k|    bits -= len << 3;
  294|  21.6k|    hold &= (1U << bits) - 1;
  295|       |
  296|       |    /* update state and return */
  297|  21.6k|    strm->next_in = in;
  298|  21.6k|    strm->next_out = out;
  299|  21.6k|    strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
  ------------------
  |  Branch (299:33): [True: 21.6k, False: 0]
  ------------------
  300|  21.6k|    strm->avail_out = (unsigned)(out < end ?
  ------------------
  |  Branch (300:34): [True: 19.7k, False: 1.90k]
  ------------------
  301|  19.7k|                                 257 + (end - out) : 257 - (out - end));
  302|  21.6k|    state->hold = hold;
  303|  21.6k|    state->bits = bits;
  304|  21.6k|    return;
  305|  21.6k|}

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

inflate_table:
   48|  49.3k|                                unsigned FAR *bits, unsigned short FAR *work) {
   49|  49.3k|    unsigned len;               /* a code's length in bits */
   50|  49.3k|    unsigned sym;               /* index of code symbols */
   51|  49.3k|    unsigned min, max;          /* minimum and maximum code lengths */
   52|  49.3k|    unsigned root;              /* number of index bits for root table */
   53|  49.3k|    unsigned curr;              /* number of index bits for current table */
   54|  49.3k|    unsigned drop;              /* code bits to drop for sub-table */
   55|  49.3k|    int left;                   /* number of prefix codes available */
   56|  49.3k|    unsigned used;              /* code entries in table used */
   57|  49.3k|    unsigned huff;              /* Huffman code */
   58|  49.3k|    unsigned incr;              /* for incrementing code, index */
   59|  49.3k|    unsigned fill;              /* index for replicating entries */
   60|  49.3k|    unsigned low;               /* low bits for current root entry */
   61|  49.3k|    unsigned mask;              /* mask for low root bits */
   62|  49.3k|    code here;                  /* table entry for duplication */
   63|  49.3k|    code FAR *next;             /* next available space in table */
   64|  49.3k|    const unsigned short FAR *base = NULL;  /* base value table to use */
   65|  49.3k|    const unsigned short FAR *extra = NULL; /* extra bits table to use */
   66|  49.3k|    unsigned match = 0;         /* use base and extra for symbol >= match */
   67|  49.3k|    unsigned short count[MAXBITS+1];    /* number of codes of each length */
   68|  49.3k|    unsigned short offs[MAXBITS+1];     /* offsets in table for each length */
   69|  49.3k|    static const unsigned short lbase[31] = { /* Length codes 257..285 base */
   70|  49.3k|        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
   71|  49.3k|        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
   72|  49.3k|    static const unsigned short lext[31] = { /* Length codes 257..285 extra */
   73|  49.3k|        16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
   74|  49.3k|        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 68, 193};
   75|  49.3k|    static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
   76|  49.3k|        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
   77|  49.3k|        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
   78|  49.3k|        8193, 12289, 16385, 24577, 0, 0};
   79|  49.3k|    static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
   80|  49.3k|        16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
   81|  49.3k|        23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
   82|  49.3k|        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|   839k|    for (len = 0; len <= MAXBITS; len++)
  ------------------
  |  |   23|   839k|#define MAXBITS 15
  ------------------
  |  Branch (116:19): [True: 789k, False: 49.3k]
  ------------------
  117|   789k|        count[len] = 0;
  118|  4.71M|    for (sym = 0; sym < codes; sym++)
  ------------------
  |  Branch (118:19): [True: 4.66M, False: 49.3k]
  ------------------
  119|  4.66M|        count[lens[sym]]++;
  120|       |
  121|       |    /* bound code lengths, force root to be within code lengths */
  122|  49.3k|    root = *bits;
  123|   586k|    for (max = MAXBITS; max >= 1; max--)
  ------------------
  |  |   23|  49.3k|#define MAXBITS 15
  ------------------
  |  Branch (123:25): [True: 586k, False: 0]
  ------------------
  124|   586k|        if (count[max] != 0) break;
  ------------------
  |  Branch (124:13): [True: 49.3k, False: 536k]
  ------------------
  125|  49.3k|    if (root > max) root = max;
  ------------------
  |  Branch (125:9): [True: 44.1k, False: 5.26k]
  ------------------
  126|  49.3k|    if (max == 0) {                     /* no symbols to code at all */
  ------------------
  |  Branch (126:9): [True: 0, False: 49.3k]
  ------------------
  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|  80.8k|    for (min = 1; min < max; min++)
  ------------------
  |  Branch (135:19): [True: 62.1k, False: 18.7k]
  ------------------
  136|  62.1k|        if (count[min] != 0) break;
  ------------------
  |  Branch (136:13): [True: 30.6k, False: 31.4k]
  ------------------
  137|  49.3k|    if (root < min) root = min;
  ------------------
  |  Branch (137:9): [True: 0, False: 49.3k]
  ------------------
  138|       |
  139|       |    /* check for an over-subscribed or incomplete set of lengths */
  140|  49.3k|    left = 1;
  141|   789k|    for (len = 1; len <= MAXBITS; len++) {
  ------------------
  |  |   23|   789k|#define MAXBITS 15
  ------------------
  |  Branch (141:19): [True: 740k, False: 49.3k]
  ------------------
  142|   740k|        left <<= 1;
  143|   740k|        left -= count[len];
  144|   740k|        if (left < 0) return -1;        /* over-subscribed */
  ------------------
  |  Branch (144:13): [True: 0, False: 740k]
  ------------------
  145|   740k|    }
  146|  49.3k|    if (left > 0 && (type == CODES || max != 1))
  ------------------
  |  Branch (146:9): [True: 0, False: 49.3k]
  |  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|  49.3k|    offs[1] = 0;
  151|   740k|    for (len = 1; len < MAXBITS; len++)
  ------------------
  |  |   23|   740k|#define MAXBITS 15
  ------------------
  |  Branch (151:19): [True: 691k, False: 49.3k]
  ------------------
  152|   691k|        offs[len + 1] = offs[len] + count[len];
  153|       |
  154|       |    /* sort symbols by length, by symbol order within each length */
  155|  4.71M|    for (sym = 0; sym < codes; sym++)
  ------------------
  |  Branch (155:19): [True: 4.66M, False: 49.3k]
  ------------------
  156|  4.66M|        if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
  ------------------
  |  Branch (156:13): [True: 943k, False: 3.71M]
  ------------------
  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|  49.3k|    switch (type) {
  ------------------
  |  Branch (190:13): [True: 49.3k, False: 0]
  ------------------
  191|  16.4k|    case CODES:
  ------------------
  |  Branch (191:5): [True: 16.4k, False: 32.9k]
  ------------------
  192|  16.4k|        match = 20;
  193|  16.4k|        break;
  194|  16.4k|    case LENS:
  ------------------
  |  Branch (194:5): [True: 16.4k, False: 32.9k]
  ------------------
  195|  16.4k|        base = lbase;
  196|  16.4k|        extra = lext;
  197|  16.4k|        match = 257;
  198|  16.4k|        break;
  199|  16.4k|    case DISTS:
  ------------------
  |  Branch (199:5): [True: 16.4k, False: 32.9k]
  ------------------
  200|  16.4k|        base = dbase;
  201|  16.4k|        extra = dext;
  202|  49.3k|    }
  203|       |
  204|       |    /* initialize state for loop */
  205|  49.3k|    huff = 0;                   /* starting code */
  206|  49.3k|    sym = 0;                    /* starting code symbol */
  207|  49.3k|    len = min;                  /* starting code length */
  208|  49.3k|    next = *table;              /* current table to fill in */
  209|  49.3k|    curr = root;                /* current table index bits */
  210|  49.3k|    drop = 0;                   /* current bits to drop from code for index */
  211|  49.3k|    low = (unsigned)(-1);       /* trigger new sub-table when len > root */
  212|  49.3k|    used = 1U << root;          /* use root table entries */
  213|  49.3k|    mask = used - 1;            /* mask for comparing low */
  214|       |
  215|       |    /* check available table space */
  216|  49.3k|    if ((type == LENS && used > ENOUGH_LENS) ||
  ------------------
  |  |   50|  16.4k|#  define ENOUGH_LENS 852
  ------------------
  |  Branch (216:10): [True: 16.4k, False: 32.9k]
  |  Branch (216:26): [True: 0, False: 16.4k]
  ------------------
  217|  49.3k|        (type == DISTS && used > ENOUGH_DISTS))
  ------------------
  |  |   51|  16.4k|#  define ENOUGH_DISTS 592
  ------------------
  |  Branch (217:10): [True: 16.4k, False: 32.9k]
  |  Branch (217:27): [True: 0, False: 16.4k]
  ------------------
  218|      0|        return 1;
  219|       |
  220|       |    /* process all codes and make table entries */
  221|   943k|    for (;;) {
  222|       |        /* create table entry */
  223|   943k|        here.bits = (unsigned char)(len - drop);
  224|   943k|        if (work[sym] + 1U < match) {
  ------------------
  |  Branch (224:13): [True: 847k, False: 95.3k]
  ------------------
  225|   847k|            here.op = (unsigned char)0;
  226|   847k|            here.val = work[sym];
  227|   847k|        }
  228|  95.3k|        else if (work[sym] >= match) {
  ------------------
  |  Branch (228:18): [True: 78.8k, False: 16.4k]
  ------------------
  229|  78.8k|            here.op = (unsigned char)(extra[work[sym] - match]);
  230|  78.8k|            here.val = base[work[sym] - match];
  231|  78.8k|        }
  232|  16.4k|        else {
  233|  16.4k|            here.op = (unsigned char)(32 + 64);         /* end of block */
  234|  16.4k|            here.val = 0;
  235|  16.4k|        }
  236|       |
  237|       |        /* replicate for those indices with low len bits equal to huff */
  238|   943k|        incr = 1U << (len - drop);
  239|   943k|        fill = 1U << curr;
  240|   943k|        min = fill;                 /* save offset to next table */
  241|  3.47M|        do {
  242|  3.47M|            fill -= incr;
  243|  3.47M|            next[(huff >> drop) + fill] = here;
  244|  3.47M|        } while (fill != 0);
  ------------------
  |  Branch (244:18): [True: 2.53M, False: 943k]
  ------------------
  245|       |
  246|       |        /* backwards increment the len-bit code huff */
  247|   943k|        incr = 1U << (len - 1);
  248|  1.83M|        while (huff & incr)
  ------------------
  |  Branch (248:16): [True: 893k, False: 943k]
  ------------------
  249|   893k|            incr >>= 1;
  250|   943k|        if (incr != 0) {
  ------------------
  |  Branch (250:13): [True: 893k, False: 49.3k]
  ------------------
  251|   893k|            huff &= incr - 1;
  252|   893k|            huff += incr;
  253|   893k|        }
  254|  49.3k|        else
  255|  49.3k|            huff = 0;
  256|       |
  257|       |        /* go to next symbol, update count, len */
  258|   943k|        sym++;
  259|   943k|        if (--(count[len]) == 0) {
  ------------------
  |  Branch (259:13): [True: 153k, False: 789k]
  ------------------
  260|   153k|            if (len == max) break;
  ------------------
  |  Branch (260:17): [True: 49.3k, False: 104k]
  ------------------
  261|   104k|            len = lens[work[sym]];
  262|   104k|        }
  263|       |
  264|       |        /* create new sub-table if needed */
  265|   893k|        if (len > root && (huff & mask) != low) {
  ------------------
  |  Branch (265:13): [True: 73.3k, False: 820k]
  |  Branch (265:27): [True: 28.9k, False: 44.4k]
  ------------------
  266|       |            /* if first time, transition to sub-tables */
  267|  28.9k|            if (drop == 0)
  ------------------
  |  Branch (267:17): [True: 2.16k, False: 26.7k]
  ------------------
  268|  2.16k|                drop = root;
  269|       |
  270|       |            /* increment past last table */
  271|  28.9k|            next += min;            /* here min is 1 << curr */
  272|       |
  273|       |            /* determine length of next table */
  274|  28.9k|            curr = len - drop;
  275|  28.9k|            left = (int)(1 << curr);
  276|  29.9k|            while (curr + drop < max) {
  ------------------
  |  Branch (276:20): [True: 8.27k, False: 21.6k]
  ------------------
  277|  8.27k|                left -= count[curr + drop];
  278|  8.27k|                if (left <= 0) break;
  ------------------
  |  Branch (278:21): [True: 7.29k, False: 984]
  ------------------
  279|    984|                curr++;
  280|    984|                left <<= 1;
  281|    984|            }
  282|       |
  283|       |            /* check for enough space */
  284|  28.9k|            used += 1U << curr;
  285|  28.9k|            if ((type == LENS && used > ENOUGH_LENS) ||
  ------------------
  |  |   50|  27.7k|#  define ENOUGH_LENS 852
  ------------------
  |  Branch (285:18): [True: 27.7k, False: 1.14k]
  |  Branch (285:34): [True: 0, False: 27.7k]
  ------------------
  286|  28.9k|                (type == DISTS && used > ENOUGH_DISTS))
  ------------------
  |  |   51|  1.14k|#  define ENOUGH_DISTS 592
  ------------------
  |  Branch (286:18): [True: 1.14k, False: 27.7k]
  |  Branch (286:35): [True: 0, False: 1.14k]
  ------------------
  287|      0|                return 1;
  288|       |
  289|       |            /* point entry in root table to sub-table */
  290|  28.9k|            low = huff & mask;
  291|  28.9k|            (*table)[low].op = (unsigned char)curr;
  292|  28.9k|            (*table)[low].bits = (unsigned char)root;
  293|  28.9k|            (*table)[low].val = (unsigned short)(next - *table);
  294|  28.9k|        }
  295|   893k|    }
  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|  49.3k|    if (huff != 0) {
  ------------------
  |  Branch (300:9): [True: 0, False: 49.3k]
  ------------------
  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|  49.3k|    *table += used;
  309|  49.3k|    *bits = root;
  310|  49.3k|    return 0;
  311|  49.3k|}
inflate_fixed:
  364|  8.55k|void inflate_fixed(struct inflate_state FAR *state) {
  365|       |#ifdef BUILDFIXED
  366|       |    z_once(&built, buildtables);
  367|       |#endif /* BUILDFIXED */
  368|  8.55k|    state->lencode = lenfix;
  369|  8.55k|    state->lenbits = 9;
  370|  8.55k|    state->distcode = distfix;
  371|  8.55k|    state->distbits = 5;
  372|  8.55k|}

_tr_init:
  456|  4.17k|void ZLIB_INTERNAL _tr_init(deflate_state *s) {
  457|  4.17k|    tr_static_init();
  458|       |
  459|  4.17k|    s->l_desc.dyn_tree = s->dyn_ltree;
  460|  4.17k|    s->l_desc.stat_desc = &static_l_desc;
  461|       |
  462|  4.17k|    s->d_desc.dyn_tree = s->dyn_dtree;
  463|  4.17k|    s->d_desc.stat_desc = &static_d_desc;
  464|       |
  465|  4.17k|    s->bl_desc.dyn_tree = s->bl_tree;
  466|  4.17k|    s->bl_desc.stat_desc = &static_bl_desc;
  467|       |
  468|  4.17k|    s->bi_buf = 0;
  469|  4.17k|    s->bi_valid = 0;
  470|  4.17k|    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|  4.17k|    init_block(s);
  478|  4.17k|}
_tr_stored_block:
  861|  7.06k|                                    ulg stored_len, int last) {
  862|  7.06k|    send_bits(s, (STORED_BLOCK<<1) + last, 3);  /* send block type */
  ------------------
  |  |  274|  7.06k|#define send_bits(s, value, length) \
  |  |  275|  7.06k|{ int len = length;\
  |  |  276|  7.06k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  7.06k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 0, False: 7.06k]
  |  |  ------------------
  |  |  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|  7.06k|  } else {\
  |  |  283|  7.06k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  7.06k|    s->bi_valid += len;\
  |  |  285|  7.06k|  }\
  |  |  286|  7.06k|}
  ------------------
  863|  7.06k|    bi_windup(s);        /* align on byte boundary */
  864|  7.06k|    put_short(s, (ush)stored_len);
  ------------------
  |  |  144|  7.06k|#define put_short(s, w) { \
  |  |  145|  7.06k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  ------------------
  |  |  |  |  293|  7.06k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  146|  7.06k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  ------------------
  |  |  |  |  293|  7.06k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  147|  7.06k|}
  ------------------
  865|  7.06k|    put_short(s, (ush)~stored_len);
  ------------------
  |  |  144|  7.06k|#define put_short(s, w) { \
  |  |  145|  7.06k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  ------------------
  |  |  |  |  293|  7.06k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  146|  7.06k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  ------------------
  |  |  |  |  293|  7.06k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  147|  7.06k|}
  ------------------
  866|  7.06k|    if (stored_len)
  ------------------
  |  Branch (866:9): [True: 7.06k, False: 0]
  ------------------
  867|  7.06k|        zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len);
  ------------------
  |  |  216|  7.06k|#    define zmemcpy memcpy
  ------------------
  868|  7.06k|    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|  7.06k|}
_tr_flush_bits:
  880|  40.4k|void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s) {
  881|  40.4k|    bi_flush(s);
  882|  40.4k|}
_tr_flush_block:
  998|  32.0k|                                   ulg stored_len, int last) {
  999|  32.0k|    ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
 1000|  32.0k|    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|  32.0k|    if (s->level > 0) {
  ------------------
  |  Branch (1003:9): [True: 32.0k, False: 0]
  ------------------
 1004|       |
 1005|       |        /* Check if the file is binary or text */
 1006|  32.0k|        if (s->strm->data_type == Z_UNKNOWN)
  ------------------
  |  |  210|  32.0k|#define Z_UNKNOWN  2
  ------------------
  |  Branch (1006:13): [True: 4.17k, False: 27.9k]
  ------------------
 1007|  4.17k|            s->strm->data_type = detect_data_type(s);
 1008|       |
 1009|       |        /* Construct the literal and distance trees */
 1010|  32.0k|        build_tree(s, (tree_desc *)(&(s->l_desc)));
 1011|  32.0k|        Tracev((stderr, "\nlit data: dyn %lu, stat %lu", s->opt_len,
 1012|  32.0k|                s->static_len));
 1013|       |
 1014|  32.0k|        build_tree(s, (tree_desc *)(&(s->d_desc)));
 1015|  32.0k|        Tracev((stderr, "\ndist data: dyn %lu, stat %lu", s->opt_len,
 1016|  32.0k|                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|  32.0k|        max_blindex = build_bl_tree(s);
 1025|       |
 1026|       |        /* Determine the best encoding. Compute the block lengths in bytes. */
 1027|  32.0k|        opt_lenb = (s->opt_len + 3 + 7) >> 3;
 1028|  32.0k|        static_lenb = (s->static_len + 3 + 7) >> 3;
 1029|       |
 1030|  32.0k|        Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
 1031|  32.0k|                opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
 1032|  32.0k|                s->sym_next / 3));
 1033|       |
 1034|  32.0k|#ifndef FORCE_STATIC
 1035|  32.0k|        if (static_lenb <= opt_lenb || s->strategy == Z_FIXED)
  ------------------
  |  |  203|  17.3k|#define Z_FIXED               4
  ------------------
  |  Branch (1035:13): [True: 14.6k, False: 17.3k]
  |  Branch (1035:40): [True: 429, False: 16.9k]
  ------------------
 1036|  15.1k|#endif
 1037|  15.1k|            opt_lenb = static_lenb;
 1038|       |
 1039|  32.0k|    } 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|  32.0k|    if (stored_len + 4 <= opt_lenb && buf != (char*)0) {
  ------------------
  |  Branch (1047:9): [True: 7.98k, False: 24.0k]
  |  Branch (1047:39): [True: 7.06k, False: 920]
  ------------------
 1048|       |                       /* 4: two words for the lengths */
 1049|  7.06k|#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|  7.06k|        _tr_stored_block(s, buf, stored_len, last);
 1057|       |
 1058|  25.0k|    } else if (static_lenb == opt_lenb) {
  ------------------
  |  Branch (1058:16): [True: 8.55k, False: 16.4k]
  ------------------
 1059|  8.55k|        send_bits(s, (STATIC_TREES<<1) + last, 3);
  ------------------
  |  |  274|  8.55k|#define send_bits(s, value, length) \
  |  |  275|  8.55k|{ int len = length;\
  |  |  276|  8.55k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  8.55k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 0, False: 8.55k]
  |  |  ------------------
  |  |  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|  8.55k|  } else {\
  |  |  283|  8.55k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  8.55k|    s->bi_valid += len;\
  |  |  285|  8.55k|  }\
  |  |  286|  8.55k|}
  ------------------
 1060|  8.55k|        compress_block(s, (const ct_data *)static_ltree,
 1061|  8.55k|                       (const ct_data *)static_dtree);
 1062|       |#ifdef ZLIB_DEBUG
 1063|       |        s->compressed_len += 3 + s->static_len;
 1064|       |#endif
 1065|  16.4k|    } else {
 1066|  16.4k|        send_bits(s, (DYN_TREES<<1) + last, 3);
  ------------------
  |  |  274|  16.4k|#define send_bits(s, value, length) \
  |  |  275|  16.4k|{ int len = length;\
  |  |  276|  16.4k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  16.4k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 0, False: 16.4k]
  |  |  ------------------
  |  |  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|  16.4k|  } else {\
  |  |  283|  16.4k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  16.4k|    s->bi_valid += len;\
  |  |  285|  16.4k|  }\
  |  |  286|  16.4k|}
  ------------------
 1067|  16.4k|        send_all_trees(s, s->l_desc.max_code + 1, s->d_desc.max_code + 1,
 1068|  16.4k|                       max_blindex + 1);
 1069|  16.4k|        compress_block(s, (const ct_data *)s->dyn_ltree,
 1070|  16.4k|                       (const ct_data *)s->dyn_dtree);
 1071|       |#ifdef ZLIB_DEBUG
 1072|       |        s->compressed_len += 3 + s->opt_len;
 1073|       |#endif
 1074|  16.4k|    }
 1075|  32.0k|    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|  32.0k|    init_block(s);
 1080|       |
 1081|  32.0k|    if (last) {
  ------------------
  |  Branch (1081:9): [True: 4.17k, False: 27.9k]
  ------------------
 1082|  4.17k|        bi_windup(s);
 1083|       |#ifdef ZLIB_DEBUG
 1084|       |        s->compressed_len += 7;  /* align on byte boundary */
 1085|       |#endif
 1086|  4.17k|    }
 1087|  32.0k|    Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len >> 3,
 1088|  32.0k|           s->compressed_len - 7*(ulg)last));
 1089|  32.0k|}
trees.c:tr_static_init:
  295|  4.17k|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|  4.17k|}
trees.c:init_block:
  440|  36.2k|local void init_block(deflate_state *s) {
  441|  36.2k|    int n; /* iterates over tree elements */
  442|       |
  443|       |    /* Initialize the trees. */
  444|  10.4M|    for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
  ------------------
  |  |   40|  10.4M|#define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  ------------------
  |  |  |  |   37|  10.4M|#define LITERALS  256
  |  |  ------------------
  |  |               #define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  ------------------
  |  |  |  |   34|  10.4M|#define LENGTH_CODES 29
  |  |  ------------------
  ------------------
                  for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
  ------------------
  |  |   83|  10.3M|#define Freq fc.freq
  ------------------
  |  Branch (444:17): [True: 10.3M, False: 36.2k]
  ------------------
  445|  1.12M|    for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
  ------------------
  |  |   43|  1.12M|#define D_CODES   30
  ------------------
                  for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
  ------------------
  |  |   83|  1.08M|#define Freq fc.freq
  ------------------
  |  Branch (445:17): [True: 1.08M, False: 36.2k]
  ------------------
  446|   725k|    for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
  ------------------
  |  |   46|   725k|#define BL_CODES  19
  ------------------
                  for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
  ------------------
  |  |   83|   688k|#define Freq fc.freq
  ------------------
  |  Branch (446:17): [True: 688k, False: 36.2k]
  ------------------
  447|       |
  448|  36.2k|    s->dyn_ltree[END_BLOCK].Freq = 1;
  ------------------
  |  |   50|  36.2k|#define END_BLOCK 256
  ------------------
                  s->dyn_ltree[END_BLOCK].Freq = 1;
  ------------------
  |  |   83|  36.2k|#define Freq fc.freq
  ------------------
  449|  36.2k|    s->opt_len = s->static_len = 0L;
  450|  36.2k|    s->sym_next = s->matches = 0;
  451|  36.2k|}
trees.c:bi_windup:
  181|  11.2k|local void bi_windup(deflate_state *s) {
  182|  11.2k|    if (s->bi_valid > 8) {
  ------------------
  |  Branch (182:9): [True: 2.34k, False: 8.89k]
  ------------------
  183|  2.34k|        put_short(s, s->bi_buf);
  ------------------
  |  |  144|  2.34k|#define put_short(s, w) { \
  |  |  145|  2.34k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  ------------------
  |  |  |  |  293|  2.34k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  146|  2.34k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  ------------------
  |  |  |  |  293|  2.34k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  147|  2.34k|}
  ------------------
  184|  8.89k|    } else if (s->bi_valid > 0) {
  ------------------
  |  Branch (184:16): [True: 8.63k, False: 264]
  ------------------
  185|  8.63k|        put_byte(s, (Byte)s->bi_buf);
  ------------------
  |  |  293|  8.63k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
  186|  8.63k|    }
  187|  11.2k|    s->bi_used = ((s->bi_valid - 1) & 7) + 1;
  188|  11.2k|    s->bi_buf = 0;
  189|  11.2k|    s->bi_valid = 0;
  190|       |#ifdef ZLIB_DEBUG
  191|       |    s->bits_sent = (s->bits_sent + 7) & ~(ulg)7;
  192|       |#endif
  193|  11.2k|}
trees.c:bi_flush:
  166|  40.4k|local void bi_flush(deflate_state *s) {
  167|  40.4k|    if (s->bi_valid == 16) {
  ------------------
  |  Branch (167:9): [True: 1.85k, False: 38.5k]
  ------------------
  168|  1.85k|        put_short(s, s->bi_buf);
  ------------------
  |  |  144|  1.85k|#define put_short(s, w) { \
  |  |  145|  1.85k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  ------------------
  |  |  |  |  293|  1.85k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  146|  1.85k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  ------------------
  |  |  |  |  293|  1.85k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  147|  1.85k|}
  ------------------
  169|  1.85k|        s->bi_buf = 0;
  170|  1.85k|        s->bi_valid = 0;
  171|  38.5k|    } else if (s->bi_valid >= 8) {
  ------------------
  |  Branch (171:16): [True: 10.4k, False: 28.1k]
  ------------------
  172|  10.4k|        put_byte(s, (Byte)s->bi_buf);
  ------------------
  |  |  293|  10.4k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
  173|  10.4k|        s->bi_buf >>= 8;
  174|  10.4k|        s->bi_valid -= 8;
  175|  10.4k|    }
  176|  40.4k|}
trees.c:detect_data_type:
  966|  4.17k|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|  4.17k|    unsigned long block_mask = 0xf3ffc07fUL;
  972|  4.17k|    int n;
  973|       |
  974|       |    /* Check for non-textual ("block-listed") bytes. */
  975|  44.5k|    for (n = 0; n <= 31; n++, block_mask >>= 1)
  ------------------
  |  Branch (975:17): [True: 43.3k, False: 1.13k]
  ------------------
  976|  43.3k|        if ((block_mask & 1) && (s->dyn_ltree[n].Freq != 0))
  ------------------
  |  |   83|  32.0k|#define Freq fc.freq
  ------------------
  |  Branch (976:13): [True: 32.0k, False: 11.2k]
  |  Branch (976:33): [True: 3.04k, False: 29.0k]
  ------------------
  977|  3.04k|            return Z_BINARY;
  ------------------
  |  |  207|  3.04k|#define Z_BINARY   0
  ------------------
  978|       |
  979|       |    /* Check for textual ("allow-listed") bytes. */
  980|  1.13k|    if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
  ------------------
  |  |   83|  1.13k|#define Freq fc.freq
  ------------------
                  if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
  ------------------
  |  |   83|  1.09k|#define Freq fc.freq
  ------------------
  |  Branch (980:9): [True: 37, False: 1.09k]
  |  Branch (980:38): [True: 66, False: 1.03k]
  ------------------
  981|  1.03k|            || s->dyn_ltree[13].Freq != 0)
  ------------------
  |  |   83|  1.03k|#define Freq fc.freq
  ------------------
  |  Branch (981:16): [True: 33, False: 997]
  ------------------
  982|    136|        return Z_TEXT;
  ------------------
  |  |  208|    136|#define Z_TEXT     1
  ------------------
  983|   134k|    for (n = 32; n < LITERALS; n++)
  ------------------
  |  |   37|   134k|#define LITERALS  256
  ------------------
  |  Branch (983:18): [True: 134k, False: 296]
  ------------------
  984|   134k|        if (s->dyn_ltree[n].Freq != 0)
  ------------------
  |  |   83|   134k|#define Freq fc.freq
  ------------------
  |  Branch (984:13): [True: 701, False: 133k]
  ------------------
  985|    701|            return Z_TEXT;
  ------------------
  |  |  208|  1.69k|#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|    296|    return Z_BINARY;
  ------------------
  |  |  207|    296|#define Z_BINARY   0
  ------------------
  991|    997|}
trees.c:build_tree:
  627|  96.2k|local void build_tree(deflate_state *s, tree_desc *desc) {
  628|  96.2k|    ct_data *tree         = desc->dyn_tree;
  629|  96.2k|    const ct_data *stree  = desc->stat_desc->static_tree;
  630|  96.2k|    int elems             = desc->stat_desc->elems;
  631|  96.2k|    int n, m;          /* iterate over heap elements */
  632|  96.2k|    int max_code = -1; /* largest code with non zero frequency */
  633|  96.2k|    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|  96.2k|    s->heap_len = 0, s->heap_max = HEAP_SIZE;
  ------------------
  |  |   49|  96.2k|#define HEAP_SIZE (2*L_CODES+1)
  |  |  ------------------
  |  |  |  |   40|  96.2k|#define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  96.2k|#define LITERALS  256
  |  |  |  |  ------------------
  |  |  |  |               #define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  96.2k|#define LENGTH_CODES 29
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  640|       |
  641|  10.8M|    for (n = 0; n < elems; n++) {
  ------------------
  |  Branch (641:17): [True: 10.7M, False: 96.2k]
  ------------------
  642|  10.7M|        if (tree[n].Freq != 0) {
  ------------------
  |  |   83|  10.7M|#define Freq fc.freq
  ------------------
  |  Branch (642:13): [True: 2.47M, False: 8.27M]
  ------------------
  643|  2.47M|            s->heap[++(s->heap_len)] = max_code = n;
  644|  2.47M|            s->depth[n] = 0;
  645|  8.27M|        } else {
  646|  8.27M|            tree[n].Len = 0;
  ------------------
  |  |   86|  8.27M|#define Len  dl.len
  ------------------
  647|  8.27M|        }
  648|  10.7M|    }
  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|   142k|    while (s->heap_len < 2) {
  ------------------
  |  Branch (655:12): [True: 46.2k, False: 96.2k]
  ------------------
  656|  46.2k|        node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
  ------------------
  |  Branch (656:44): [True: 44.7k, False: 1.49k]
  ------------------
  657|  46.2k|        tree[node].Freq = 1;
  ------------------
  |  |   83|  46.2k|#define Freq fc.freq
  ------------------
  658|  46.2k|        s->depth[node] = 0;
  659|  46.2k|        s->opt_len--; if (stree) s->static_len -= stree[node].Len;
  ------------------
  |  |   86|  46.2k|#define Len  dl.len
  ------------------
  |  Branch (659:27): [True: 46.2k, False: 0]
  ------------------
  660|       |        /* node is 0 or 1 so it does not have extra bits */
  661|  46.2k|    }
  662|  96.2k|    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.33M|    for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
  ------------------
  |  Branch (667:29): [True: 1.24M, False: 96.2k]
  ------------------
  668|       |
  669|       |    /* Construct the Huffman tree by repeatedly combining the least two
  670|       |     * frequent nodes.
  671|       |     */
  672|  96.2k|    node = elems;              /* next internal node of the tree */
  673|  2.42M|    do {
  674|  2.42M|        pqremove(s, tree, n);  /* n = node of least frequency */
  ------------------
  |  |  488|  2.42M|#define pqremove(s, tree, top) \
  |  |  489|  2.42M|{\
  |  |  490|  2.42M|    top = s->heap[SMALLEST]; \
  |  |  ------------------
  |  |  |  |  480|  2.42M|#define SMALLEST 1
  |  |  ------------------
  |  |  491|  2.42M|    s->heap[SMALLEST] = s->heap[s->heap_len--]; \
  |  |  ------------------
  |  |  |  |  480|  2.42M|#define SMALLEST 1
  |  |  ------------------
  |  |  492|  2.42M|    pqdownheap(s, tree, SMALLEST); \
  |  |  ------------------
  |  |  |  |  480|  2.42M|#define SMALLEST 1
  |  |  ------------------
  |  |  493|  2.42M|}
  ------------------
  675|  2.42M|        m = s->heap[SMALLEST]; /* m = node of next least frequency */
  ------------------
  |  |  480|  2.42M|#define SMALLEST 1
  ------------------
  676|       |
  677|  2.42M|        s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
  678|  2.42M|        s->heap[--(s->heap_max)] = m;
  679|       |
  680|       |        /* Create a new node father of n and m */
  681|  2.42M|        tree[node].Freq = tree[n].Freq + tree[m].Freq;
  ------------------
  |  |   83|  2.42M|#define Freq fc.freq
  ------------------
                      tree[node].Freq = tree[n].Freq + tree[m].Freq;
  ------------------
  |  |   83|  2.42M|#define Freq fc.freq
  ------------------
                      tree[node].Freq = tree[n].Freq + tree[m].Freq;
  ------------------
  |  |   83|  2.42M|#define Freq fc.freq
  ------------------
  682|  2.42M|        s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?
  ------------------
  |  Branch (682:33): [True: 2.13M, False: 293k]
  ------------------
  683|  2.13M|                                s->depth[n] : s->depth[m]) + 1);
  684|  2.42M|        tree[n].Dad = tree[m].Dad = (ush)node;
  ------------------
  |  |   85|  2.42M|#define Dad  dl.dad
  ------------------
                      tree[n].Dad = tree[m].Dad = (ush)node;
  ------------------
  |  |   85|  2.42M|#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.42M|        s->heap[SMALLEST] = node++;
  ------------------
  |  |  480|  2.42M|#define SMALLEST 1
  ------------------
  693|  2.42M|        pqdownheap(s, tree, SMALLEST);
  ------------------
  |  |  480|  2.42M|#define SMALLEST 1
  ------------------
  694|       |
  695|  2.42M|    } while (s->heap_len >= 2);
  ------------------
  |  Branch (695:14): [True: 2.32M, False: 96.2k]
  ------------------
  696|       |
  697|  96.2k|    s->heap[--(s->heap_max)] = s->heap[SMALLEST];
  ------------------
  |  |  480|  96.2k|#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|  96.2k|    gen_bitlen(s, (tree_desc *)desc);
  703|       |
  704|       |    /* The field len is now set, we can generate the bit codes */
  705|  96.2k|    gen_codes ((ct_data *)tree, max_code, s->bl_count);
  706|  96.2k|}
trees.c:pqdownheap:
  509|  6.09M|local void pqdownheap(deflate_state *s, ct_data *tree, int k) {
  510|  6.09M|    int v = s->heap[k];
  511|  6.09M|    int j = k << 1;  /* left son of k */
  512|  23.7M|    while (j <= s->heap_len) {
  ------------------
  |  Branch (512:12): [True: 19.7M, False: 3.97M]
  ------------------
  513|       |        /* Set j to the smallest of the two sons: */
  514|  19.7M|        if (j < s->heap_len &&
  ------------------
  |  Branch (514:13): [True: 19.1M, False: 598k]
  ------------------
  515|  19.1M|            smaller(tree, s->heap[j + 1], s->heap[j], s->depth)) {
  ------------------
  |  |  500|  19.1M|   (tree[n].Freq < tree[m].Freq || \
  |  |  ------------------
  |  |  |  |   83|  19.1M|#define Freq fc.freq
  |  |  ------------------
  |  |                  (tree[n].Freq < tree[m].Freq || \
  |  |  ------------------
  |  |  |  |   83|  38.3M|#define Freq fc.freq
  |  |  ------------------
  |  |  |  Branch (500:5): [True: 2.00M, False: 17.1M]
  |  |  ------------------
  |  |  501|  19.1M|   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
  |  |  ------------------
  |  |  |  |   83|  17.1M|#define Freq fc.freq
  |  |  ------------------
  |  |                  (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
  |  |  ------------------
  |  |  |  |   83|  34.3M|#define Freq fc.freq
  |  |  ------------------
  |  |  |  Branch (501:5): [True: 9.82M, False: 7.36M]
  |  |  |  Branch (501:37): [True: 7.86M, False: 1.96M]
  |  |  ------------------
  ------------------
  516|  9.87M|            j++;
  517|  9.87M|        }
  518|       |        /* Exit if v is smaller than both sons */
  519|  19.7M|        if (smaller(tree, v, s->heap[j], s->depth)) break;
  ------------------
  |  |  500|  19.7M|   (tree[n].Freq < tree[m].Freq || \
  |  |  ------------------
  |  |  |  |   83|  19.7M|#define Freq fc.freq
  |  |  ------------------
  |  |                  (tree[n].Freq < tree[m].Freq || \
  |  |  ------------------
  |  |  |  |   83|  39.5M|#define Freq fc.freq
  |  |  ------------------
  |  |  |  Branch (500:5): [True: 577k, False: 19.2M]
  |  |  ------------------
  |  |  501|  19.7M|   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
  |  |  ------------------
  |  |  |  |   83|  19.2M|#define Freq fc.freq
  |  |  ------------------
  |  |                  (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
  |  |  ------------------
  |  |  |  |   83|  38.4M|#define Freq fc.freq
  |  |  ------------------
  |  |  |  Branch (501:5): [True: 2.75M, False: 16.4M]
  |  |  |  Branch (501:37): [True: 1.53M, False: 1.21M]
  |  |  ------------------
  ------------------
  520|       |
  521|       |        /* Exchange v with the smallest son */
  522|  17.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|  17.6M|        j <<= 1;
  526|  17.6M|    }
  527|  6.09M|    s->heap[k] = v;
  528|  6.09M|}
trees.c:gen_bitlen:
  540|  96.2k|local void gen_bitlen(deflate_state *s, tree_desc *desc) {
  541|  96.2k|    ct_data *tree        = desc->dyn_tree;
  542|  96.2k|    int max_code         = desc->max_code;
  543|  96.2k|    const ct_data *stree = desc->stat_desc->static_tree;
  544|  96.2k|    const intf *extra    = desc->stat_desc->extra_bits;
  545|  96.2k|    int base             = desc->stat_desc->extra_base;
  546|  96.2k|    int max_length       = desc->stat_desc->max_length;
  547|  96.2k|    int h;              /* heap index */
  548|  96.2k|    int n, m;           /* iterate over the tree elements */
  549|  96.2k|    int bits;           /* bit length */
  550|  96.2k|    int xbits;          /* extra bits */
  551|  96.2k|    ush f;              /* frequency */
  552|  96.2k|    int overflow = 0;   /* number of elements with bit length too large */
  553|       |
  554|  1.63M|    for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
  ------------------
  |  |   52|  1.63M|#define MAX_BITS 15
  ------------------
  |  Branch (554:20): [True: 1.53M, False: 96.2k]
  ------------------
  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|  96.2k|    tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
  ------------------
  |  |   86|  96.2k|#define Len  dl.len
  ------------------
  560|       |
  561|  4.94M|    for (h = s->heap_max + 1; h < HEAP_SIZE; h++) {
  ------------------
  |  |   49|  4.94M|#define HEAP_SIZE (2*L_CODES+1)
  |  |  ------------------
  |  |  |  |   40|  4.94M|#define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  4.94M|#define LITERALS  256
  |  |  |  |  ------------------
  |  |  |  |               #define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.94M|#define LENGTH_CODES 29
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (561:31): [True: 4.84M, False: 96.2k]
  ------------------
  562|  4.84M|        n = s->heap[h];
  563|  4.84M|        bits = tree[tree[n].Dad].Len + 1;
  ------------------
  |  |   85|  4.84M|#define Dad  dl.dad
  ------------------
                      bits = tree[tree[n].Dad].Len + 1;
  ------------------
  |  |   86|  4.84M|#define Len  dl.len
  ------------------
  564|  4.84M|        if (bits > max_length) bits = max_length, overflow++;
  ------------------
  |  Branch (564:13): [True: 6.08k, False: 4.84M]
  ------------------
  565|  4.84M|        tree[n].Len = (ush)bits;
  ------------------
  |  |   86|  4.84M|#define Len  dl.len
  ------------------
  566|       |        /* We overwrite tree[n].Dad which is no longer needed */
  567|       |
  568|  4.84M|        if (n > max_code) continue; /* not a leaf node */
  ------------------
  |  Branch (568:13): [True: 2.32M, False: 2.52M]
  ------------------
  569|       |
  570|  2.52M|        s->bl_count[bits]++;
  571|  2.52M|        xbits = 0;
  572|  2.52M|        if (n >= base) xbits = extra[n - base];
  ------------------
  |  Branch (572:13): [True: 425k, False: 2.09M]
  ------------------
  573|  2.52M|        f = tree[n].Freq;
  ------------------
  |  |   83|  2.52M|#define Freq fc.freq
  ------------------
  574|  2.52M|        s->opt_len += (ulg)f * (unsigned)(bits + xbits);
  575|  2.52M|        if (stree) s->static_len += (ulg)f * (unsigned)(stree[n].Len + xbits);
  ------------------
  |  |   86|  2.26M|#define Len  dl.len
  ------------------
  |  Branch (575:13): [True: 2.26M, False: 252k]
  ------------------
  576|  2.52M|    }
  577|  96.2k|    if (overflow == 0) return;
  ------------------
  |  Branch (577:9): [True: 94.1k, False: 2.09k]
  ------------------
  578|       |
  579|  2.09k|    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.04k|    do {
  584|  3.04k|        bits = max_length - 1;
  585|  4.39k|        while (s->bl_count[bits] == 0) bits--;
  ------------------
  |  Branch (585:16): [True: 1.35k, False: 3.04k]
  ------------------
  586|  3.04k|        s->bl_count[bits]--;        /* move one leaf down the tree */
  587|  3.04k|        s->bl_count[bits + 1] += 2; /* move one overflow item as its brother */
  588|  3.04k|        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.04k|        overflow -= 2;
  593|  3.04k|    } while (overflow > 0);
  ------------------
  |  Branch (593:14): [True: 946, False: 2.09k]
  ------------------
  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|  16.8k|    for (bits = max_length; bits != 0; bits--) {
  ------------------
  |  Branch (600:29): [True: 14.7k, False: 2.09k]
  ------------------
  601|  14.7k|        n = s->bl_count[bits];
  602|  55.7k|        while (n != 0) {
  ------------------
  |  Branch (602:16): [True: 40.9k, False: 14.7k]
  ------------------
  603|  40.9k|            m = s->heap[--h];
  604|  40.9k|            if (m > max_code) continue;
  ------------------
  |  Branch (604:17): [True: 17.0k, False: 23.8k]
  ------------------
  605|  23.8k|            if ((unsigned) tree[m].Len != (unsigned) bits) {
  ------------------
  |  |   86|  23.8k|#define Len  dl.len
  ------------------
  |  Branch (605:17): [True: 3.25k, False: 20.6k]
  ------------------
  606|  3.25k|                Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
  607|  3.25k|                s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
  ------------------
  |  |   86|  3.25k|#define Len  dl.len
  ------------------
                              s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
  ------------------
  |  |   83|  3.25k|#define Freq fc.freq
  ------------------
  608|  3.25k|                tree[m].Len = (ush)bits;
  ------------------
  |  |   86|  3.25k|#define Len  dl.len
  ------------------
  609|  3.25k|            }
  610|  23.8k|            n--;
  611|  23.8k|        }
  612|  14.7k|    }
  613|  2.09k|}
trees.c:gen_codes:
  203|  96.2k|local void gen_codes(ct_data *tree, int max_code, ushf *bl_count) {
  204|  96.2k|    ush next_code[MAX_BITS+1]; /* next code value for each bit length */
  205|  96.2k|    unsigned code = 0;         /* running code value */
  206|  96.2k|    int bits;                  /* bit index */
  207|  96.2k|    int n;                     /* code index */
  208|       |
  209|       |    /* The distribution counts are first used to generate the code values
  210|       |     * without bit reversal.
  211|       |     */
  212|  1.53M|    for (bits = 1; bits <= MAX_BITS; bits++) {
  ------------------
  |  |   52|  1.53M|#define MAX_BITS 15
  ------------------
  |  Branch (212:20): [True: 1.44M, False: 96.2k]
  ------------------
  213|  1.44M|        code = (code + bl_count[bits - 1]) << 1;
  214|  1.44M|        next_code[bits] = (ush)code;
  215|  1.44M|    }
  216|       |    /* Check that the bit counts in bl_count are consistent. The last code
  217|       |     * must be all ones.
  218|       |     */
  219|  96.2k|    Assert (code + bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1,
  220|  96.2k|            "inconsistent bit counts");
  221|  96.2k|    Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
  222|       |
  223|  9.23M|    for (n = 0;  n <= max_code; n++) {
  ------------------
  |  Branch (223:18): [True: 9.14M, False: 96.2k]
  ------------------
  224|  9.14M|        int len = tree[n].Len;
  ------------------
  |  |   86|  9.14M|#define Len  dl.len
  ------------------
  225|  9.14M|        if (len == 0) continue;
  ------------------
  |  Branch (225:13): [True: 6.62M, False: 2.52M]
  ------------------
  226|       |        /* Now reverse the bits */
  227|  2.52M|        tree[n].Code = (ush)bi_reverse(next_code[len]++, len);
  ------------------
  |  |   84|  2.52M|#define Code fc.code
  ------------------
  228|       |
  229|  2.52M|        Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
  230|  2.52M|            n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len] - 1));
  231|  2.52M|    }
  232|  96.2k|}
trees.c:bi_reverse:
  154|  2.52M|local unsigned bi_reverse(unsigned code, int len) {
  155|  2.52M|    unsigned res = 0;
  156|  16.4M|    do {
  157|  16.4M|        res |= code & 1;
  158|  16.4M|        code >>= 1, res <<= 1;
  159|  16.4M|    } while (--len > 0);
  ------------------
  |  Branch (159:14): [True: 13.9M, False: 2.52M]
  ------------------
  160|  2.52M|    return res >> 1;
  161|  2.52M|}
trees.c:build_bl_tree:
  800|  32.0k|local int build_bl_tree(deflate_state *s) {
  801|  32.0k|    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|  32.0k|    scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
  805|  32.0k|    scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
  806|       |
  807|       |    /* Build the bit length tree: */
  808|  32.0k|    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|  74.5k|    for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
  ------------------
  |  |   46|  32.0k|#define BL_CODES  19
  ------------------
  |  Branch (817:36): [True: 74.5k, False: 0]
  ------------------
  818|  74.5k|        if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
  ------------------
  |  |   86|  74.5k|#define Len  dl.len
  ------------------
  |  Branch (818:13): [True: 32.0k, False: 42.4k]
  ------------------
  819|  74.5k|    }
  820|       |    /* Update opt_len to include the bit length tree and counts */
  821|  32.0k|    s->opt_len += 3*((ulg)max_blindex + 1) + 5 + 5 + 4;
  822|  32.0k|    Tracev((stderr, "\ndyn trees: dyn %lu, stat %lu",
  823|  32.0k|            s->opt_len, s->static_len));
  824|       |
  825|  32.0k|    return max_blindex;
  826|  32.0k|}
trees.c:scan_tree:
  712|  64.1k|local void scan_tree(deflate_state *s, ct_data *tree, int max_code) {
  713|  64.1k|    int n;                     /* iterates over all tree elements */
  714|  64.1k|    int prevlen = -1;          /* last emitted length */
  715|  64.1k|    int curlen;                /* length of current code */
  716|  64.1k|    int nextlen = tree[0].Len; /* length of next code */
  ------------------
  |  |   86|  64.1k|#define Len  dl.len
  ------------------
  717|  64.1k|    int count = 0;             /* repeat count of the current code */
  718|  64.1k|    int max_count = 7;         /* max repeat count */
  719|  64.1k|    int min_count = 4;         /* min repeat count */
  720|       |
  721|  64.1k|    if (nextlen == 0) max_count = 138, min_count = 3;
  ------------------
  |  Branch (721:9): [True: 10.8k, False: 53.3k]
  ------------------
  722|  64.1k|    tree[max_code + 1].Len = (ush)0xffff; /* guard */
  ------------------
  |  |   86|  64.1k|#define Len  dl.len
  ------------------
  723|       |
  724|  8.60M|    for (n = 0; n <= max_code; n++) {
  ------------------
  |  Branch (724:17): [True: 8.53M, False: 64.1k]
  ------------------
  725|  8.53M|        curlen = nextlen; nextlen = tree[n + 1].Len;
  ------------------
  |  |   86|  8.53M|#define Len  dl.len
  ------------------
  726|  8.53M|        if (++count < max_count && curlen == nextlen) {
  ------------------
  |  Branch (726:13): [True: 8.52M, False: 13.7k]
  |  Branch (726:36): [True: 5.83M, False: 2.69M]
  ------------------
  727|  5.83M|            continue;
  728|  5.83M|        } else if (count < min_count) {
  ------------------
  |  Branch (728:20): [True: 2.19M, False: 512k]
  ------------------
  729|  2.19M|            s->bl_tree[curlen].Freq += (ush)count;
  ------------------
  |  |   83|  2.19M|#define Freq fc.freq
  ------------------
  730|  2.19M|        } else if (curlen != 0) {
  ------------------
  |  Branch (730:20): [True: 46.0k, False: 466k]
  ------------------
  731|  46.0k|            if (curlen != prevlen) s->bl_tree[curlen].Freq++;
  ------------------
  |  |   83|  42.4k|#define Freq fc.freq
  ------------------
  |  Branch (731:17): [True: 42.4k, False: 3.58k]
  ------------------
  732|  46.0k|            s->bl_tree[REP_3_6].Freq++;
  ------------------
  |  |   53|  46.0k|#define REP_3_6      16
  ------------------
                          s->bl_tree[REP_3_6].Freq++;
  ------------------
  |  |   83|  46.0k|#define Freq fc.freq
  ------------------
  733|   466k|        } else if (count <= 10) {
  ------------------
  |  Branch (733:20): [True: 353k, False: 112k]
  ------------------
  734|   353k|            s->bl_tree[REPZ_3_10].Freq++;
  ------------------
  |  |   56|   353k|#define REPZ_3_10    17
  ------------------
                          s->bl_tree[REPZ_3_10].Freq++;
  ------------------
  |  |   83|   353k|#define Freq fc.freq
  ------------------
  735|   353k|        } else {
  736|   112k|            s->bl_tree[REPZ_11_138].Freq++;
  ------------------
  |  |   59|   112k|#define REPZ_11_138  18
  ------------------
                          s->bl_tree[REPZ_11_138].Freq++;
  ------------------
  |  |   83|   112k|#define Freq fc.freq
  ------------------
  737|   112k|        }
  738|  2.70M|        count = 0; prevlen = curlen;
  739|  2.70M|        if (nextlen == 0) {
  ------------------
  |  Branch (739:13): [True: 993k, False: 1.71M]
  ------------------
  740|   993k|            max_count = 138, min_count = 3;
  741|  1.71M|        } else if (curlen == nextlen) {
  ------------------
  |  Branch (741:20): [True: 5.96k, False: 1.70M]
  ------------------
  742|  5.96k|            max_count = 6, min_count = 3;
  743|  1.70M|        } else {
  744|  1.70M|            max_count = 7, min_count = 4;
  745|  1.70M|        }
  746|  2.70M|    }
  747|  64.1k|}
trees.c:compress_block:
  901|  25.0k|                          const ct_data *dtree) {
  902|  25.0k|    unsigned dist;      /* distance of matched string */
  903|  25.0k|    int lc;             /* match length or unmatched char (if dist == 0) */
  904|  25.0k|    unsigned sx = 0;    /* running index in symbol buffers */
  905|  25.0k|    unsigned code;      /* the code to send */
  906|  25.0k|    int extra;          /* number of extra bits to send */
  907|       |
  908|  10.0M|    if (s->sym_next != 0) do {
  ------------------
  |  Branch (908:9): [True: 24.7k, False: 287]
  ------------------
  909|       |#ifdef LIT_MEM
  910|       |        dist = s->d_buf[sx];
  911|       |        lc = s->l_buf[sx++];
  912|       |#else
  913|  10.0M|        dist = s->sym_buf[sx++] & 0xff;
  914|  10.0M|        dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8;
  915|  10.0M|        lc = s->sym_buf[sx++];
  916|  10.0M|#endif
  917|  10.0M|        if (dist == 0) {
  ------------------
  |  Branch (917:13): [True: 9.65M, False: 427k]
  ------------------
  918|  9.65M|            send_code(s, lc, ltree); /* send a literal byte */
  ------------------
  |  |  239|  9.65M|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|  9.65M|#define send_bits(s, value, length) \
  |  |  |  |  275|  9.65M|{ int len = length;\
  |  |  |  |  276|  9.65M|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  9.65M|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 3.28M, False: 6.36M]
  |  |  |  |  ------------------
  |  |  |  |  277|  3.28M|    int val = (int)value;\
  |  |  |  |  278|  3.28M|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  3.28M|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  3.28M|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  3.28M|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  3.28M|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  3.28M|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  3.28M|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  3.28M|}
  |  |  |  |  ------------------
  |  |  |  |  280|  3.28M|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  3.28M|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  3.28M|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  3.28M|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  6.36M|  } else {\
  |  |  |  |  283|  6.36M|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|  6.36M|    s->bi_valid += len;\
  |  |  |  |  285|  6.36M|  }\
  |  |  |  |  286|  9.65M|}
  |  |  ------------------
  ------------------
  919|  9.65M|            Tracecv(isgraph(lc), (stderr," '%c' ", lc));
  920|  9.65M|        } else {
  921|       |            /* Here, lc is the match length - MIN_MATCH */
  922|   427k|            code = _length_code[lc];
  923|   427k|            send_code(s, code + LITERALS + 1, ltree);   /* send length code */
  ------------------
  |  |  239|   427k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|   427k|#define send_bits(s, value, length) \
  |  |  |  |  275|   427k|{ int len = length;\
  |  |  |  |  276|   427k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   427k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 153k, False: 274k]
  |  |  |  |  ------------------
  |  |  |  |  277|   153k|    int val = (int)value;\
  |  |  |  |  278|   153k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|   153k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|   153k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|   153k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   153k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   153k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   153k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   153k|}
  |  |  |  |  ------------------
  |  |  |  |  280|   153k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   153k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|   153k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   153k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|   274k|  } else {\
  |  |  |  |  283|   274k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|   274k|    s->bi_valid += len;\
  |  |  |  |  285|   274k|  }\
  |  |  |  |  286|   427k|}
  |  |  ------------------
  ------------------
  924|   427k|            extra = extra_lbits[code];
  925|   427k|            if (extra != 0) {
  ------------------
  |  Branch (925:17): [True: 87.2k, False: 340k]
  ------------------
  926|  87.2k|                lc -= base_length[code];
  927|  87.2k|                send_bits(s, lc, extra);       /* send the extra length bits */
  ------------------
  |  |  274|  87.2k|#define send_bits(s, value, length) \
  |  |  275|  87.2k|{ int len = length;\
  |  |  276|  87.2k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  87.2k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 11.9k, False: 75.2k]
  |  |  ------------------
  |  |  277|  11.9k|    int val = (int)value;\
  |  |  278|  11.9k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  11.9k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  11.9k|#define put_short(s, w) { \
  |  |  |  |  145|  11.9k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  11.9k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  11.9k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  11.9k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  11.9k|}
  |  |  ------------------
  |  |  280|  11.9k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  11.9k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  11.9k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  11.9k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  75.2k|  } else {\
  |  |  283|  75.2k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  75.2k|    s->bi_valid += len;\
  |  |  285|  75.2k|  }\
  |  |  286|  87.2k|}
  ------------------
  928|  87.2k|            }
  929|   427k|            dist--; /* dist is now the match distance - 1 */
  930|   427k|            code = d_code(dist);
  ------------------
  |  |  321|   427k|   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
  |  |  ------------------
  |  |  |  Branch (321:5): [True: 303k, False: 124k]
  |  |  ------------------
  ------------------
  931|   427k|            Assert (code < D_CODES, "bad d_code");
  932|       |
  933|   427k|            send_code(s, code, dtree);       /* send the distance code */
  ------------------
  |  |  239|   427k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|   427k|#define send_bits(s, value, length) \
  |  |  |  |  275|   427k|{ int len = length;\
  |  |  |  |  276|   427k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   427k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 101k, False: 326k]
  |  |  |  |  ------------------
  |  |  |  |  277|   101k|    int val = (int)value;\
  |  |  |  |  278|   101k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|   101k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|   101k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|   101k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   101k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   101k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   101k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   101k|}
  |  |  |  |  ------------------
  |  |  |  |  280|   101k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   101k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|   101k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   101k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|   326k|  } else {\
  |  |  |  |  283|   326k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|   326k|    s->bi_valid += len;\
  |  |  |  |  285|   326k|  }\
  |  |  |  |  286|   427k|}
  |  |  ------------------
  ------------------
  934|   427k|            extra = extra_dbits[code];
  935|   427k|            if (extra != 0) {
  ------------------
  |  Branch (935:17): [True: 319k, False: 108k]
  ------------------
  936|   319k|                dist -= (unsigned)base_dist[code];
  937|   319k|                send_bits(s, (int)dist, extra); /* send the extra bits */
  ------------------
  |  |  274|   319k|#define send_bits(s, value, length) \
  |  |  275|   319k|{ int len = length;\
  |  |  276|   319k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|   319k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 122k, False: 196k]
  |  |  ------------------
  |  |  277|   122k|    int val = (int)value;\
  |  |  278|   122k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|   122k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|   122k|#define put_short(s, w) { \
  |  |  |  |  145|   122k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|   122k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|   122k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|   122k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|   122k|}
  |  |  ------------------
  |  |  280|   122k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|   122k|#define Buf_size 16
  |  |  ------------------
  |  |  281|   122k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|   122k|#define Buf_size 16
  |  |  ------------------
  |  |  282|   196k|  } else {\
  |  |  283|   196k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|   196k|    s->bi_valid += len;\
  |  |  285|   196k|  }\
  |  |  286|   319k|}
  ------------------
  938|   319k|            }
  939|   427k|        } /* 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|  10.0M|        Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow");
  946|  10.0M|#endif
  947|       |
  948|  10.0M|    } while (sx < s->sym_next);
  ------------------
  |  Branch (948:14): [True: 10.0M, False: 24.7k]
  ------------------
  949|       |
  950|  25.0k|    send_code(s, END_BLOCK, ltree);
  ------------------
  |  |  239|  25.0k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|  25.0k|#define send_bits(s, value, length) \
  |  |  |  |  275|  25.0k|{ int len = length;\
  |  |  |  |  276|  25.0k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  25.0k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 9.92k, False: 15.0k]
  |  |  |  |  ------------------
  |  |  |  |  277|  9.92k|    int val = (int)value;\
  |  |  |  |  278|  9.92k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  9.92k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  9.92k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  9.92k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  9.92k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  9.92k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  9.92k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  9.92k|}
  |  |  |  |  ------------------
  |  |  |  |  280|  9.92k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  9.92k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  9.92k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  9.92k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  15.0k|  } else {\
  |  |  |  |  283|  15.0k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|  15.0k|    s->bi_valid += len;\
  |  |  |  |  285|  15.0k|  }\
  |  |  |  |  286|  25.0k|}
  |  |  ------------------
  ------------------
  951|  25.0k|}
trees.c:send_all_trees:
  834|  16.4k|                          int blcodes) {
  835|  16.4k|    int rank;                    /* index in bl_order */
  836|       |
  837|  16.4k|    Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
  838|  16.4k|    Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
  839|  16.4k|            "too many codes");
  840|  16.4k|    Tracev((stderr, "\nbl counts: "));
  841|  16.4k|    send_bits(s, lcodes - 257, 5);  /* not +255 as stated in appnote.txt */
  ------------------
  |  |  274|  16.4k|#define send_bits(s, value, length) \
  |  |  275|  16.4k|{ int len = length;\
  |  |  276|  16.4k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  16.4k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 0, False: 16.4k]
  |  |  ------------------
  |  |  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|  16.4k|  } else {\
  |  |  283|  16.4k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  16.4k|    s->bi_valid += len;\
  |  |  285|  16.4k|  }\
  |  |  286|  16.4k|}
  ------------------
  842|  16.4k|    send_bits(s, dcodes - 1,   5);
  ------------------
  |  |  274|  16.4k|#define send_bits(s, value, length) \
  |  |  275|  16.4k|{ int len = length;\
  |  |  276|  16.4k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  16.4k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 6.67k, False: 9.78k]
  |  |  ------------------
  |  |  277|  6.67k|    int val = (int)value;\
  |  |  278|  6.67k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  6.67k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  6.67k|#define put_short(s, w) { \
  |  |  |  |  145|  6.67k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  6.67k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  6.67k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  6.67k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  6.67k|}
  |  |  ------------------
  |  |  280|  6.67k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  6.67k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  6.67k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  6.67k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  9.78k|  } else {\
  |  |  283|  9.78k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  9.78k|    s->bi_valid += len;\
  |  |  285|  9.78k|  }\
  |  |  286|  16.4k|}
  ------------------
  843|  16.4k|    send_bits(s, blcodes - 4,  4);  /* not -3 as stated in appnote.txt */
  ------------------
  |  |  274|  16.4k|#define send_bits(s, value, length) \
  |  |  275|  16.4k|{ int len = length;\
  |  |  276|  16.4k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  16.4k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 9.78k, False: 6.67k]
  |  |  ------------------
  |  |  277|  9.78k|    int val = (int)value;\
  |  |  278|  9.78k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  9.78k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  9.78k|#define put_short(s, w) { \
  |  |  |  |  145|  9.78k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  9.78k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  9.78k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  9.78k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  9.78k|}
  |  |  ------------------
  |  |  280|  9.78k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  9.78k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  9.78k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  9.78k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  9.78k|  } else {\
  |  |  283|  6.67k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  6.67k|    s->bi_valid += len;\
  |  |  285|  6.67k|  }\
  |  |  286|  16.4k|}
  ------------------
  844|   309k|    for (rank = 0; rank < blcodes; rank++) {
  ------------------
  |  Branch (844:20): [True: 293k, False: 16.4k]
  ------------------
  845|   293k|        Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
  846|   293k|        send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
  ------------------
  |  |  274|   293k|#define send_bits(s, value, length) \
  |  |  275|   293k|{ int len = length;\
  |  |  276|   293k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|   293k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 49.0k, False: 244k]
  |  |  ------------------
  |  |  277|  49.0k|    int val = (int)value;\
  |  |  278|  49.0k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  49.0k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  49.0k|#define put_short(s, w) { \
  |  |  |  |  145|  49.0k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  49.0k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  49.0k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  49.0k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  49.0k|}
  |  |  ------------------
  |  |  280|  49.0k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  49.0k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  49.0k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  49.0k|#define Buf_size 16
  |  |  ------------------
  |  |  282|   244k|  } else {\
  |  |  283|   244k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|   244k|    s->bi_valid += len;\
  |  |  285|   244k|  }\
  |  |  286|   293k|}
  ------------------
  847|   293k|    }
  848|  16.4k|    Tracev((stderr, "\nbl tree: sent %lu", s->bits_sent));
  849|       |
  850|  16.4k|    send_tree(s, (ct_data *)s->dyn_ltree, lcodes - 1);  /* literal tree */
  851|  16.4k|    Tracev((stderr, "\nlit tree: sent %lu", s->bits_sent));
  852|       |
  853|  16.4k|    send_tree(s, (ct_data *)s->dyn_dtree, dcodes - 1);  /* distance tree */
  854|  16.4k|    Tracev((stderr, "\ndist tree: sent %lu", s->bits_sent));
  855|  16.4k|}
trees.c:send_tree:
  753|  32.9k|local void send_tree(deflate_state *s, ct_data *tree, int max_code) {
  754|  32.9k|    int n;                     /* iterates over all tree elements */
  755|  32.9k|    int prevlen = -1;          /* last emitted length */
  756|  32.9k|    int curlen;                /* length of current code */
  757|  32.9k|    int nextlen = tree[0].Len; /* length of next code */
  ------------------
  |  |   86|  32.9k|#define Len  dl.len
  ------------------
  758|  32.9k|    int count = 0;             /* repeat count of the current code */
  759|  32.9k|    int max_count = 7;         /* max repeat count */
  760|  32.9k|    int min_count = 4;         /* min repeat count */
  761|       |
  762|       |    /* tree[max_code + 1].Len = -1; */  /* guard already set */
  763|  32.9k|    if (nextlen == 0) max_count = 138, min_count = 3;
  ------------------
  |  Branch (763:9): [True: 5.32k, False: 27.5k]
  ------------------
  764|       |
  765|  4.38M|    for (n = 0; n <= max_code; n++) {
  ------------------
  |  Branch (765:17): [True: 4.35M, False: 32.9k]
  ------------------
  766|  4.35M|        curlen = nextlen; nextlen = tree[n + 1].Len;
  ------------------
  |  |   86|  4.35M|#define Len  dl.len
  ------------------
  767|  4.35M|        if (++count < max_count && curlen == nextlen) {
  ------------------
  |  Branch (767:13): [True: 4.34M, False: 8.45k]
  |  Branch (767:36): [True: 3.40M, False: 935k]
  ------------------
  768|  3.40M|            continue;
  769|  3.40M|        } else if (count < min_count) {
  ------------------
  |  Branch (769:20): [True: 730k, False: 213k]
  ------------------
  770|   897k|            do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
  ------------------
  |  |  239|   897k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|   897k|#define send_bits(s, value, length) \
  |  |  |  |  275|   897k|{ int len = length;\
  |  |  |  |  276|   897k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   897k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 145k, False: 752k]
  |  |  |  |  ------------------
  |  |  |  |  277|   145k|    int val = (int)value;\
  |  |  |  |  278|   145k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|   145k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|   145k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|   145k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   145k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   145k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   145k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   145k|}
  |  |  |  |  ------------------
  |  |  |  |  280|   145k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   145k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|   145k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   145k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|   752k|  } else {\
  |  |  |  |  283|   752k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|   752k|    s->bi_valid += len;\
  |  |  |  |  285|   752k|  }\
  |  |  |  |  286|   897k|}
  |  |  ------------------
  ------------------
  |  Branch (770:61): [True: 167k, False: 730k]
  ------------------
  771|       |
  772|   730k|        } else if (curlen != 0) {
  ------------------
  |  Branch (772:20): [True: 19.7k, False: 194k]
  ------------------
  773|  19.7k|            if (curlen != prevlen) {
  ------------------
  |  Branch (773:17): [True: 17.6k, False: 2.13k]
  ------------------
  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.26k, False: 15.3k]
  |  |  |  |  ------------------
  |  |  |  |  277|  2.26k|    int val = (int)value;\
  |  |  |  |  278|  2.26k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  2.26k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  2.26k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  2.26k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  2.26k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  2.26k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  2.26k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  2.26k|}
  |  |  |  |  ------------------
  |  |  |  |  280|  2.26k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  2.26k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  2.26k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  2.26k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  15.3k|  } else {\
  |  |  |  |  283|  15.3k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|  15.3k|    s->bi_valid += len;\
  |  |  |  |  285|  15.3k|  }\
  |  |  |  |  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.96k, False: 14.8k]
  |  |  |  |  ------------------
  |  |  |  |  277|  4.96k|    int val = (int)value;\
  |  |  |  |  278|  4.96k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  4.96k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  4.96k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  4.96k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  4.96k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  4.96k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  4.96k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  4.96k|}
  |  |  |  |  ------------------
  |  |  |  |  280|  4.96k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  4.96k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  4.96k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  4.96k|#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|  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.55k, False: 17.2k]
  |  |  ------------------
  |  |  277|  2.55k|    int val = (int)value;\
  |  |  278|  2.55k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  2.55k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  2.55k|#define put_short(s, w) { \
  |  |  |  |  145|  2.55k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  2.55k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  2.55k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  2.55k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  2.55k|}
  |  |  ------------------
  |  |  280|  2.55k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  2.55k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  2.55k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  2.55k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  17.2k|  } else {\
  |  |  283|  17.2k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  17.2k|    s->bi_valid += len;\
  |  |  285|  17.2k|  }\
  |  |  286|  19.7k|}
  ------------------
  778|       |
  779|   194k|        } else if (count <= 10) {
  ------------------
  |  Branch (779:20): [True: 120k, False: 74.0k]
  ------------------
  780|   120k|            send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count - 3, 3);
  ------------------
  |  |  239|   120k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|   120k|#define send_bits(s, value, length) \
  |  |  |  |  275|   120k|{ int len = length;\
  |  |  |  |  276|   120k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   120k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 21.6k, False: 98.4k]
  |  |  |  |  ------------------
  |  |  |  |  277|  21.6k|    int val = (int)value;\
  |  |  |  |  278|  21.6k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  21.6k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  21.6k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  21.6k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  21.6k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  21.6k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  21.6k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  21.6k|}
  |  |  |  |  ------------------
  |  |  |  |  280|  21.6k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  21.6k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  21.6k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  21.6k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  98.4k|  } else {\
  |  |  |  |  283|  98.4k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|  98.4k|    s->bi_valid += len;\
  |  |  |  |  285|  98.4k|  }\
  |  |  |  |  286|   120k|}
  |  |  ------------------
  ------------------
                          send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count - 3, 3);
  ------------------
  |  |  274|   120k|#define send_bits(s, value, length) \
  |  |  275|   120k|{ int len = length;\
  |  |  276|   120k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|   120k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 23.1k, False: 96.9k]
  |  |  ------------------
  |  |  277|  23.1k|    int val = (int)value;\
  |  |  278|  23.1k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  23.1k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  23.1k|#define put_short(s, w) { \
  |  |  |  |  145|  23.1k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  23.1k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  23.1k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  23.1k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  23.1k|}
  |  |  ------------------
  |  |  280|  23.1k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  23.1k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  23.1k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  23.1k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  96.9k|  } else {\
  |  |  283|  96.9k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  96.9k|    s->bi_valid += len;\
  |  |  285|  96.9k|  }\
  |  |  286|   120k|}
  ------------------
  781|       |
  782|   120k|        } else {
  783|  74.0k|            send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count - 11, 7);
  ------------------
  |  |  239|  74.0k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  274|  74.0k|#define send_bits(s, value, length) \
  |  |  |  |  275|  74.0k|{ int len = length;\
  |  |  |  |  276|  74.0k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  74.0k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (276:7): [True: 13.3k, False: 60.7k]
  |  |  |  |  ------------------
  |  |  |  |  277|  13.3k|    int val = (int)value;\
  |  |  |  |  278|  13.3k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  279|  13.3k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  13.3k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  13.3k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  13.3k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  13.3k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  13.3k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  13.3k|}
  |  |  |  |  ------------------
  |  |  |  |  280|  13.3k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  13.3k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  281|  13.3k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  13.3k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  60.7k|  } else {\
  |  |  |  |  283|  60.7k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  284|  60.7k|    s->bi_valid += len;\
  |  |  |  |  285|  60.7k|  }\
  |  |  |  |  286|  74.0k|}
  |  |  ------------------
  ------------------
                          send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count - 11, 7);
  ------------------
  |  |  274|  74.0k|#define send_bits(s, value, length) \
  |  |  275|  74.0k|{ int len = length;\
  |  |  276|  74.0k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  74.0k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (276:7): [True: 32.2k, False: 41.8k]
  |  |  ------------------
  |  |  277|  32.2k|    int val = (int)value;\
  |  |  278|  32.2k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  279|  32.2k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  32.2k|#define put_short(s, w) { \
  |  |  |  |  145|  32.2k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  32.2k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  32.2k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  32.2k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  32.2k|}
  |  |  ------------------
  |  |  280|  32.2k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  32.2k|#define Buf_size 16
  |  |  ------------------
  |  |  281|  32.2k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  32.2k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  41.8k|  } else {\
  |  |  283|  41.8k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  284|  41.8k|    s->bi_valid += len;\
  |  |  285|  41.8k|  }\
  |  |  286|  74.0k|}
  ------------------
  784|  74.0k|        }
  785|   944k|        count = 0; prevlen = curlen;
  786|   944k|        if (nextlen == 0) {
  ------------------
  |  Branch (786:13): [True: 325k, False: 618k]
  ------------------
  787|   325k|            max_count = 138, min_count = 3;
  788|   618k|        } else if (curlen == nextlen) {
  ------------------
  |  Branch (788:20): [True: 3.28k, False: 615k]
  ------------------
  789|  3.28k|            max_count = 6, min_count = 3;
  790|   615k|        } else {
  791|   615k|            max_count = 7, min_count = 4;
  792|   615k|        }
  793|   944k|    }
  794|  32.9k|}

zcalloc:
  299|  28.9k|voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) {
  300|  28.9k|    (void)opaque;
  301|  28.9k|    return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
  ------------------
  |  Branch (301:12): [True: 28.9k, Folded]
  ------------------
  302|  28.9k|                              (voidpf)calloc(items, size);
  303|  28.9k|}
zcfree:
  305|  28.9k|void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) {
  306|  28.9k|    (void)opaque;
  307|  28.9k|    free(ptr);
  308|  28.9k|}

