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

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

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

inflate_fast:
  215|  19.7k|void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) {
  216|  19.7k|    struct inflate_state FAR *state;
  217|  19.7k|    z_const unsigned char FAR *in;      /* local strm->next_in */
  218|  19.7k|    z_const unsigned char FAR *last;    /* have enough input while in < last */
  219|  19.7k|    unsigned char FAR *out;     /* local strm->next_out */
  220|  19.7k|    unsigned char FAR *beg;     /* inflate()'s initial strm->next_out */
  221|  19.7k|    unsigned char FAR *end;     /* while out < end, enough space available */
  222|       |#ifdef INFLATE_STRICT
  223|       |    unsigned dmax;              /* maximum distance from zlib header */
  224|       |#endif
  225|  19.7k|    unsigned wsize;             /* window size or zero if not using window */
  226|  19.7k|    unsigned whave;             /* valid bytes in the window */
  227|  19.7k|    unsigned wnext;             /* window write index */
  228|  19.7k|    unsigned char FAR *window;  /* allocated sliding window, if wsize != 0 */
  229|  19.7k|#if Z_INFLATE_FETCH != 8
  230|  19.7k|    int back;                   /* decoding into the window: inflateBack() */
  231|  19.7k|#endif
  232|  19.7k|    unsigned long hold;         /* local strm->hold */
  233|  19.7k|    unsigned bits;              /* local strm->bits */
  234|  19.7k|    code const FAR *lcode;      /* local strm->lencode */
  235|  19.7k|    code const FAR *dcode;      /* local strm->distcode */
  236|  19.7k|    unsigned lmask;             /* mask for first level of length codes */
  237|  19.7k|    unsigned dmask;             /* mask for first level of distance codes */
  238|  19.7k|    code const *here;           /* retrieved table entry */
  239|  19.7k|    unsigned op;                /* code bits, operation, extra bits, or */
  240|       |                                /*  window position, window bytes to copy */
  241|  19.7k|    unsigned len;               /* match length, unused bytes */
  242|  19.7k|    unsigned dist;              /* match distance */
  243|  19.7k|    unsigned char FAR *from;    /* where to copy match from */
  244|  19.7k|#if Z_INFLATE_FETCH == 64
  245|  19.7k|    Z_U8 hold8;                 /* 64-bit bit buffer of the fast loop */
  ------------------
  |  |   56|  19.7k|#    define Z_U8 unsigned long
  ------------------
  246|  19.7k|    z_const unsigned char FAR *last8;   /* two refills fit after in */
  247|  19.7k|    unsigned char FAR *end8;    /* room for two literals, a match, 15 more */
  248|  19.7k|#endif
  249|       |#if Z_INFLATE_FETCH == 32
  250|       |    Z_U4 hold4;                 /* 32-bit bit buffer of the fast loop */
  251|       |    z_const unsigned char FAR *last4;   /* three refills fit after in */
  252|       |    unsigned char FAR *end4;    /* room for a match and fifteen more */
  253|       |#endif
  254|       |
  255|       |    /* copy state to local variables */
  256|  19.7k|    state = (struct inflate_state FAR *)strm->state;
  257|  19.7k|    in = strm->next_in;
  258|  19.7k|    last = in + (strm->avail_in - 5);
  259|  19.7k|    out = strm->next_out;
  260|  19.7k|    beg = out - (start - strm->avail_out);
  261|  19.7k|    end = out + (strm->avail_out - 257);
  262|       |#ifdef INFLATE_STRICT
  263|       |    dmax = state->dmax;
  264|       |#endif
  265|  19.7k|    wsize = state->wsize;
  266|  19.7k|    whave = state->whave;
  267|  19.7k|    wnext = state->wnext;
  268|  19.7k|    window = state->window;
  269|  19.7k|#if Z_INFLATE_FETCH != 8
  270|       |    /* For inflateBack(), only use the loop at the end, which does not write
  271|       |       past the end of the copy. */
  272|  19.7k|    back = window != Z_NULL && out + strm->avail_out == window + wsize;
  ------------------
  |  |  216|  39.5k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (272:12): [True: 17.7k, False: 2.06k]
  |  Branch (272:32): [True: 0, False: 17.7k]
  ------------------
  273|  19.7k|#endif
  274|  19.7k|    hold = state->hold;
  275|  19.7k|    bits = state->bits;
  276|  19.7k|    lcode = state->lencode;
  277|  19.7k|    dcode = state->distcode;
  278|  19.7k|    lmask = (1U << state->lenbits) - 1;
  279|  19.7k|    dmask = (1U << state->distbits) - 1;
  280|       |
  281|  19.7k|#if Z_INFLATE_FETCH == 64
  282|       |    /* Fast loop, while sixteen bytes are available at in (two refills of eight
  283|       |       bytes, the first advancing in by up to seven) and the output has room
  284|       |       for the longest match plus 17 bytes (one iteration can write two
  285|       |       literals and then a match, and copy_back() may write 15 bytes past the
  286|       |       match). Each length/literal code starts with at least 56 bits in hold8,
  287|       |       enough for a length/distance pair (at most 48 bits). */
  288|  19.7k|    if (!back && strm->avail_in >= 16 && strm->avail_out >= 2 + 258 + 15) {
  ------------------
  |  Branch (288:9): [True: 19.7k, False: 0]
  |  Branch (288:18): [True: 19.7k, False: 0]
  |  Branch (288:42): [True: 19.5k, False: 256]
  ------------------
  289|  19.5k|        last8 = in + (strm->avail_in - 16);
  290|  19.5k|        end8 = out + (strm->avail_out - (2 + 258 + 15));
  291|  19.5k|        hold8 = hold;
  292|  3.31M|        do {
  293|  3.31M|            hold8 |= load64(in) << bits;
  294|  3.31M|            in += (63 - bits) >> 3;
  295|  3.31M|            bits |= 56;
  296|  3.31M|            here = lcode + (hold8 & lmask);
  297|  3.31M|            if (here->op == 0) {        /* up to three literals a refill */
  ------------------
  |  Branch (297:17): [True: 3.11M, False: 205k]
  ------------------
  298|  3.11M|                hold8 >>= here->bits;
  299|  3.11M|                bits -= here->bits;
  300|  3.11M|                TRACE_LITERAL(here);
  301|  3.11M|                *out++ = (unsigned char)(here->val);
  302|  3.11M|                here = lcode + (hold8 & lmask);
  303|  3.11M|                if (here->op == 0) {
  ------------------
  |  Branch (303:21): [True: 2.96M, False: 147k]
  ------------------
  304|  2.96M|                    hold8 >>= here->bits;
  305|  2.96M|                    bits -= here->bits;
  306|  2.96M|                    TRACE_LITERAL(here);
  307|  2.96M|                    *out++ = (unsigned char)(here->val);
  308|  2.96M|                    here = lcode + (hold8 & lmask);
  309|  2.96M|                    if (here->op == 0) {
  ------------------
  |  Branch (309:25): [True: 2.88M, False: 80.6k]
  ------------------
  310|  2.88M|                        hold8 >>= here->bits;
  311|  2.88M|                        bits -= here->bits;
  312|  2.88M|                        TRACE_LITERAL(here);
  313|  2.88M|                        *out++ = (unsigned char)(here->val);
  314|  2.88M|                        continue;
  315|  2.88M|                    }
  316|  2.96M|                }
  317|   228k|                hold8 |= load64(in) << bits;    /* 56 bits for a pair */
  318|   228k|                in += (63 - bits) >> 3;
  319|   228k|                bits |= 56;
  320|   228k|            }
  321|   480k|          dolen8:
  322|   480k|            op = (unsigned)(here->bits);
  323|   480k|            hold8 >>= op;
  324|   480k|            bits -= op;
  325|   480k|            op = (unsigned)(here->op);
  326|   480k|            if (op == 0) {                      /* literal */
  ------------------
  |  Branch (326:17): [True: 41.2k, False: 439k]
  ------------------
  327|  41.2k|                TRACE_LITERAL(here);
  328|  41.2k|                *out++ = (unsigned char)(here->val);
  329|  41.2k|            }
  330|   439k|            else if (op & 16) {                 /* length base */
  ------------------
  |  Branch (330:22): [True: 375k, False: 64.2k]
  ------------------
  331|   375k|                len = (unsigned)(here->val);
  332|   375k|                op &= 15;                       /* number of extra bits */
  333|   375k|                len += (unsigned)hold8 & ((1U << op) - 1);
  334|   375k|                hold8 >>= op;
  335|   375k|                bits -= op;
  336|   375k|                Tracevv((stderr, "inflate:         length %u\n", len));
  337|   375k|                here = dcode + (hold8 & dmask);
  338|   375k|              dodist8:
  339|   375k|                op = (unsigned)(here->bits);
  340|   375k|                hold8 >>= op;
  341|   375k|                bits -= op;
  342|   375k|                op = (unsigned)(here->op);
  343|   375k|                if (op & 16) {                  /* distance base */
  ------------------
  |  Branch (343:21): [True: 375k, False: 646]
  ------------------
  344|   375k|                    dist = (unsigned)(here->val);
  345|   375k|                    op &= 15;                   /* number of extra bits */
  346|   375k|                    dist += (unsigned)hold8 & ((1U << op) - 1);
  347|       |#ifdef INFLATE_STRICT
  348|       |                    if (dist > dmax) {
  349|       |                        strm->msg = (z_const char *)
  350|       |                            "invalid distance too far back";
  351|       |                        state->mode = BAD;
  352|       |                        break;
  353|       |                    }
  354|       |#endif
  355|   375k|                    hold8 >>= op;
  356|   375k|                    bits -= op;
  357|   375k|                    Tracevv((stderr, "inflate:         distance %u\n", dist));
  358|   375k|                    op = (unsigned)(out - beg); /* max distance in output */
  359|   375k|                    if (dist > op) {            /* see if copy from window */
  ------------------
  |  Branch (359:25): [True: 5.34k, False: 369k]
  ------------------
  360|  5.34k|                        op = dist - op;         /* distance back in window */
  361|  5.34k|                        if (op > whave) {
  ------------------
  |  Branch (361:29): [True: 0, False: 5.34k]
  ------------------
  362|      0|                            if (state->sane) {
  ------------------
  |  Branch (362:33): [True: 0, False: 0]
  ------------------
  363|      0|                                strm->msg = (z_const char *)
  364|      0|                                    "invalid distance too far back";
  365|      0|                                state->mode = BAD;
  366|      0|                                break;
  367|      0|                            }
  368|       |#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
  369|       |                            if (len <= op - whave) {
  370|       |                                do {
  371|       |                                    *out++ = 0;
  372|       |                                } while (--len);
  373|       |                                continue;
  374|       |                            }
  375|       |                            len -= op - whave;
  376|       |                            do {
  377|       |                                *out++ = 0;
  378|       |                            } while (--op > whave);
  379|       |                            if (op == 0) {
  380|       |                                out = copy_back(out, dist, len);
  381|       |                                continue;
  382|       |                            }
  383|       |#endif
  384|      0|                        }
  385|  5.34k|                        from = window;
  386|  5.34k|                        if (wnext == 0)         /* very common case */
  ------------------
  |  Branch (386:29): [True: 0, False: 5.34k]
  ------------------
  387|      0|                            from += wsize - op;
  388|  5.34k|                        else if (wnext < op) {  /* wrap around window */
  ------------------
  |  Branch (388:34): [True: 0, False: 5.34k]
  ------------------
  389|      0|                            from += wsize + wnext - op;
  390|      0|                            op -= wnext;
  391|      0|                            if (op < len) {     /* end of window, then start */
  ------------------
  |  Branch (391:33): [True: 0, False: 0]
  ------------------
  392|      0|                                zmemcpy(out, from, op);
  ------------------
  |  |  306|      0|#    define zmemcpy memcpy
  ------------------
  393|      0|                                out += op;
  394|      0|                                len -= op;
  395|      0|                                from = window;
  396|      0|                                op = wnext;
  397|      0|                            }
  398|      0|                        }
  399|  5.34k|                        else                    /* contiguous in window */
  400|  5.34k|                            from += wnext - op;
  401|  5.34k|                        if (op > len)
  ------------------
  |  Branch (401:29): [True: 3.95k, False: 1.39k]
  ------------------
  402|  3.95k|                            op = len;
  403|  5.34k|                        zmemcpy(out, from, op); /* from the window */
  ------------------
  |  |  306|  5.34k|#    define zmemcpy memcpy
  ------------------
  404|  5.34k|                        out += op;
  405|  5.34k|                        len -= op;
  406|  5.34k|                        if (len)                /* rest from output */
  ------------------
  |  Branch (406:29): [True: 372, False: 4.97k]
  ------------------
  407|    372|                            out = copy_back(out, dist, len);
  408|  5.34k|                    }
  409|   369k|                    else
  410|   369k|                        out = copy_back(out, dist, len);
  411|   375k|                }
  412|    646|                else if ((op & 64) == 0) {      /* 2nd level distance code */
  ------------------
  |  Branch (412:26): [True: 646, False: 0]
  ------------------
  413|    646|                    here = dcode + here->val + (hold8 & ((1U << op) - 1));
  414|    646|                    goto dodist8;
  415|    646|                }
  416|      0|                else {
  417|      0|                    strm->msg = (z_const char *)"invalid distance code";
  418|      0|                    state->mode = BAD;
  419|      0|                    break;
  420|      0|                }
  421|   375k|            }
  422|  64.2k|            else if ((op & 64) == 0) {          /* 2nd level length code */
  ------------------
  |  Branch (422:22): [True: 46.6k, False: 17.6k]
  ------------------
  423|  46.6k|                here = lcode + here->val + (hold8 & ((1U << op) - 1));
  424|  46.6k|                goto dolen8;
  425|  46.6k|            }
  426|  17.6k|            else if (op & 32) {                 /* end-of-block */
  ------------------
  |  Branch (426:22): [True: 17.6k, False: 0]
  ------------------
  427|  17.6k|                Tracevv((stderr, "inflate:         end of block\n"));
  428|  17.6k|                state->mode = TYPE;
  429|  17.6k|                break;
  430|  17.6k|            }
  431|      0|            else {
  432|      0|                strm->msg = (z_const char *)"invalid literal/length code";
  433|      0|                state->mode = BAD;
  434|      0|                break;
  435|      0|            }
  436|  3.30M|        } while (in <= last8 && out <= end8);
  ------------------
  |  Branch (436:18): [True: 3.30M, False: 0]
  |  Branch (436:33): [True: 3.29M, False: 1.91k]
  ------------------
  437|       |
  438|       |        /* return the whole bytes not used, leaving fewer than eight bits */
  439|  19.5k|        len = bits >> 3;
  440|  19.5k|        in -= len;
  441|  19.5k|        bits -= len << 3;
  442|  19.5k|        hold = (unsigned long)(hold8 & ((1U << bits) - 1));
  443|  19.5k|        if (state->mode != LEN || out >= end)
  ------------------
  |  Branch (443:13): [True: 17.6k, False: 1.91k]
  |  Branch (443:35): [True: 402, False: 1.51k]
  ------------------
  444|  18.0k|            goto leave;
  445|  19.5k|    }
  446|  1.77k|#endif
  447|       |#if Z_INFLATE_FETCH == 32
  448|       |    /* Fast loop with a 32-bit bit buffer, refilled four bytes at a time
  449|       |       without branches. This needs eleven bytes available at in (three refills
  450|       |       of four bytes, the first two advancing in by up to three each) and
  451|       |       enough room in the output for the longest match plus 15 bytes (an
  452|       |       iteration writes up to two literals or one match, which copy_back() may
  453|       |       overrun by fifteen bytes). A refill leaves at least 24 bits, enough for
  454|       |       a length/literal code and its extra bits (at most 20), or a distance
  455|       |       code (at most 15). The distance code gets its own refill, and its extra
  456|       |       bits another refill, when too few bits are left for them. */
  457|       |    if (!back && strm->avail_in >= 11 && strm->avail_out >= 258 + 15) {
  458|       |        last4 = in + (strm->avail_in - 11);
  459|       |        end4 = out + (strm->avail_out - (258 + 15));
  460|       |        hold4 = (Z_U4)hold;
  461|       |        do {
  462|       |            hold4 |= load32(in) << bits;
  463|       |            in += (31 - bits) >> 3;
  464|       |            bits |= 24;
  465|       |            here = lcode + (hold4 & lmask);
  466|       |            if (here->op == 0) {        /* a literal, and another */
  467|       |                hold4 >>= here->bits;
  468|       |                bits -= here->bits;
  469|       |                TRACE_LITERAL(here);
  470|       |                *out++ = (unsigned char)(here->val);
  471|       |                here = lcode + (hold4 & lmask);
  472|       |                if (here->op == 0 && (LENBITS <= 12 || here->bits <= bits)) {
  473|       |                    hold4 >>= here->bits;
  474|       |                    bits -= here->bits;
  475|       |                    TRACE_LITERAL(here);
  476|       |                    *out++ = (unsigned char)(here->val);
  477|       |                }
  478|       |                continue;
  479|       |            }
  480|       |          dolen4:
  481|       |            op = (unsigned)(here->bits);
  482|       |            hold4 >>= op;
  483|       |            bits -= op;
  484|       |            op = (unsigned)(here->op);
  485|       |            if (op == 0) {                      /* literal */
  486|       |                TRACE_LITERAL(here);
  487|       |                *out++ = (unsigned char)(here->val);
  488|       |            }
  489|       |            else if (op & 16) {                 /* length base */
  490|       |                len = (unsigned)(here->val);
  491|       |                op &= 15;                       /* number of extra bits */
  492|       |                len += (unsigned)hold4 & ((1U << op) - 1);
  493|       |                hold4 >>= op;
  494|       |                bits -= op;
  495|       |                Tracevv((stderr, "inflate:         length %u\n", len));
  496|       |                hold4 |= load32(in) << bits;    /* for the distance code */
  497|       |                in += (31 - bits) >> 3;
  498|       |                bits |= 24;
  499|       |                here = dcode + (hold4 & dmask);
  500|       |              dodist4:
  501|       |                op = (unsigned)(here->bits);
  502|       |                hold4 >>= op;
  503|       |                bits -= op;
  504|       |                op = (unsigned)(here->op);
  505|       |                if (op & 16) {                  /* distance base */
  506|       |                    dist = (unsigned)(here->val);
  507|       |                    op &= 15;                   /* number of extra bits */
  508|       |                    if (bits < op) {            /* for long distances */
  509|       |                        hold4 |= load32(in) << bits;
  510|       |                        in += (31 - bits) >> 3;
  511|       |                        bits |= 24;
  512|       |                    }
  513|       |                    dist += (unsigned)hold4 & ((1U << op) - 1);
  514|       |#ifdef INFLATE_STRICT
  515|       |                    if (dist > dmax) {
  516|       |                        strm->msg = (z_const char *)
  517|       |                            "invalid distance too far back";
  518|       |                        state->mode = BAD;
  519|       |                        break;
  520|       |                    }
  521|       |#endif
  522|       |                    hold4 >>= op;
  523|       |                    bits -= op;
  524|       |                    Tracevv((stderr, "inflate:         distance %u\n", dist));
  525|       |                    op = (unsigned)(out - beg); /* max distance in output */
  526|       |                    if (dist > op) {            /* see if copy from window */
  527|       |                        op = dist - op;         /* distance back in window */
  528|       |                        if (op > whave) {
  529|       |                            if (state->sane) {
  530|       |                                strm->msg = (z_const char *)
  531|       |                                    "invalid distance too far back";
  532|       |                                state->mode = BAD;
  533|       |                                break;
  534|       |                            }
  535|       |#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
  536|       |                            if (len <= op - whave) {
  537|       |                                do {
  538|       |                                    *out++ = 0;
  539|       |                                } while (--len);
  540|       |                                continue;
  541|       |                            }
  542|       |                            len -= op - whave;
  543|       |                            do {
  544|       |                                *out++ = 0;
  545|       |                            } while (--op > whave);
  546|       |                            if (op == 0) {
  547|       |                                out = copy_back(out, dist, len);
  548|       |                                continue;
  549|       |                            }
  550|       |#endif
  551|       |                        }
  552|       |                        from = window;
  553|       |                        if (wnext == 0)         /* very common case */
  554|       |                            from += wsize - op;
  555|       |                        else if (wnext < op) {  /* wrap around window */
  556|       |                            from += wsize + wnext - op;
  557|       |                            op -= wnext;
  558|       |                            if (op < len) {     /* end of window, then start */
  559|       |                                zmemcpy(out, from, op);
  560|       |                                out += op;
  561|       |                                len -= op;
  562|       |                                from = window;
  563|       |                                op = wnext;
  564|       |                            }
  565|       |                        }
  566|       |                        else                    /* contiguous in window */
  567|       |                            from += wnext - op;
  568|       |                        if (op > len)
  569|       |                            op = len;
  570|       |                        zmemcpy(out, from, op); /* from the window */
  571|       |                        out += op;
  572|       |                        len -= op;
  573|       |                        if (len)                /* rest from output */
  574|       |                            out = copy_back(out, dist, len);
  575|       |                    }
  576|       |                    else
  577|       |                        out = copy_back(out, dist, len);
  578|       |                }
  579|       |                else if ((op & 64) == 0) {      /* 2nd level distance code */
  580|       |                    here = dcode + here->val + (hold4 & ((1U << op) - 1));
  581|       |                    goto dodist4;
  582|       |                }
  583|       |                else {
  584|       |                    strm->msg = (z_const char *)"invalid distance code";
  585|       |                    state->mode = BAD;
  586|       |                    break;
  587|       |                }
  588|       |            }
  589|       |            else if ((op & 64) == 0) {          /* 2nd level length code */
  590|       |                here = lcode + here->val + (hold4 & ((1U << op) - 1));
  591|       |                goto dolen4;
  592|       |            }
  593|       |            else if (op & 32) {                 /* end-of-block */
  594|       |                Tracevv((stderr, "inflate:         end of block\n"));
  595|       |                state->mode = TYPE;
  596|       |                break;
  597|       |            }
  598|       |            else {
  599|       |                strm->msg = (z_const char *)"invalid literal/length code";
  600|       |                state->mode = BAD;
  601|       |                break;
  602|       |            }
  603|       |        } while (in <= last4 && out <= end4);
  604|       |
  605|       |        /* return the whole bytes not used, leaving fewer than eight bits */
  606|       |        len = bits >> 3;
  607|       |        in -= len;
  608|       |        bits -= len << 3;
  609|       |        hold = (unsigned long)(hold4 & ((1U << bits) - 1));
  610|       |        if (state->mode != LEN || in >= last || out >= end)
  611|       |            goto leave;
  612|       |    }
  613|       |#endif
  614|       |
  615|       |    /* decode literals and length/distances until end-of-block or not enough
  616|       |       input data or output space */
  617|  18.4k|    do {
  618|  18.4k|        if (bits < 15) {
  ------------------
  |  Branch (618:13): [True: 7.68k, False: 10.7k]
  ------------------
  619|  7.68k|            hold += (unsigned long)(*in++) << bits;
  620|  7.68k|            bits += 8;
  621|  7.68k|            hold += (unsigned long)(*in++) << bits;
  622|  7.68k|            bits += 8;
  623|  7.68k|        }
  624|  18.4k|        here = lcode + (hold & lmask);
  625|  18.6k|      dolen:
  626|  18.6k|        op = (unsigned)(here->bits);
  627|  18.6k|        hold >>= op;
  628|  18.6k|        bits -= op;
  629|  18.6k|        op = (unsigned)(here->op);
  630|  18.6k|        if (op == 0) {                          /* literal */
  ------------------
  |  Branch (630:13): [True: 17.0k, False: 1.57k]
  ------------------
  631|  17.0k|            Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ?
  632|  17.0k|                    "inflate:         literal '%c'\n" :
  633|  17.0k|                    "inflate:         literal 0x%02x\n", here->val));
  634|  17.0k|            *out++ = (unsigned char)(here->val);
  635|  17.0k|        }
  636|  1.57k|        else if (op & 16) {                     /* length base */
  ------------------
  |  Branch (636:18): [True: 1.28k, False: 293]
  ------------------
  637|  1.28k|            len = (unsigned)(here->val);
  638|  1.28k|            op &= 15;                           /* number of extra bits */
  639|  1.28k|            if (op) {
  ------------------
  |  Branch (639:17): [True: 292, False: 988]
  ------------------
  640|    292|                if (bits < op) {
  ------------------
  |  Branch (640:21): [True: 1, False: 291]
  ------------------
  641|      1|                    hold += (unsigned long)(*in++) << bits;
  642|      1|                    bits += 8;
  643|      1|                }
  644|    292|                len += (unsigned)hold & ((1U << op) - 1);
  645|    292|                hold >>= op;
  646|    292|                bits -= op;
  647|    292|            }
  648|  1.28k|            Tracevv((stderr, "inflate:         length %u\n", len));
  649|  1.28k|            if (bits < 15) {
  ------------------
  |  Branch (649:17): [True: 548, False: 732]
  ------------------
  650|    548|                hold += (unsigned long)(*in++) << bits;
  651|    548|                bits += 8;
  652|    548|                hold += (unsigned long)(*in++) << bits;
  653|    548|                bits += 8;
  654|    548|            }
  655|  1.28k|            here = dcode + (hold & dmask);
  656|  1.29k|          dodist:
  657|  1.29k|            op = (unsigned)(here->bits);
  658|  1.29k|            hold >>= op;
  659|  1.29k|            bits -= op;
  660|  1.29k|            op = (unsigned)(here->op);
  661|  1.29k|            if (op & 16) {                      /* distance base */
  ------------------
  |  Branch (661:17): [True: 1.28k, False: 12]
  ------------------
  662|  1.28k|                dist = (unsigned)(here->val);
  663|  1.28k|                op &= 15;                       /* number of extra bits */
  664|  1.28k|                if (bits < op) {
  ------------------
  |  Branch (664:21): [True: 17, False: 1.26k]
  ------------------
  665|     17|                    hold += (unsigned long)(*in++) << bits;
  666|     17|                    bits += 8;
  667|     17|                    if (bits < op) {
  ------------------
  |  Branch (667:25): [True: 1, False: 16]
  ------------------
  668|      1|                        hold += (unsigned long)(*in++) << bits;
  669|      1|                        bits += 8;
  670|      1|                    }
  671|     17|                }
  672|  1.28k|                dist += (unsigned)hold & ((1U << op) - 1);
  673|       |#ifdef INFLATE_STRICT
  674|       |                if (dist > dmax) {
  675|       |                    strm->msg = (z_const char *)
  676|       |                        "invalid distance too far back";
  677|       |                    state->mode = BAD;
  678|       |                    break;
  679|       |                }
  680|       |#endif
  681|  1.28k|                hold >>= op;
  682|  1.28k|                bits -= op;
  683|  1.28k|                Tracevv((stderr, "inflate:         distance %u\n", dist));
  684|  1.28k|                op = (unsigned)(out - beg);     /* max distance in output */
  685|  1.28k|                if (dist > op) {                /* see if copy from window */
  ------------------
  |  Branch (685:21): [True: 226, False: 1.05k]
  ------------------
  686|    226|                    op = dist - op;             /* distance back in window */
  687|    226|                    if (op > whave) {
  ------------------
  |  Branch (687:25): [True: 0, False: 226]
  ------------------
  688|      0|                        if (state->sane) {
  ------------------
  |  Branch (688:29): [True: 0, False: 0]
  ------------------
  689|      0|                            strm->msg = (z_const char *)
  690|      0|                                "invalid distance too far back";
  691|      0|                            state->mode = BAD;
  692|      0|                            break;
  693|      0|                        }
  694|       |#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
  695|       |                        if (len <= op - whave) {
  696|       |                            do {
  697|       |                                *out++ = 0;
  698|       |                            } while (--len);
  699|       |                            continue;
  700|       |                        }
  701|       |                        len -= op - whave;
  702|       |                        do {
  703|       |                            *out++ = 0;
  704|       |                        } while (--op > whave);
  705|       |                        if (op == 0) {
  706|       |                            from = out - dist;
  707|       |                            do {
  708|       |                                *out++ = *from++;
  709|       |                            } while (--len);
  710|       |                            continue;
  711|       |                        }
  712|       |#endif
  713|      0|                    }
  714|    226|                    from = window;
  715|    226|                    if (wnext == 0) {           /* very common case */
  ------------------
  |  Branch (715:25): [True: 0, False: 226]
  ------------------
  716|      0|                        from += wsize - op;
  717|      0|                        if (op < len) {         /* some from window */
  ------------------
  |  Branch (717:29): [True: 0, False: 0]
  ------------------
  718|      0|                            len -= op;
  719|      0|                            do {
  720|      0|                                *out++ = *from++;
  721|      0|                            } while (--op);
  ------------------
  |  Branch (721:38): [True: 0, False: 0]
  ------------------
  722|      0|                            from = out - dist;  /* rest from output */
  723|      0|                        }
  724|      0|                    }
  725|    226|                    else if (wnext < op) {      /* wrap around window */
  ------------------
  |  Branch (725:30): [True: 0, False: 226]
  ------------------
  726|      0|                        from += wsize + wnext - op;
  727|      0|                        op -= wnext;
  728|      0|                        if (op < len) {         /* some from end of window */
  ------------------
  |  Branch (728:29): [True: 0, False: 0]
  ------------------
  729|      0|                            len -= op;
  730|      0|                            do {
  731|      0|                                *out++ = *from++;
  732|      0|                            } while (--op);
  ------------------
  |  Branch (732:38): [True: 0, False: 0]
  ------------------
  733|      0|                            from = window;
  734|      0|                            if (wnext < len) {  /* some from start of window */
  ------------------
  |  Branch (734:33): [True: 0, False: 0]
  ------------------
  735|      0|                                op = wnext;
  736|      0|                                len -= op;
  737|      0|                                do {
  738|      0|                                    *out++ = *from++;
  739|      0|                                } while (--op);
  ------------------
  |  Branch (739:42): [True: 0, False: 0]
  ------------------
  740|      0|                                from = out - dist;      /* rest from output */
  741|      0|                            }
  742|      0|                        }
  743|      0|                    }
  744|    226|                    else {                      /* contiguous in window */
  745|    226|                        from += wnext - op;
  746|    226|                        if (op < len) {         /* some from window */
  ------------------
  |  Branch (746:29): [True: 60, False: 166]
  ------------------
  747|     60|                            len -= op;
  748|  2.48k|                            do {
  749|  2.48k|                                *out++ = *from++;
  750|  2.48k|                            } while (--op);
  ------------------
  |  Branch (750:38): [True: 2.42k, False: 60]
  ------------------
  751|     60|                            from = out - dist;  /* rest from output */
  752|     60|                        }
  753|    226|                    }
  754|  2.34k|                    while (len > 2) {
  ------------------
  |  Branch (754:28): [True: 2.11k, False: 226]
  ------------------
  755|  2.11k|                        *out++ = *from++;
  756|  2.11k|                        *out++ = *from++;
  757|  2.11k|                        *out++ = *from++;
  758|  2.11k|                        len -= 3;
  759|  2.11k|                    }
  760|    226|                    if (len) {
  ------------------
  |  Branch (760:25): [True: 114, False: 112]
  ------------------
  761|    114|                        *out++ = *from++;
  762|    114|                        if (len > 1)
  ------------------
  |  Branch (762:29): [True: 55, False: 59]
  ------------------
  763|     55|                            *out++ = *from++;
  764|    114|                    }
  765|    226|                }
  766|  1.05k|                else {
  767|  1.05k|                    from = out - dist;          /* copy direct from output */
  768|  5.11k|                    do {                        /* minimum length is three */
  769|  5.11k|                        *out++ = *from++;
  770|  5.11k|                        *out++ = *from++;
  771|  5.11k|                        *out++ = *from++;
  772|  5.11k|                        len -= 3;
  773|  5.11k|                    } while (len > 2);
  ------------------
  |  Branch (773:30): [True: 4.06k, False: 1.05k]
  ------------------
  774|  1.05k|                    if (len) {
  ------------------
  |  Branch (774:25): [True: 471, False: 583]
  ------------------
  775|    471|                        *out++ = *from++;
  776|    471|                        if (len > 1)
  ------------------
  |  Branch (776:29): [True: 201, False: 270]
  ------------------
  777|    201|                            *out++ = *from++;
  778|    471|                    }
  779|  1.05k|                }
  780|  1.28k|            }
  781|     12|            else if ((op & 64) == 0) {          /* 2nd level distance code */
  ------------------
  |  Branch (781:22): [True: 12, False: 0]
  ------------------
  782|     12|                here = dcode + here->val + (hold & ((1U << op) - 1));
  783|     12|                goto dodist;
  784|     12|            }
  785|      0|            else {
  786|      0|                strm->msg = (z_const char *)"invalid distance code";
  787|      0|                state->mode = BAD;
  788|      0|                break;
  789|      0|            }
  790|  1.29k|        }
  791|    293|        else if ((op & 64) == 0) {              /* 2nd level length code */
  ------------------
  |  Branch (791:18): [True: 177, False: 116]
  ------------------
  792|    177|            here = lcode + here->val + (hold & ((1U << op) - 1));
  793|    177|            goto dolen;
  794|    177|        }
  795|    116|        else if (op & 32) {                     /* end-of-block */
  ------------------
  |  Branch (795:18): [True: 116, False: 0]
  ------------------
  796|    116|            Tracevv((stderr, "inflate:         end of block\n"));
  797|    116|            state->mode = TYPE;
  798|    116|            break;
  799|    116|        }
  800|      0|        else {
  801|      0|            strm->msg = (z_const char *)"invalid literal/length code";
  802|      0|            state->mode = BAD;
  803|      0|            break;
  804|      0|        }
  805|  18.6k|    } while (in < last && out < end);
  ------------------
  |  Branch (805:14): [True: 18.3k, False: 0]
  |  Branch (805:27): [True: 16.7k, False: 1.65k]
  ------------------
  806|       |
  807|  1.77k|#if Z_INFLATE_FETCH != 8
  808|  19.7k|  leave:
  809|  19.7k|#endif
  810|       |    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
  811|  19.7k|    len = bits >> 3;
  812|  19.7k|    in -= len;
  813|  19.7k|    bits -= len << 3;
  814|  19.7k|    hold &= (1U << bits) - 1;
  815|       |
  816|       |    /* update state and return */
  817|  19.7k|    strm->next_in = in;
  818|  19.7k|    strm->next_out = out;
  819|  19.7k|    strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
  ------------------
  |  Branch (819:33): [True: 19.7k, False: 0]
  ------------------
  820|  19.7k|    strm->avail_out = (unsigned)(out < end ?
  ------------------
  |  Branch (820:34): [True: 17.7k, False: 2.05k]
  ------------------
  821|  17.7k|                                 257 + (end - out) : 257 - (out - end));
  822|  19.7k|    state->hold = hold;
  823|  19.7k|    state->bits = bits;
  824|  19.7k|    return;
  825|  1.77k|}
inffast.c:load64:
   76|  3.54M|local Z_U8 load64(z_const unsigned char FAR *p) {
   77|  3.54M|#ifndef Z_INFLATE_BYTES
   78|  3.54M|    Z_U8 v = 1;
  ------------------
  |  |   56|  3.54M|#    define Z_U8 unsigned long
  ------------------
   79|  3.54M|    if (*(unsigned char *)&v) {
  ------------------
  |  Branch (79:9): [True: 3.54M, False: 0]
  ------------------
   80|  3.54M|        zmemcpy(&v, p, 8);
  ------------------
  |  |  306|  3.54M|#    define zmemcpy memcpy
  ------------------
   81|  3.54M|        return v;
   82|  3.54M|    }
   83|      0|#  ifdef Z_BSWAP64
   84|      0|    zmemcpy(&v, p, 8);
  ------------------
  |  |  306|      0|#    define zmemcpy memcpy
  ------------------
   85|      0|    return Z_BSWAP64(v);
  ------------------
  |  |   65|      0|#    define Z_BSWAP64 __builtin_bswap64
  ------------------
   86|      0|#  endif
   87|      0|#endif
   88|      0|    return (Z_U8)p[0] | ((Z_U8)p[1] << 8) | ((Z_U8)p[2] << 16) |
   89|      0|           ((Z_U8)p[3] << 24) | ((Z_U8)p[4] << 32) | ((Z_U8)p[5] << 40) |
   90|      0|           ((Z_U8)p[6] << 48) | ((Z_U8)p[7] << 56);
   91|  3.54M|}
inffast.c:copy_back:
   98|   370k|                                   unsigned len) {
   99|   370k|    unsigned char FAR *from = out - dist;
  100|   370k|    unsigned char FAR *stop = out + len;
  101|       |
  102|   370k|    if (dist >= 16) {                   /* sixteen at a time, no overlap */
  ------------------
  |  Branch (102:9): [True: 256k, False: 113k]
  ------------------
  103|   458k|        do {
  104|   458k|            zmemcpy(out, from, 16);
  ------------------
  |  |  306|   458k|#    define zmemcpy memcpy
  ------------------
  105|   458k|            out += 16;
  106|   458k|            from += 16;
  107|   458k|        } while (out < stop);
  ------------------
  |  Branch (107:18): [True: 201k, False: 256k]
  ------------------
  108|   256k|        return stop;
  109|   256k|    }
  110|   113k|    if (dist >= 8) {                    /* eight at a time, no overlap */
  ------------------
  |  Branch (110:9): [True: 22.4k, False: 91.4k]
  ------------------
  111|  27.9k|        do {
  112|  27.9k|            zmemcpy(out, from, 8);
  ------------------
  |  |  306|  27.9k|#    define zmemcpy memcpy
  ------------------
  113|  27.9k|            out += 8;
  114|  27.9k|            from += 8;
  115|  27.9k|        } while (out < stop);
  ------------------
  |  Branch (115:18): [True: 5.46k, False: 22.4k]
  ------------------
  116|  22.4k|        return stop;
  117|  22.4k|    }
  118|  91.4k|    if (dist == 1) {                    /* a run of one byte, eight at once */
  ------------------
  |  Branch (118:9): [True: 74.2k, False: 17.2k]
  ------------------
  119|  74.2k|#ifdef Z_U8
  120|  74.2k|        Z_U8 run = *from;
  ------------------
  |  |   56|  74.2k|#    define Z_U8 unsigned long
  ------------------
  121|  74.2k|        run |= run << 8;
  122|  74.2k|        run |= run << 16;
  123|  74.2k|        run |= run << 32;
  124|   648k|        do {
  125|   648k|            zmemcpy(out, &run, 8);
  ------------------
  |  |  306|   648k|#    define zmemcpy memcpy
  ------------------
  126|   648k|            out += 8;
  127|   648k|        } while (out < stop);
  ------------------
  |  Branch (127:18): [True: 574k, False: 74.2k]
  ------------------
  128|       |#else
  129|       |        Z_U4 run = *from;
  130|       |        run |= run << 8;
  131|       |        run |= run << 16;
  132|       |        do {
  133|       |            zmemcpy(out, &run, 4);
  134|       |            zmemcpy(out + 4, &run, 4);
  135|       |            out += 8;
  136|       |        } while (out < stop);
  137|       |#endif
  138|  74.2k|        return stop;
  139|  74.2k|    }
  140|       |    /* dist 2..7: eight bytes per step, of which the first dist are right;
  141|       |       the next step rewrites the rest. All eight are read before any are
  142|       |       written, since they overlap. */
  143|  24.8k|    do {
  144|  24.8k|#ifdef Z_U8
  145|  24.8k|        Z_U8 v;
  ------------------
  |  |   56|  24.8k|#    define Z_U8 unsigned long
  ------------------
  146|  24.8k|        zmemcpy(&v, from, 8);
  ------------------
  |  |  306|  24.8k|#    define zmemcpy memcpy
  ------------------
  147|  24.8k|        zmemcpy(out, &v, 8);
  ------------------
  |  |  306|  24.8k|#    define zmemcpy memcpy
  ------------------
  148|       |#else
  149|       |        Z_U4 v0, v1;
  150|       |        zmemcpy(&v0, from, 4);
  151|       |        zmemcpy(&v1, from + 4, 4);
  152|       |        zmemcpy(out, &v0, 4);
  153|       |        zmemcpy(out + 4, &v1, 4);
  154|       |#endif
  155|  24.8k|        out += dist;
  156|  24.8k|        from += dist;
  157|  24.8k|    } while (out < stop);
  ------------------
  |  Branch (157:14): [True: 7.66k, False: 17.2k]
  ------------------
  158|  17.2k|    return stop;
  159|  91.4k|}

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

inflate_table:
   48|  44.9k|                                unsigned FAR *bits, unsigned short FAR *work) {
   49|  44.9k|    unsigned len;               /* a code's length in bits */
   50|  44.9k|    unsigned sym;               /* index of code symbols */
   51|  44.9k|    unsigned min, max;          /* minimum and maximum code lengths */
   52|  44.9k|    unsigned root;              /* number of index bits for root table */
   53|  44.9k|    unsigned curr;              /* number of index bits for current table */
   54|  44.9k|    unsigned drop;              /* code bits to drop for sub-table */
   55|  44.9k|    int left;                   /* number of prefix codes available */
   56|  44.9k|    unsigned used;              /* code entries in table used */
   57|  44.9k|    unsigned huff;              /* Huffman code */
   58|  44.9k|    unsigned incr;              /* for incrementing code, index */
   59|  44.9k|    unsigned fill;              /* index for replicating entries */
   60|  44.9k|    unsigned low;               /* low bits for current root entry */
   61|  44.9k|    unsigned mask;              /* mask for low root bits */
   62|  44.9k|    code here;                  /* table entry for duplication */
   63|  44.9k|    code FAR *next;             /* next available space in table */
   64|  44.9k|    const unsigned short FAR *base = NULL;  /* base value table to use */
   65|  44.9k|    const unsigned short FAR *extra = NULL; /* extra bits table to use */
   66|  44.9k|    unsigned match = 0;         /* use base and extra for symbol >= match */
   67|  44.9k|    unsigned short count[MAXBITS+1];    /* number of codes of each length */
   68|  44.9k|    unsigned short offs[MAXBITS+1];     /* offsets in table for each length */
   69|  44.9k|    static const unsigned short lbase[31] = { /* Length codes 257..285 base */
   70|  44.9k|        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
   71|  44.9k|        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
   72|  44.9k|    static const unsigned short lext[31] = { /* Length codes 257..285 extra */
   73|  44.9k|        16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
   74|  44.9k|        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 199, 192};
   75|  44.9k|    static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
   76|  44.9k|        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
   77|  44.9k|        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
   78|  44.9k|        8193, 12289, 16385, 24577, 0, 0};
   79|  44.9k|    static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
   80|  44.9k|        16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
   81|  44.9k|        23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
   82|  44.9k|        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|   763k|    for (len = 0; len <= MAXBITS; len++)
  ------------------
  |  |   23|   763k|#define MAXBITS 15
  ------------------
  |  Branch (116:19): [True: 718k, False: 44.9k]
  ------------------
  117|   718k|        count[len] = 0;
  118|  4.28M|    for (sym = 0; sym < codes; sym++)
  ------------------
  |  Branch (118:19): [True: 4.23M, False: 44.9k]
  ------------------
  119|  4.23M|        count[lens[sym]]++;
  120|       |
  121|       |    /* bound code lengths, force root to be within code lengths */
  122|  44.9k|    root = *bits;
  123|   541k|    for (max = MAXBITS; max >= 1; max--)
  ------------------
  |  |   23|  44.9k|#define MAXBITS 15
  ------------------
  |  Branch (123:25): [True: 541k, False: 0]
  ------------------
  124|   541k|        if (count[max] != 0) break;
  ------------------
  |  Branch (124:13): [True: 44.9k, False: 496k]
  ------------------
  125|  44.9k|    if (root > max) root = max;
  ------------------
  |  Branch (125:9): [True: 42.1k, False: 2.77k]
  ------------------
  126|  44.9k|    if (max == 0) {                     /* no symbols to code at all */
  ------------------
  |  Branch (126:9): [True: 0, False: 44.9k]
  ------------------
  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|  72.8k|    for (min = 1; min < max; min++)
  ------------------
  |  Branch (135:19): [True: 55.0k, False: 17.7k]
  ------------------
  136|  55.0k|        if (count[min] != 0) break;
  ------------------
  |  Branch (136:13): [True: 27.1k, False: 27.8k]
  ------------------
  137|  44.9k|    if (root < min) root = min;
  ------------------
  |  Branch (137:9): [True: 0, False: 44.9k]
  ------------------
  138|       |
  139|       |    /* check for an over-subscribed or incomplete set of lengths */
  140|  44.9k|    left = 1;
  141|   718k|    for (len = 1; len <= MAXBITS; len++) {
  ------------------
  |  |   23|   718k|#define MAXBITS 15
  ------------------
  |  Branch (141:19): [True: 673k, False: 44.9k]
  ------------------
  142|   673k|        left <<= 1;
  143|   673k|        left -= count[len];
  144|   673k|        if (left < 0) return -1;        /* over-subscribed */
  ------------------
  |  Branch (144:13): [True: 0, False: 673k]
  ------------------
  145|   673k|    }
  146|  44.9k|    if (left > 0 && (type == CODES || max != 1))
  ------------------
  |  Branch (146:9): [True: 0, False: 44.9k]
  |  Branch (146:22): [True: 0, False: 0]
  |  Branch (146:39): [True: 0, False: 0]
  ------------------
  147|      0|        return -1;                      /* incomplete set */
  148|       |
  149|       |    /* generate offsets into symbol table for each length for sorting */
  150|  44.9k|    offs[1] = 0;
  151|   673k|    for (len = 1; len < MAXBITS; len++)
  ------------------
  |  |   23|   673k|#define MAXBITS 15
  ------------------
  |  Branch (151:19): [True: 628k, False: 44.9k]
  ------------------
  152|   628k|        offs[len + 1] = offs[len] + count[len];
  153|       |
  154|       |    /* sort symbols by length, by symbol order within each length */
  155|  4.28M|    for (sym = 0; sym < codes; sym++)
  ------------------
  |  Branch (155:19): [True: 4.23M, False: 44.9k]
  ------------------
  156|  4.23M|        if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
  ------------------
  |  Branch (156:13): [True: 781k, False: 3.45M]
  ------------------
  157|       |
  158|       |    /*
  159|       |       Create and fill in decoding tables.  In this loop, the table being
  160|       |       filled is at next and has curr index bits.  The code being used is huff
  161|       |       with length len.  That code is converted to an index by dropping drop
  162|       |       bits off of the bottom.  For codes where len is less than drop + curr,
  163|       |       those top drop + curr - len bits are incremented through all values to
  164|       |       fill the table with replicated entries.
  165|       |
  166|       |       root is the number of index bits for the root table.  When len exceeds
  167|       |       root, sub-tables are created pointed to by the root entry with an index
  168|       |       of the low root bits of huff.  This is saved in low to check for when a
  169|       |       new sub-table should be started.  drop is zero when the root table is
  170|       |       being filled, and drop is root when sub-tables are being filled.
  171|       |
  172|       |       When a new sub-table is needed, it is necessary to look ahead in the
  173|       |       code lengths to determine what size sub-table is needed.  The length
  174|       |       counts are used for this, and so count[] is decremented as codes are
  175|       |       entered in the tables.
  176|       |
  177|       |       used keeps track of how many table entries have been allocated from the
  178|       |       provided *table space.  It is checked for LENS and DIST tables against
  179|       |       the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
  180|       |       the initial root table size constants.  See the comments in inftrees.h
  181|       |       for more information.
  182|       |
  183|       |       sym increments through all symbols, and the loop terminates when
  184|       |       all codes of length max, i.e. all codes, have been processed.  This
  185|       |       routine permits incomplete codes, so another loop after this one fills
  186|       |       in the rest of the decoding tables with invalid code markers.
  187|       |     */
  188|       |
  189|       |    /* set up for code type */
  190|  44.9k|    switch (type) {
  ------------------
  |  Branch (190:13): [True: 44.9k, False: 0]
  ------------------
  191|  14.9k|    case CODES:
  ------------------
  |  Branch (191:5): [True: 14.9k, False: 29.9k]
  ------------------
  192|  14.9k|        match = 20;
  193|  14.9k|        break;
  194|  14.9k|    case LENS:
  ------------------
  |  Branch (194:5): [True: 14.9k, False: 29.9k]
  ------------------
  195|  14.9k|        base = lbase;
  196|  14.9k|        extra = lext;
  197|  14.9k|        match = 257;
  198|  14.9k|        break;
  199|  14.9k|    case DISTS:
  ------------------
  |  Branch (199:5): [True: 14.9k, False: 29.9k]
  ------------------
  200|  14.9k|        base = dbase;
  201|  14.9k|        extra = dext;
  202|  44.9k|    }
  203|       |
  204|       |    /* initialize state for loop */
  205|  44.9k|    huff = 0;                   /* starting code */
  206|  44.9k|    sym = 0;                    /* starting code symbol */
  207|  44.9k|    len = min;                  /* starting code length */
  208|  44.9k|    next = *table;              /* current table to fill in */
  209|  44.9k|    curr = root;                /* current table index bits */
  210|  44.9k|    drop = 0;                   /* current bits to drop from code for index */
  211|  44.9k|    low = (unsigned)(-1);       /* trigger new sub-table when len > root */
  212|  44.9k|    used = 1U << root;          /* use root table entries */
  213|  44.9k|    mask = used - 1;            /* mask for comparing low */
  214|       |
  215|       |    /* check available table space */
  216|  44.9k|    if ((type == LENS && used > ENOUGH_LENS) ||
  ------------------
  |  |   50|  14.9k|#  define ENOUGH_LENS 1332
  ------------------
  |  Branch (216:10): [True: 14.9k, False: 29.9k]
  |  Branch (216:26): [True: 0, False: 14.9k]
  ------------------
  217|  44.9k|        (type == DISTS && used > ENOUGH_DISTS))
  ------------------
  |  |   51|  14.9k|#  define ENOUGH_DISTS 400
  ------------------
  |  Branch (217:10): [True: 14.9k, False: 29.9k]
  |  Branch (217:27): [True: 0, False: 14.9k]
  ------------------
  218|      0|        return 1;
  219|       |
  220|       |    /* process all codes and make table entries */
  221|   781k|    for (;;) {
  222|       |        /* create table entry */
  223|   781k|        here.bits = (unsigned char)(len - drop);
  224|   781k|        if (work[sym] + 1U < match) {
  ------------------
  |  Branch (224:13): [True: 698k, False: 82.4k]
  ------------------
  225|   698k|            here.op = (unsigned char)0;
  226|   698k|            here.val = work[sym];
  227|   698k|        }
  228|  82.4k|        else if (work[sym] >= match) {
  ------------------
  |  Branch (228:18): [True: 67.4k, False: 14.9k]
  ------------------
  229|  67.4k|            here.op = (unsigned char)(extra[work[sym] - match]);
  230|  67.4k|            here.val = base[work[sym] - match];
  231|  67.4k|        }
  232|  14.9k|        else {
  233|  14.9k|            here.op = (unsigned char)(32 + 64);         /* end of block */
  234|  14.9k|            here.val = 0;
  235|  14.9k|        }
  236|       |
  237|       |        /* replicate for those indices with low len bits equal to huff */
  238|   781k|        incr = 1U << (len - drop);
  239|   781k|        fill = 1U << curr;
  240|   781k|        min = fill;                 /* save offset to next table */
  241|  3.31M|        do {
  242|  3.31M|            fill -= incr;
  243|  3.31M|            next[(huff >> drop) + fill] = here;
  244|  3.31M|        } while (fill != 0);
  ------------------
  |  Branch (244:18): [True: 2.53M, False: 781k]
  ------------------
  245|       |
  246|       |        /* backwards increment the len-bit code huff */
  247|   781k|        incr = 1U << (len - 1);
  248|  1.51M|        while (huff & incr)
  ------------------
  |  Branch (248:16): [True: 736k, False: 781k]
  ------------------
  249|   736k|            incr >>= 1;
  250|   781k|        if (incr != 0) {
  ------------------
  |  Branch (250:13): [True: 736k, False: 44.9k]
  ------------------
  251|   736k|            huff &= incr - 1;
  252|   736k|            huff += incr;
  253|   736k|        }
  254|  44.9k|        else
  255|  44.9k|            huff = 0;
  256|       |
  257|       |        /* go to next symbol, update count, len */
  258|   781k|        sym++;
  259|   781k|        if (--(count[len]) == 0) {
  ------------------
  |  Branch (259:13): [True: 133k, False: 647k]
  ------------------
  260|   133k|            if (len == max) break;
  ------------------
  |  Branch (260:17): [True: 44.9k, False: 88.6k]
  ------------------
  261|  88.6k|            len = lens[work[sym]];
  262|  88.6k|        }
  263|       |
  264|       |        /* create new sub-table if needed */
  265|   736k|        if (len > root && (huff & mask) != low) {
  ------------------
  |  Branch (265:13): [True: 21.4k, False: 714k]
  |  Branch (265:27): [True: 7.26k, False: 14.2k]
  ------------------
  266|       |            /* if first time, transition to sub-tables */
  267|  7.26k|            if (drop == 0)
  ------------------
  |  Branch (267:17): [True: 619, False: 6.64k]
  ------------------
  268|    619|                drop = root;
  269|       |
  270|       |            /* increment past last table */
  271|  7.26k|            next += min;            /* here min is 1 << curr */
  272|       |
  273|       |            /* determine length of next table */
  274|  7.26k|            curr = len - drop;
  275|  7.26k|            left = (int)(1 << curr);
  276|  7.71k|            while (curr + drop < max) {
  ------------------
  |  Branch (276:20): [True: 4.05k, False: 3.65k]
  ------------------
  277|  4.05k|                left -= count[curr + drop];
  278|  4.05k|                if (left <= 0) break;
  ------------------
  |  Branch (278:21): [True: 3.60k, False: 457]
  ------------------
  279|    457|                curr++;
  280|    457|                left <<= 1;
  281|    457|            }
  282|       |
  283|       |            /* check for enough space */
  284|  7.26k|            used += 1U << curr;
  285|  7.26k|            if ((type == LENS && used > ENOUGH_LENS) ||
  ------------------
  |  |   50|  7.12k|#  define ENOUGH_LENS 1332
  ------------------
  |  Branch (285:18): [True: 7.12k, False: 135]
  |  Branch (285:34): [True: 0, False: 7.12k]
  ------------------
  286|  7.26k|                (type == DISTS && used > ENOUGH_DISTS))
  ------------------
  |  |   51|    135|#  define ENOUGH_DISTS 400
  ------------------
  |  Branch (286:18): [True: 135, False: 7.12k]
  |  Branch (286:35): [True: 0, False: 135]
  ------------------
  287|      0|                return 1;
  288|       |
  289|       |            /* point entry in root table to sub-table */
  290|  7.26k|            low = huff & mask;
  291|  7.26k|            (*table)[low].op = (unsigned char)curr;
  292|  7.26k|            (*table)[low].bits = (unsigned char)root;
  293|  7.26k|            (*table)[low].val = (unsigned short)(next - *table);
  294|  7.26k|        }
  295|   736k|    }
  296|       |
  297|       |    /* fill in remaining table entry if code is incomplete (guaranteed to have
  298|       |       at most one remaining entry, since if the code is incomplete, the
  299|       |       maximum code length that was allowed to get this far is one bit) */
  300|  44.9k|    if (huff != 0) {
  ------------------
  |  Branch (300:9): [True: 0, False: 44.9k]
  ------------------
  301|      0|        here.op = (unsigned char)64;            /* invalid code marker */
  302|      0|        here.bits = (unsigned char)(len - drop);
  303|      0|        here.val = (unsigned short)0;
  304|      0|        next[huff] = here;
  305|      0|    }
  306|       |
  307|       |    /* set return parameters */
  308|  44.9k|    *table += used;
  309|  44.9k|    *bits = root;
  310|  44.9k|    return 0;
  311|  44.9k|}
inflate_fixed:
  364|  7.90k|void inflate_fixed(struct inflate_state FAR *state) {
  365|       |#ifdef BUILDFIXED
  366|       |    z_once(&built, buildtables);
  367|       |#endif /* BUILDFIXED */
  368|  7.90k|    state->lencode = lenfix;
  369|  7.90k|    state->lenbits = 9;
  370|  7.90k|    state->distcode = distfix;
  371|  7.90k|    state->distbits = 5;
  372|  7.90k|}

_tr_init:
  457|  4.15k|void ZLIB_INTERNAL _tr_init(deflate_state *s) {
  458|  4.15k|    tr_static_init();
  459|       |
  460|  4.15k|    s->l_desc.dyn_tree = s->dyn_ltree;
  461|  4.15k|    s->l_desc.stat_desc = &static_l_desc;
  462|       |
  463|  4.15k|    s->d_desc.dyn_tree = s->dyn_dtree;
  464|  4.15k|    s->d_desc.stat_desc = &static_d_desc;
  465|       |
  466|  4.15k|    s->bl_desc.dyn_tree = s->bl_tree;
  467|  4.15k|    s->bl_desc.stat_desc = &static_bl_desc;
  468|       |
  469|  4.15k|    s->bi_buf = 0;
  470|  4.15k|    s->bi_valid = 0;
  471|  4.15k|    s->bi_used = 0;
  472|       |#ifdef ZLIB_DEBUG
  473|       |    s->compressed_len = 0L;
  474|       |    s->bits_sent = 0L;
  475|       |#endif
  476|       |
  477|       |    /* Initialize the first block of the first file: */
  478|  4.15k|    init_block(s);
  479|  4.15k|}
_tr_stored_block:
  862|  7.06k|                                    ulg stored_len, int last) {
  863|  7.06k|    send_bits(s, (STORED_BLOCK<<1) + last, 3);  /* send block type */
  ------------------
  |  |  275|  7.06k|#define send_bits(s, value, length) \
  |  |  276|  7.06k|{ int len = length;\
  |  |  277|  7.06k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  7.06k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (277:7): [True: 0, False: 7.06k]
  |  |  ------------------
  |  |  278|      0|    int val = (int)value;\
  |  |  279|      0|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  280|      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|}
  |  |  ------------------
  |  |  281|      0|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  282|      0|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  283|  7.06k|  } else {\
  |  |  284|  7.06k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  285|  7.06k|    s->bi_valid += len;\
  |  |  286|  7.06k|  }\
  |  |  287|  7.06k|}
  ------------------
  864|  7.06k|    bi_windup(s);        /* align on byte boundary */
  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|    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|}
  ------------------
  867|  7.06k|    if (stored_len)
  ------------------
  |  Branch (867:9): [True: 7.06k, False: 0]
  ------------------
  868|  7.06k|        zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len);
  ------------------
  |  |  306|  7.06k|#    define zmemcpy memcpy
  ------------------
  869|  7.06k|    s->pending += stored_len;
  870|       |#ifdef ZLIB_DEBUG
  871|       |    s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
  872|       |    s->compressed_len += (stored_len + 4) << 3;
  873|       |    s->bits_sent += 2*16;
  874|       |    s->bits_sent += stored_len << 3;
  875|       |#endif
  876|  7.06k|}
_tr_flush_bits:
  881|  38.2k|void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s) {
  882|  38.2k|    bi_flush(s);
  883|  38.2k|}
_tr_flush_block:
  999|  29.9k|                                   ulg stored_len, int last) {
 1000|  29.9k|    ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
 1001|  29.9k|    int max_blindex = 0;  /* index of last bit length code of non zero freq */
 1002|       |
 1003|       |    /* Build the Huffman trees unless a stored block is forced */
 1004|  29.9k|    if (s->level > 0) {
  ------------------
  |  Branch (1004:9): [True: 29.9k, False: 0]
  ------------------
 1005|       |
 1006|       |        /* Check if the file is binary or text */
 1007|  29.9k|        if (s->strm->data_type == Z_UNKNOWN)
  ------------------
  |  |  210|  29.9k|#define Z_UNKNOWN  2
  ------------------
  |  Branch (1007:13): [True: 4.15k, False: 25.7k]
  ------------------
 1008|  4.15k|            s->strm->data_type = detect_data_type(s);
 1009|       |
 1010|       |        /* Construct the literal and distance trees */
 1011|  29.9k|        build_tree(s, (tree_desc *)(&(s->l_desc)));
 1012|  29.9k|        Tracev((stderr, "\nlit data: dyn %lu, stat %lu", s->opt_len,
 1013|  29.9k|                s->static_len));
 1014|       |
 1015|  29.9k|        build_tree(s, (tree_desc *)(&(s->d_desc)));
 1016|  29.9k|        Tracev((stderr, "\ndist data: dyn %lu, stat %lu", s->opt_len,
 1017|  29.9k|                s->static_len));
 1018|       |        /* At this point, opt_len and static_len are the total bit lengths of
 1019|       |         * the compressed block data, excluding the tree representations.
 1020|       |         */
 1021|       |
 1022|       |        /* Build the bit length tree for the above two trees, and get the index
 1023|       |         * in bl_order of the last bit length code to send.
 1024|       |         */
 1025|  29.9k|        max_blindex = build_bl_tree(s);
 1026|       |
 1027|       |        /* Determine the best encoding. Compute the block lengths in bytes. */
 1028|  29.9k|        opt_lenb = (s->opt_len + 3 + 7) >> 3;
 1029|  29.9k|        static_lenb = (s->static_len + 3 + 7) >> 3;
 1030|       |
 1031|  29.9k|        Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
 1032|  29.9k|                opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
 1033|  29.9k|                s->sym_next / 3));
 1034|       |
 1035|  29.9k|#ifndef FORCE_STATIC
 1036|  29.9k|        if (static_lenb <= opt_lenb || s->strategy == Z_FIXED)
  ------------------
  |  |  203|  16.1k|#define Z_FIXED               4
  ------------------
  |  Branch (1036:13): [True: 13.7k, False: 16.1k]
  |  Branch (1036:40): [True: 479, False: 15.6k]
  ------------------
 1037|  14.2k|#endif
 1038|  14.2k|            opt_lenb = static_lenb;
 1039|       |
 1040|  29.9k|    } else {
 1041|      0|        Assert(buf != (char*)0, "lost buf");
 1042|      0|        opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
 1043|      0|    }
 1044|       |
 1045|       |#ifdef FORCE_STORED
 1046|       |    if (buf != (char*)0) { /* force stored block */
 1047|       |#else
 1048|  29.9k|    if (stored_len + 4 <= opt_lenb && buf != (char*)0) {
  ------------------
  |  Branch (1048:9): [True: 7.79k, False: 22.1k]
  |  Branch (1048:39): [True: 7.06k, False: 732]
  ------------------
 1049|       |                       /* 4: two words for the lengths */
 1050|  7.06k|#endif
 1051|       |        /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
 1052|       |         * Otherwise we can't have processed more than WSIZE input bytes since
 1053|       |         * the last block flush, because compression would have been
 1054|       |         * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
 1055|       |         * transform a block into a stored block.
 1056|       |         */
 1057|  7.06k|        _tr_stored_block(s, buf, stored_len, last);
 1058|       |
 1059|  22.8k|    } else if (static_lenb == opt_lenb) {
  ------------------
  |  Branch (1059:16): [True: 7.90k, False: 14.9k]
  ------------------
 1060|  7.90k|        send_bits(s, (STATIC_TREES<<1) + last, 3);
  ------------------
  |  |  275|  7.90k|#define send_bits(s, value, length) \
  |  |  276|  7.90k|{ int len = length;\
  |  |  277|  7.90k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  7.90k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (277:7): [True: 0, False: 7.90k]
  |  |  ------------------
  |  |  278|      0|    int val = (int)value;\
  |  |  279|      0|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  280|      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|}
  |  |  ------------------
  |  |  281|      0|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  282|      0|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  283|  7.90k|  } else {\
  |  |  284|  7.90k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  285|  7.90k|    s->bi_valid += len;\
  |  |  286|  7.90k|  }\
  |  |  287|  7.90k|}
  ------------------
 1061|  7.90k|        compress_block(s, (const ct_data *)static_ltree,
 1062|  7.90k|                       (const ct_data *)static_dtree);
 1063|       |#ifdef ZLIB_DEBUG
 1064|       |        s->compressed_len += 3 + s->static_len;
 1065|       |#endif
 1066|  14.9k|    } else {
 1067|  14.9k|        send_bits(s, (DYN_TREES<<1) + last, 3);
  ------------------
  |  |  275|  14.9k|#define send_bits(s, value, length) \
  |  |  276|  14.9k|{ int len = length;\
  |  |  277|  14.9k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  14.9k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (277:7): [True: 0, False: 14.9k]
  |  |  ------------------
  |  |  278|      0|    int val = (int)value;\
  |  |  279|      0|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  280|      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|}
  |  |  ------------------
  |  |  281|      0|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  282|      0|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  283|  14.9k|  } else {\
  |  |  284|  14.9k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  285|  14.9k|    s->bi_valid += len;\
  |  |  286|  14.9k|  }\
  |  |  287|  14.9k|}
  ------------------
 1068|  14.9k|        send_all_trees(s, s->l_desc.max_code + 1, s->d_desc.max_code + 1,
 1069|  14.9k|                       max_blindex + 1);
 1070|  14.9k|        compress_block(s, (const ct_data *)s->dyn_ltree,
 1071|  14.9k|                       (const ct_data *)s->dyn_dtree);
 1072|       |#ifdef ZLIB_DEBUG
 1073|       |        s->compressed_len += 3 + s->opt_len;
 1074|       |#endif
 1075|  14.9k|    }
 1076|  29.9k|    Assert (s->compressed_len == s->bits_sent, "bad compressed size");
 1077|       |    /* The above check is made mod 2^32, for files larger than 512 MB
 1078|       |     * and uLong implemented on 32 bits.
 1079|       |     */
 1080|  29.9k|    init_block(s);
 1081|       |
 1082|  29.9k|    if (last) {
  ------------------
  |  Branch (1082:9): [True: 4.15k, False: 25.7k]
  ------------------
 1083|  4.15k|        bi_windup(s);
 1084|       |#ifdef ZLIB_DEBUG
 1085|       |        s->compressed_len += 7;  /* align on byte boundary */
 1086|       |#endif
 1087|  4.15k|    }
 1088|  29.9k|    Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len >> 3,
 1089|  29.9k|           s->compressed_len - 7*(ulg)last));
 1090|  29.9k|}
trees.c:tr_static_init:
  296|  4.15k|local void tr_static_init(void) {
  297|       |#if defined(GEN_TREES_H) || !defined(STDC)
  298|       |    static int static_init_done = 0;
  299|       |    int n;        /* iterates over tree elements */
  300|       |    int bits;     /* bit counter */
  301|       |    int length;   /* length value */
  302|       |    int code;     /* code value */
  303|       |    int dist;     /* distance index */
  304|       |    ush bl_count[MAX_BITS+1];
  305|       |    /* number of codes at each bit length for an optimal tree */
  306|       |
  307|       |    if (static_init_done) return;
  308|       |
  309|       |    /* For some embedded targets, global variables are not initialized: */
  310|       |#ifdef NO_INIT_GLOBAL_POINTERS
  311|       |    static_l_desc.static_tree = static_ltree;
  312|       |    static_l_desc.extra_bits = extra_lbits;
  313|       |    static_d_desc.static_tree = static_dtree;
  314|       |    static_d_desc.extra_bits = extra_dbits;
  315|       |    static_bl_desc.extra_bits = extra_blbits;
  316|       |#endif
  317|       |
  318|       |    /* Initialize the mapping length (0..255) -> length code (0..28) */
  319|       |    length = 0;
  320|       |    for (code = 0; code < LENGTH_CODES-1; code++) {
  321|       |        base_length[code] = length;
  322|       |        for (n = 0; n < (1 << extra_lbits[code]); n++) {
  323|       |            _length_code[length++] = (uch)code;
  324|       |        }
  325|       |    }
  326|       |    Assert (length == 256, "tr_static_init: length != 256");
  327|       |    /* Note that the length 255 (match length 258) can be represented
  328|       |     * in two different ways: code 284 + 5 bits or code 285, so we
  329|       |     * overwrite length_code[255] to use the best encoding:
  330|       |     */
  331|       |    _length_code[length - 1] = (uch)code;
  332|       |
  333|       |    /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
  334|       |    dist = 0;
  335|       |    for (code = 0 ; code < 16; code++) {
  336|       |        base_dist[code] = dist;
  337|       |        for (n = 0; n < (1 << extra_dbits[code]); n++) {
  338|       |            _dist_code[dist++] = (uch)code;
  339|       |        }
  340|       |    }
  341|       |    Assert (dist == 256, "tr_static_init: dist != 256");
  342|       |    dist >>= 7; /* from now on, all distances are divided by 128 */
  343|       |    for ( ; code < D_CODES; code++) {
  344|       |        base_dist[code] = dist << 7;
  345|       |        for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {
  346|       |            _dist_code[256 + dist++] = (uch)code;
  347|       |        }
  348|       |    }
  349|       |    Assert (dist == 256, "tr_static_init: 256 + dist != 512");
  350|       |
  351|       |    /* Construct the codes of the static literal tree */
  352|       |    for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
  353|       |    n = 0;
  354|       |    while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
  355|       |    while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
  356|       |    while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
  357|       |    while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
  358|       |    /* Codes 286 and 287 do not exist, but we must include them in the
  359|       |     * tree construction to get a canonical Huffman tree (longest code
  360|       |     * all ones)
  361|       |     */
  362|       |    gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
  363|       |
  364|       |    /* The static distance tree is trivial: */
  365|       |    for (n = 0; n < D_CODES; n++) {
  366|       |        static_dtree[n].Len = 5;
  367|       |        static_dtree[n].Code = bi_reverse((unsigned)n, 5);
  368|       |    }
  369|       |    static_init_done = 1;
  370|       |
  371|       |#  ifdef GEN_TREES_H
  372|       |    gen_trees_header();
  373|       |#  endif
  374|       |#endif /* defined(GEN_TREES_H) || !defined(STDC) */
  375|  4.15k|}
trees.c:init_block:
  441|  34.1k|local void init_block(deflate_state *s) {
  442|  34.1k|    int n; /* iterates over tree elements */
  443|       |
  444|       |    /* Initialize the trees. */
  445|  9.78M|    for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
  ------------------
  |  |   40|  9.78M|#define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  ------------------
  |  |  |  |   37|  9.78M|#define LITERALS  256
  |  |  ------------------
  |  |               #define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  ------------------
  |  |  |  |   34|  9.78M|#define LENGTH_CODES 29
  |  |  ------------------
  ------------------
                  for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
  ------------------
  |  |   83|  9.75M|#define Freq fc.freq
  ------------------
  |  Branch (445:17): [True: 9.75M, False: 34.1k]
  ------------------
  446|  1.05M|    for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
  ------------------
  |  |   43|  1.05M|#define D_CODES   30
  ------------------
                  for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
  ------------------
  |  |   83|  1.02M|#define Freq fc.freq
  ------------------
  |  Branch (446:17): [True: 1.02M, False: 34.1k]
  ------------------
  447|   682k|    for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
  ------------------
  |  |   46|   682k|#define BL_CODES  19
  ------------------
                  for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
  ------------------
  |  |   83|   647k|#define Freq fc.freq
  ------------------
  |  Branch (447:17): [True: 647k, False: 34.1k]
  ------------------
  448|       |
  449|  34.1k|    s->dyn_ltree[END_BLOCK].Freq = 1;
  ------------------
  |  |   50|  34.1k|#define END_BLOCK 256
  ------------------
                  s->dyn_ltree[END_BLOCK].Freq = 1;
  ------------------
  |  |   83|  34.1k|#define Freq fc.freq
  ------------------
  450|  34.1k|    s->opt_len = s->static_len = 0L;
  451|  34.1k|    s->sym_next = s->matches = 0;
  452|  34.1k|}
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.39k, False: 8.82k]
  ------------------
  183|  2.39k|        put_short(s, s->bi_buf);
  ------------------
  |  |  144|  2.39k|#define put_short(s, w) { \
  |  |  145|  2.39k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  ------------------
  |  |  |  |  293|  2.39k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  146|  2.39k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  ------------------
  |  |  |  |  293|  2.39k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  147|  2.39k|}
  ------------------
  184|  8.82k|    } else if (s->bi_valid > 0) {
  ------------------
  |  Branch (184:16): [True: 8.53k, False: 289]
  ------------------
  185|  8.53k|        put_byte(s, (Byte)s->bi_buf);
  ------------------
  |  |  293|  8.53k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
  186|  8.53k|    }
  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|  38.2k|local void bi_flush(deflate_state *s) {
  167|  38.2k|    if (s->bi_valid == 16) {
  ------------------
  |  Branch (167:9): [True: 1.59k, False: 36.6k]
  ------------------
  168|  1.59k|        put_short(s, s->bi_buf);
  ------------------
  |  |  144|  1.59k|#define put_short(s, w) { \
  |  |  145|  1.59k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  ------------------
  |  |  |  |  293|  1.59k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  146|  1.59k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  ------------------
  |  |  |  |  293|  1.59k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  ------------------
  |  |  147|  1.59k|}
  ------------------
  169|  1.59k|        s->bi_buf = 0;
  170|  1.59k|        s->bi_valid = 0;
  171|  36.6k|    } else if (s->bi_valid >= 8) {
  ------------------
  |  Branch (171:16): [True: 9.31k, False: 27.3k]
  ------------------
  172|  9.31k|        put_byte(s, (Byte)s->bi_buf);
  ------------------
  |  |  293|  9.31k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  ------------------
  173|  9.31k|        s->bi_buf >>= 8;
  174|  9.31k|        s->bi_valid -= 8;
  175|  9.31k|    }
  176|  38.2k|}
trees.c:detect_data_type:
  967|  4.15k|local int detect_data_type(deflate_state *s) {
  968|       |    /* block_mask is the bit mask of block-listed bytes
  969|       |     * set bits 0..6, 14..25, and 28..31
  970|       |     * 0xf3ffc07f = binary 11110011111111111100000001111111
  971|       |     */
  972|  4.15k|    unsigned long block_mask = 0xf3ffc07fUL;
  973|  4.15k|    int n;
  974|       |
  975|       |    /* Check for non-textual ("block-listed") bytes. */
  976|  41.5k|    for (n = 0; n <= 31; n++, block_mask >>= 1)
  ------------------
  |  Branch (976:17): [True: 40.5k, False: 1.04k]
  ------------------
  977|  40.5k|        if ((block_mask & 1) && (s->dyn_ltree[n].Freq != 0))
  ------------------
  |  |   83|  30.0k|#define Freq fc.freq
  ------------------
  |  Branch (977:13): [True: 30.0k, False: 10.4k]
  |  Branch (977:33): [True: 3.11k, False: 26.9k]
  ------------------
  978|  3.11k|            return Z_BINARY;
  ------------------
  |  |  207|  3.11k|#define Z_BINARY   0
  ------------------
  979|       |
  980|       |    /* Check for textual ("allow-listed") bytes. */
  981|  1.04k|    if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
  ------------------
  |  |   83|  1.04k|#define Freq fc.freq
  ------------------
                  if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
  ------------------
  |  |   83|  1.00k|#define Freq fc.freq
  ------------------
  |  Branch (981:9): [True: 42, False: 1.00k]
  |  Branch (981:38): [True: 79, False: 924]
  ------------------
  982|    924|            || s->dyn_ltree[13].Freq != 0)
  ------------------
  |  |   83|    924|#define Freq fc.freq
  ------------------
  |  Branch (982:16): [True: 18, False: 906]
  ------------------
  983|    139|        return Z_TEXT;
  ------------------
  |  |  208|    139|#define Z_TEXT     1
  ------------------
  984|   122k|    for (n = 32; n < LITERALS; n++)
  ------------------
  |  |   37|   122k|#define LITERALS  256
  ------------------
  |  Branch (984:18): [True: 122k, False: 269]
  ------------------
  985|   122k|        if (s->dyn_ltree[n].Freq != 0)
  ------------------
  |  |   83|   122k|#define Freq fc.freq
  ------------------
  |  Branch (985:13): [True: 637, False: 121k]
  ------------------
  986|    637|            return Z_TEXT;
  ------------------
  |  |  208|  1.54k|#define Z_TEXT     1
  ------------------
  987|       |
  988|       |    /* There are no "block-listed" or "allow-listed" bytes:
  989|       |     * this stream either is empty or has tolerated ("gray-listed") bytes only.
  990|       |     */
  991|    269|    return Z_BINARY;
  ------------------
  |  |  207|    269|#define Z_BINARY   0
  ------------------
  992|    906|}
trees.c:build_tree:
  628|  89.8k|local void build_tree(deflate_state *s, tree_desc *desc) {
  629|  89.8k|    ct_data *tree         = desc->dyn_tree;
  630|  89.8k|    const ct_data *stree  = desc->stat_desc->static_tree;
  631|  89.8k|    int elems             = desc->stat_desc->elems;
  632|  89.8k|    int n, m;          /* iterate over heap elements */
  633|  89.8k|    int max_code = -1; /* largest code with non zero frequency */
  634|  89.8k|    int node;          /* new node being created */
  635|       |
  636|       |    /* Construct the initial heap, with least frequent element in
  637|       |     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n + 1].
  638|       |     * heap[0] is not used.
  639|       |     */
  640|  89.8k|    s->heap_len = 0, s->heap_max = HEAP_SIZE;
  ------------------
  |  |   49|  89.8k|#define HEAP_SIZE (2*L_CODES+1)
  |  |  ------------------
  |  |  |  |   40|  89.8k|#define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  89.8k|#define LITERALS  256
  |  |  |  |  ------------------
  |  |  |  |               #define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  89.8k|#define LENGTH_CODES 29
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  641|       |
  642|  10.1M|    for (n = 0; n < elems; n++) {
  ------------------
  |  Branch (642:17): [True: 10.0M, False: 89.8k]
  ------------------
  643|  10.0M|        if (tree[n].Freq != 0) {
  ------------------
  |  |   83|  10.0M|#define Freq fc.freq
  ------------------
  |  Branch (643:13): [True: 2.22M, False: 7.80M]
  ------------------
  644|  2.22M|            s->heap[++(s->heap_len)] = max_code = n;
  645|  2.22M|            s->depth[n] = 0;
  646|  7.80M|        } else {
  647|  7.80M|            tree[n].Len = 0;
  ------------------
  |  |   86|  7.80M|#define Len  dl.len
  ------------------
  648|  7.80M|        }
  649|  10.0M|    }
  650|       |
  651|       |    /* The pkzip format requires that at least one distance code exists,
  652|       |     * and that at least one bit should be sent even if there is only one
  653|       |     * possible code. So to avoid special checks later on we force at least
  654|       |     * two codes of non zero frequency.
  655|       |     */
  656|   134k|    while (s->heap_len < 2) {
  ------------------
  |  Branch (656:12): [True: 44.3k, False: 89.8k]
  ------------------
  657|  44.3k|        node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
  ------------------
  |  Branch (657:44): [True: 42.9k, False: 1.41k]
  ------------------
  658|  44.3k|        tree[node].Freq = 1;
  ------------------
  |  |   83|  44.3k|#define Freq fc.freq
  ------------------
  659|  44.3k|        s->depth[node] = 0;
  660|  44.3k|        s->opt_len--; if (stree) s->static_len -= stree[node].Len;
  ------------------
  |  |   86|  44.3k|#define Len  dl.len
  ------------------
  |  Branch (660:27): [True: 44.3k, False: 0]
  ------------------
  661|       |        /* node is 0 or 1 so it does not have extra bits */
  662|  44.3k|    }
  663|  89.8k|    desc->max_code = max_code;
  664|       |
  665|       |    /* The elements heap[heap_len/2 + 1 .. heap_len] are leaves of the tree,
  666|       |     * establish sub-heaps of increasing lengths:
  667|       |     */
  668|  1.20M|    for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
  ------------------
  |  Branch (668:29): [True: 1.11M, False: 89.8k]
  ------------------
  669|       |
  670|       |    /* Construct the Huffman tree by repeatedly combining the least two
  671|       |     * frequent nodes.
  672|       |     */
  673|  89.8k|    node = elems;              /* next internal node of the tree */
  674|  2.17M|    do {
  675|  2.17M|        pqremove(s, tree, n);  /* n = node of least frequency */
  ------------------
  |  |  489|  2.17M|#define pqremove(s, tree, top) \
  |  |  490|  2.17M|{\
  |  |  491|  2.17M|    top = s->heap[SMALLEST]; \
  |  |  ------------------
  |  |  |  |  481|  2.17M|#define SMALLEST 1
  |  |  ------------------
  |  |  492|  2.17M|    s->heap[SMALLEST] = s->heap[s->heap_len--]; \
  |  |  ------------------
  |  |  |  |  481|  2.17M|#define SMALLEST 1
  |  |  ------------------
  |  |  493|  2.17M|    pqdownheap(s, tree, SMALLEST); \
  |  |  ------------------
  |  |  |  |  481|  2.17M|#define SMALLEST 1
  |  |  ------------------
  |  |  494|  2.17M|}
  ------------------
  676|  2.17M|        m = s->heap[SMALLEST]; /* m = node of next least frequency */
  ------------------
  |  |  481|  2.17M|#define SMALLEST 1
  ------------------
  677|       |
  678|  2.17M|        s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
  679|  2.17M|        s->heap[--(s->heap_max)] = m;
  680|       |
  681|       |        /* Create a new node father of n and m */
  682|  2.17M|        tree[node].Freq = tree[n].Freq + tree[m].Freq;
  ------------------
  |  |   83|  2.17M|#define Freq fc.freq
  ------------------
                      tree[node].Freq = tree[n].Freq + tree[m].Freq;
  ------------------
  |  |   83|  2.17M|#define Freq fc.freq
  ------------------
                      tree[node].Freq = tree[n].Freq + tree[m].Freq;
  ------------------
  |  |   83|  2.17M|#define Freq fc.freq
  ------------------
  683|  2.17M|        s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?
  ------------------
  |  Branch (683:33): [True: 1.90M, False: 266k]
  ------------------
  684|  1.90M|                                s->depth[n] : s->depth[m]) + 1);
  685|  2.17M|        tree[n].Dad = tree[m].Dad = (ush)node;
  ------------------
  |  |   85|  2.17M|#define Dad  dl.dad
  ------------------
                      tree[n].Dad = tree[m].Dad = (ush)node;
  ------------------
  |  |   85|  2.17M|#define Dad  dl.dad
  ------------------
  686|       |#ifdef DUMP_BL_TREE
  687|       |        if (tree == s->bl_tree) {
  688|       |            fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
  689|       |                    node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
  690|       |        }
  691|       |#endif
  692|       |        /* and insert the new node in the heap */
  693|  2.17M|        s->heap[SMALLEST] = node++;
  ------------------
  |  |  481|  2.17M|#define SMALLEST 1
  ------------------
  694|  2.17M|        pqdownheap(s, tree, SMALLEST);
  ------------------
  |  |  481|  2.17M|#define SMALLEST 1
  ------------------
  695|       |
  696|  2.17M|    } while (s->heap_len >= 2);
  ------------------
  |  Branch (696:14): [True: 2.08M, False: 89.8k]
  ------------------
  697|       |
  698|  89.8k|    s->heap[--(s->heap_max)] = s->heap[SMALLEST];
  ------------------
  |  |  481|  89.8k|#define SMALLEST 1
  ------------------
  699|       |
  700|       |    /* At this point, the fields freq and dad are set. We can now
  701|       |     * generate the bit lengths.
  702|       |     */
  703|  89.8k|    gen_bitlen(s, (tree_desc *)desc);
  704|       |
  705|       |    /* The field len is now set, we can generate the bit codes */
  706|  89.8k|    gen_codes ((ct_data *)tree, max_code, s->bl_count);
  707|  89.8k|}
trees.c:pqdownheap:
  510|  5.47M|local void pqdownheap(deflate_state *s, ct_data *tree, int k) {
  511|  5.47M|    int v = s->heap[k];
  512|  5.47M|    int j = k << 1;  /* left son of k */
  513|  21.1M|    while (j <= s->heap_len) {
  ------------------
  |  Branch (513:12): [True: 17.5M, False: 3.55M]
  ------------------
  514|       |        /* Set j to the smallest of the two sons: */
  515|  17.5M|        if (j < s->heap_len &&
  ------------------
  |  Branch (515:13): [True: 17.0M, False: 548k]
  ------------------
  516|  17.0M|            smaller(tree, s->heap[j + 1], s->heap[j], s->depth)) {
  ------------------
  |  |  501|  17.0M|   (tree[n].Freq < tree[m].Freq || \
  |  |  ------------------
  |  |  |  |   83|  17.0M|#define Freq fc.freq
  |  |  ------------------
  |  |                  (tree[n].Freq < tree[m].Freq || \
  |  |  ------------------
  |  |  |  |   83|  34.0M|#define Freq fc.freq
  |  |  ------------------
  |  |  |  Branch (501:5): [True: 1.79M, False: 15.2M]
  |  |  ------------------
  |  |  502|  17.0M|   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
  |  |  ------------------
  |  |  |  |   83|  15.2M|#define Freq fc.freq
  |  |  ------------------
  |  |                  (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
  |  |  ------------------
  |  |  |  |   83|  30.4M|#define Freq fc.freq
  |  |  ------------------
  |  |  |  Branch (502:5): [True: 8.60M, False: 6.60M]
  |  |  |  Branch (502:37): [True: 6.95M, False: 1.65M]
  |  |  ------------------
  ------------------
  517|  8.75M|            j++;
  518|  8.75M|        }
  519|       |        /* Exit if v is smaller than both sons */
  520|  17.5M|        if (smaller(tree, v, s->heap[j], s->depth)) break;
  ------------------
  |  |  501|  17.5M|   (tree[n].Freq < tree[m].Freq || \
  |  |  ------------------
  |  |  |  |   83|  17.5M|#define Freq fc.freq
  |  |  ------------------
  |  |                  (tree[n].Freq < tree[m].Freq || \
  |  |  ------------------
  |  |  |  |   83|  35.1M|#define Freq fc.freq
  |  |  ------------------
  |  |  |  Branch (501:5): [True: 514k, False: 17.0M]
  |  |  ------------------
  |  |  502|  17.5M|   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
  |  |  ------------------
  |  |  |  |   83|  17.0M|#define Freq fc.freq
  |  |  ------------------
  |  |                  (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
  |  |  ------------------
  |  |  |  |   83|  34.0M|#define Freq fc.freq
  |  |  ------------------
  |  |  |  Branch (502:5): [True: 2.48M, False: 14.5M]
  |  |  |  Branch (502:37): [True: 1.39M, False: 1.08M]
  |  |  ------------------
  ------------------
  521|       |
  522|       |        /* Exchange v with the smallest son */
  523|  15.6M|        s->heap[k] = s->heap[j];  k = j;
  524|       |
  525|       |        /* And continue down the tree, setting j to the left son of k */
  526|  15.6M|        j <<= 1;
  527|  15.6M|    }
  528|  5.47M|    s->heap[k] = v;
  529|  5.47M|}
trees.c:gen_bitlen:
  541|  89.8k|local void gen_bitlen(deflate_state *s, tree_desc *desc) {
  542|  89.8k|    ct_data *tree        = desc->dyn_tree;
  543|  89.8k|    int max_code         = desc->max_code;
  544|  89.8k|    const ct_data *stree = desc->stat_desc->static_tree;
  545|  89.8k|    const intf *extra    = desc->stat_desc->extra_bits;
  546|  89.8k|    int base             = desc->stat_desc->extra_base;
  547|  89.8k|    int max_length       = desc->stat_desc->max_length;
  548|  89.8k|    int h;              /* heap index */
  549|  89.8k|    int n, m;           /* iterate over the tree elements */
  550|  89.8k|    int bits;           /* bit length */
  551|  89.8k|    int xbits;          /* extra bits */
  552|  89.8k|    ush f;              /* frequency */
  553|  89.8k|    int overflow = 0;   /* number of elements with bit length too large */
  554|       |
  555|  1.52M|    for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
  ------------------
  |  |   52|  1.52M|#define MAX_BITS 15
  ------------------
  |  Branch (555:20): [True: 1.43M, False: 89.8k]
  ------------------
  556|       |
  557|       |    /* In a first pass, compute the optimal bit lengths (which may
  558|       |     * overflow in the case of the bit length tree).
  559|       |     */
  560|  89.8k|    tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
  ------------------
  |  |   86|  89.8k|#define Len  dl.len
  ------------------
  561|       |
  562|  4.44M|    for (h = s->heap_max + 1; h < HEAP_SIZE; h++) {
  ------------------
  |  |   49|  4.44M|#define HEAP_SIZE (2*L_CODES+1)
  |  |  ------------------
  |  |  |  |   40|  4.44M|#define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  4.44M|#define LITERALS  256
  |  |  |  |  ------------------
  |  |  |  |               #define L_CODES (LITERALS+1+LENGTH_CODES)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.44M|#define LENGTH_CODES 29
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (562:31): [True: 4.35M, False: 89.8k]
  ------------------
  563|  4.35M|        n = s->heap[h];
  564|  4.35M|        bits = tree[tree[n].Dad].Len + 1;
  ------------------
  |  |   85|  4.35M|#define Dad  dl.dad
  ------------------
                      bits = tree[tree[n].Dad].Len + 1;
  ------------------
  |  |   86|  4.35M|#define Len  dl.len
  ------------------
  565|  4.35M|        if (bits > max_length) bits = max_length, overflow++;
  ------------------
  |  Branch (565:13): [True: 6.74k, False: 4.34M]
  ------------------
  566|  4.35M|        tree[n].Len = (ush)bits;
  ------------------
  |  |   86|  4.35M|#define Len  dl.len
  ------------------
  567|       |        /* We overwrite tree[n].Dad which is no longer needed */
  568|       |
  569|  4.35M|        if (n > max_code) continue; /* not a leaf node */
  ------------------
  |  Branch (569:13): [True: 2.08M, False: 2.26M]
  ------------------
  570|       |
  571|  2.26M|        s->bl_count[bits]++;
  572|  2.26M|        xbits = 0;
  573|  2.26M|        if (n >= base) xbits = extra[n - base];
  ------------------
  |  Branch (573:13): [True: 391k, False: 1.87M]
  ------------------
  574|  2.26M|        f = tree[n].Freq;
  ------------------
  |  |   83|  2.26M|#define Freq fc.freq
  ------------------
  575|  2.26M|        s->opt_len += (ulg)f * (unsigned)(bits + xbits);
  576|  2.26M|        if (stree) s->static_len += (ulg)f * (unsigned)(stree[n].Len + xbits);
  ------------------
  |  |   86|  2.03M|#define Len  dl.len
  ------------------
  |  Branch (576:13): [True: 2.03M, False: 234k]
  ------------------
  577|  2.26M|    }
  578|  89.8k|    if (overflow == 0) return;
  ------------------
  |  Branch (578:9): [True: 87.6k, False: 2.20k]
  ------------------
  579|       |
  580|  2.20k|    Tracev((stderr,"\nbit length overflow\n"));
  581|       |    /* This happens for example on obj2 and pic of the Calgary corpus */
  582|       |
  583|       |    /* Find the first bit length which could increase: */
  584|  3.37k|    do {
  585|  3.37k|        bits = max_length - 1;
  586|  4.96k|        while (s->bl_count[bits] == 0) bits--;
  ------------------
  |  Branch (586:16): [True: 1.59k, False: 3.37k]
  ------------------
  587|  3.37k|        s->bl_count[bits]--;        /* move one leaf down the tree */
  588|  3.37k|        s->bl_count[bits + 1] += 2; /* move one overflow item as its brother */
  589|  3.37k|        s->bl_count[max_length]--;
  590|       |        /* The brother of the overflow item also moves one step up,
  591|       |         * but this does not affect bl_count[max_length]
  592|       |         */
  593|  3.37k|        overflow -= 2;
  594|  3.37k|    } while (overflow > 0);
  ------------------
  |  Branch (594:14): [True: 1.16k, False: 2.20k]
  ------------------
  595|       |
  596|       |    /* Now recompute all bit lengths, scanning in increasing frequency.
  597|       |     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
  598|       |     * lengths instead of fixing only the wrong ones. This idea is taken
  599|       |     * from 'ar' written by Haruhiko Okumura.)
  600|       |     */
  601|  17.7k|    for (bits = max_length; bits != 0; bits--) {
  ------------------
  |  Branch (601:29): [True: 15.5k, False: 2.20k]
  ------------------
  602|  15.5k|        n = s->bl_count[bits];
  603|  58.1k|        while (n != 0) {
  ------------------
  |  Branch (603:16): [True: 42.6k, False: 15.5k]
  ------------------
  604|  42.6k|            m = s->heap[--h];
  605|  42.6k|            if (m > max_code) continue;
  ------------------
  |  Branch (605:17): [True: 17.6k, False: 24.9k]
  ------------------
  606|  24.9k|            if ((unsigned) tree[m].Len != (unsigned) bits) {
  ------------------
  |  |   86|  24.9k|#define Len  dl.len
  ------------------
  |  Branch (606:17): [True: 3.04k, False: 21.9k]
  ------------------
  607|  3.04k|                Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
  608|  3.04k|                s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
  ------------------
  |  |   86|  3.04k|#define Len  dl.len
  ------------------
                              s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
  ------------------
  |  |   83|  3.04k|#define Freq fc.freq
  ------------------
  609|  3.04k|                tree[m].Len = (ush)bits;
  ------------------
  |  |   86|  3.04k|#define Len  dl.len
  ------------------
  610|  3.04k|            }
  611|  24.9k|            n--;
  612|  24.9k|        }
  613|  15.5k|    }
  614|  2.20k|}
trees.c:gen_codes:
  203|  89.8k|local void gen_codes(ct_data *tree, int max_code, ushf *bl_count) {
  204|  89.8k|    ush next_code[MAX_BITS+1]; /* next code value for each bit length */
  205|  89.8k|    unsigned code = 0;         /* running code value */
  206|  89.8k|    int bits;                  /* bit index */
  207|  89.8k|    int n;                     /* code index */
  208|       |
  209|       |    /* The distribution counts are first used to generate the code values
  210|       |     * without bit reversal.
  211|       |     */
  212|  1.43M|    for (bits = 1; bits <= MAX_BITS; bits++) {
  ------------------
  |  |   52|  1.43M|#define MAX_BITS 15
  ------------------
  |  Branch (212:20): [True: 1.34M, False: 89.8k]
  ------------------
  213|  1.34M|        code = (code + bl_count[bits - 1]) << 1;
  214|  1.34M|        next_code[bits] = (ush)code;
  215|  1.34M|    }
  216|       |    /* Check that the bit counts in bl_count are consistent. The last code
  217|       |     * must be all ones.
  218|       |     */
  219|  89.8k|    Assert (code + bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1,
  220|  89.8k|            "inconsistent bit counts");
  221|  89.8k|    Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
  222|       |
  223|  8.61M|    for (n = 0;  n <= max_code; n++) {
  ------------------
  |  Branch (223:18): [True: 8.52M, False: 89.8k]
  ------------------
  224|  8.52M|        int len = tree[n].Len;
  ------------------
  |  |   86|  8.52M|#define Len  dl.len
  ------------------
  225|  8.52M|        if (len == 0) continue;
  ------------------
  |  Branch (225:13): [True: 6.26M, False: 2.26M]
  ------------------
  226|       |        /* Now reverse the bits */
  227|  2.26M|        tree[n].Code = (ush)bi_reverse(next_code[len]++, len);
  ------------------
  |  |   84|  2.26M|#define Code fc.code
  ------------------
  228|       |
  229|  2.26M|        Tracecv(tree != static_ltree,(stderr, "\nn %3d %c l %2d c %4x (%x) ",
  230|  2.26M|            n, (isgraph(n & 0xff) ? n : ' '), len, tree[n].Code,
  231|  2.26M|            next_code[len] - 1));
  232|  2.26M|    }
  233|  89.8k|}
trees.c:bi_reverse:
  154|  2.26M|local unsigned bi_reverse(unsigned code, int len) {
  155|  2.26M|    unsigned res = 0;
  156|  14.6M|    do {
  157|  14.6M|        res |= code & 1;
  158|  14.6M|        code >>= 1, res <<= 1;
  159|  14.6M|    } while (--len > 0);
  ------------------
  |  Branch (159:14): [True: 12.4M, False: 2.26M]
  ------------------
  160|  2.26M|    return res >> 1;
  161|  2.26M|}
trees.c:build_bl_tree:
  801|  29.9k|local int build_bl_tree(deflate_state *s) {
  802|  29.9k|    int max_blindex;  /* index of last bit length code of non zero freq */
  803|       |
  804|       |    /* Determine the bit length frequencies for literal and distance trees */
  805|  29.9k|    scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
  806|  29.9k|    scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
  807|       |
  808|       |    /* Build the bit length tree: */
  809|  29.9k|    build_tree(s, (tree_desc *)(&(s->bl_desc)));
  810|       |    /* opt_len now includes the length of the tree representations, except the
  811|       |     * lengths of the bit lengths codes and the 5 + 5 + 4 bits for the counts.
  812|       |     */
  813|       |
  814|       |    /* Determine the number of bit length codes to send. The pkzip format
  815|       |     * requires that at least 4 bit length codes be sent. (appnote.txt says
  816|       |     * 3 but the actual value used is 4.)
  817|       |     */
  818|  69.4k|    for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
  ------------------
  |  |   46|  29.9k|#define BL_CODES  19
  ------------------
  |  Branch (818:36): [True: 69.4k, False: 0]
  ------------------
  819|  69.4k|        if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
  ------------------
  |  |   86|  69.4k|#define Len  dl.len
  ------------------
  |  Branch (819:13): [True: 29.9k, False: 39.4k]
  ------------------
  820|  69.4k|    }
  821|       |    /* Update opt_len to include the bit length tree and counts */
  822|  29.9k|    s->opt_len += 3*((ulg)max_blindex + 1) + 5 + 5 + 4;
  823|  29.9k|    Tracev((stderr, "\ndyn trees: dyn %lu, stat %lu",
  824|  29.9k|            s->opt_len, s->static_len));
  825|       |
  826|  29.9k|    return max_blindex;
  827|  29.9k|}
trees.c:scan_tree:
  713|  59.8k|local void scan_tree(deflate_state *s, ct_data *tree, int max_code) {
  714|  59.8k|    int n;                     /* iterates over all tree elements */
  715|  59.8k|    int prevlen = -1;          /* last emitted length */
  716|  59.8k|    int curlen;                /* length of current code */
  717|  59.8k|    int nextlen = tree[0].Len; /* length of next code */
  ------------------
  |  |   86|  59.8k|#define Len  dl.len
  ------------------
  718|  59.8k|    int count = 0;             /* repeat count of the current code */
  719|  59.8k|    int max_count = 7;         /* max repeat count */
  720|  59.8k|    int min_count = 4;         /* min repeat count */
  721|       |
  722|  59.8k|    if (nextlen == 0) max_count = 138, min_count = 3;
  ------------------
  |  Branch (722:9): [True: 9.83k, False: 50.0k]
  ------------------
  723|  59.8k|    tree[max_code + 1].Len = (ush)0xffff; /* guard */
  ------------------
  |  |   86|  59.8k|#define Len  dl.len
  ------------------
  724|       |
  725|  8.02M|    for (n = 0; n <= max_code; n++) {
  ------------------
  |  Branch (725:17): [True: 7.96M, False: 59.8k]
  ------------------
  726|  7.96M|        curlen = nextlen; nextlen = tree[n + 1].Len;
  ------------------
  |  |   86|  7.96M|#define Len  dl.len
  ------------------
  727|  7.96M|        if (++count < max_count && curlen == nextlen) {
  ------------------
  |  Branch (727:13): [True: 7.95M, False: 14.0k]
  |  Branch (727:36): [True: 5.55M, False: 2.39M]
  ------------------
  728|  5.55M|            continue;
  729|  5.55M|        } else if (count < min_count) {
  ------------------
  |  Branch (729:20): [True: 1.94M, False: 469k]
  ------------------
  730|  1.94M|            s->bl_tree[curlen].Freq += (ush)count;
  ------------------
  |  |   83|  1.94M|#define Freq fc.freq
  ------------------
  731|  1.94M|        } else if (curlen != 0) {
  ------------------
  |  Branch (731:20): [True: 45.3k, False: 423k]
  ------------------
  732|  45.3k|            if (curlen != prevlen) s->bl_tree[curlen].Freq++;
  ------------------
  |  |   83|  41.2k|#define Freq fc.freq
  ------------------
  |  Branch (732:17): [True: 41.2k, False: 4.06k]
  ------------------
  733|  45.3k|            s->bl_tree[REP_3_6].Freq++;
  ------------------
  |  |   53|  45.3k|#define REP_3_6      16
  ------------------
                          s->bl_tree[REP_3_6].Freq++;
  ------------------
  |  |   83|  45.3k|#define Freq fc.freq
  ------------------
  734|   423k|        } else if (count <= 10) {
  ------------------
  |  Branch (734:20): [True: 316k, False: 107k]
  ------------------
  735|   316k|            s->bl_tree[REPZ_3_10].Freq++;
  ------------------
  |  |   56|   316k|#define REPZ_3_10    17
  ------------------
                          s->bl_tree[REPZ_3_10].Freq++;
  ------------------
  |  |   83|   316k|#define Freq fc.freq
  ------------------
  736|   316k|        } else {
  737|   107k|            s->bl_tree[REPZ_11_138].Freq++;
  ------------------
  |  |   59|   107k|#define REPZ_11_138  18
  ------------------
                          s->bl_tree[REPZ_11_138].Freq++;
  ------------------
  |  |   83|   107k|#define Freq fc.freq
  ------------------
  738|   107k|        }
  739|  2.41M|        count = 0; prevlen = curlen;
  740|  2.41M|        if (nextlen == 0) {
  ------------------
  |  Branch (740:13): [True: 894k, False: 1.51M]
  ------------------
  741|   894k|            max_count = 138, min_count = 3;
  742|  1.51M|        } else if (curlen == nextlen) {
  ------------------
  |  Branch (742:20): [True: 6.24k, False: 1.51M]
  ------------------
  743|  6.24k|            max_count = 6, min_count = 3;
  744|  1.51M|        } else {
  745|  1.51M|            max_count = 7, min_count = 4;
  746|  1.51M|        }
  747|  2.41M|    }
  748|  59.8k|}
trees.c:compress_block:
  902|  22.8k|                          const ct_data *dtree) {
  903|  22.8k|    unsigned dist;      /* distance of matched string */
  904|  22.8k|    int lc;             /* match length or unmatched char (if dist == 0) */
  905|  22.8k|    unsigned sx = 0;    /* running index in symbol buffers */
  906|  22.8k|    unsigned code;      /* the code to send */
  907|  22.8k|    int extra;          /* number of extra bits to send */
  908|       |
  909|  9.76M|    if (s->sym_next != 0) do {
  ------------------
  |  Branch (909:9): [True: 22.5k, False: 304]
  ------------------
  910|       |#ifdef LIT_MEM
  911|       |        dist = s->d_buf[sx];
  912|       |        lc = s->l_buf[sx++];
  913|       |#else
  914|  9.76M|        dist = s->sym_buf[sx++] & 0xff;
  915|  9.76M|        dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8;
  916|  9.76M|        lc = s->sym_buf[sx++];
  917|  9.76M|#endif
  918|  9.76M|        if (dist == 0) {
  ------------------
  |  Branch (918:13): [True: 9.36M, False: 399k]
  ------------------
  919|  9.36M|            send_code(s, lc, ltree); /* send a literal byte */
  ------------------
  |  |  240|  9.36M|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  275|  9.36M|#define send_bits(s, value, length) \
  |  |  |  |  276|  9.36M|{ int len = length;\
  |  |  |  |  277|  9.36M|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  9.36M|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:7): [True: 3.27M, False: 6.08M]
  |  |  |  |  ------------------
  |  |  |  |  278|  3.27M|    int val = (int)value;\
  |  |  |  |  279|  3.27M|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  280|  3.27M|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  3.27M|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  3.27M|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  3.27M|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  3.27M|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  3.27M|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  3.27M|}
  |  |  |  |  ------------------
  |  |  |  |  281|  3.27M|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  3.27M|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  3.27M|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  3.27M|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  283|  6.08M|  } else {\
  |  |  |  |  284|  6.08M|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  285|  6.08M|    s->bi_valid += len;\
  |  |  |  |  286|  6.08M|  }\
  |  |  |  |  287|  9.36M|}
  |  |  ------------------
  ------------------
  920|  9.36M|            Tracecv(isgraph(lc), (stderr," '%c' ", lc));
  921|  9.36M|        } else {
  922|       |            /* Here, lc is the match length - MIN_MATCH */
  923|   399k|            code = _length_code[lc];
  924|   399k|            send_code(s, code + LITERALS + 1, ltree);   /* send length code */
  ------------------
  |  |  240|   399k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  275|   399k|#define send_bits(s, value, length) \
  |  |  |  |  276|   399k|{ int len = length;\
  |  |  |  |  277|   399k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   399k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:7): [True: 155k, False: 244k]
  |  |  |  |  ------------------
  |  |  |  |  278|   155k|    int val = (int)value;\
  |  |  |  |  279|   155k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  280|   155k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|   155k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|   155k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   155k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   155k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   155k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   155k|}
  |  |  |  |  ------------------
  |  |  |  |  281|   155k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   155k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|   155k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   155k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  283|   244k|  } else {\
  |  |  |  |  284|   244k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  285|   244k|    s->bi_valid += len;\
  |  |  |  |  286|   244k|  }\
  |  |  |  |  287|   399k|}
  |  |  ------------------
  ------------------
  925|   399k|            extra = extra_lbits[code];
  926|   399k|            if (extra != 0) {
  ------------------
  |  Branch (926:17): [True: 91.5k, False: 308k]
  ------------------
  927|  91.5k|                lc -= base_length[code];
  928|  91.5k|                send_bits(s, lc, extra);       /* send the extra length bits */
  ------------------
  |  |  275|  91.5k|#define send_bits(s, value, length) \
  |  |  276|  91.5k|{ int len = length;\
  |  |  277|  91.5k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  91.5k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (277:7): [True: 13.3k, False: 78.2k]
  |  |  ------------------
  |  |  278|  13.3k|    int val = (int)value;\
  |  |  279|  13.3k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  280|  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|}
  |  |  ------------------
  |  |  281|  13.3k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  13.3k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  13.3k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  13.3k|#define Buf_size 16
  |  |  ------------------
  |  |  283|  78.2k|  } else {\
  |  |  284|  78.2k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  285|  78.2k|    s->bi_valid += len;\
  |  |  286|  78.2k|  }\
  |  |  287|  91.5k|}
  ------------------
  929|  91.5k|            }
  930|   399k|            dist--; /* dist is now the match distance - 1 */
  931|   399k|            code = d_code(dist);
  ------------------
  |  |  321|   399k|   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
  |  |  ------------------
  |  |  |  Branch (321:5): [True: 277k, False: 122k]
  |  |  ------------------
  ------------------
  932|   399k|            Assert (code < D_CODES, "bad d_code");
  933|       |
  934|   399k|            send_code(s, code, dtree);       /* send the distance code */
  ------------------
  |  |  240|   399k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  275|   399k|#define send_bits(s, value, length) \
  |  |  |  |  276|   399k|{ int len = length;\
  |  |  |  |  277|   399k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   399k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:7): [True: 100k, False: 299k]
  |  |  |  |  ------------------
  |  |  |  |  278|   100k|    int val = (int)value;\
  |  |  |  |  279|   100k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  280|   100k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|   100k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|   100k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   100k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   100k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   100k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   100k|}
  |  |  |  |  ------------------
  |  |  |  |  281|   100k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   100k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|   100k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   100k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  283|   299k|  } else {\
  |  |  |  |  284|   299k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  285|   299k|    s->bi_valid += len;\
  |  |  |  |  286|   299k|  }\
  |  |  |  |  287|   399k|}
  |  |  ------------------
  ------------------
  935|   399k|            extra = extra_dbits[code];
  936|   399k|            if (extra != 0) {
  ------------------
  |  Branch (936:17): [True: 307k, False: 92.0k]
  ------------------
  937|   307k|                dist -= (unsigned)base_dist[code];
  938|   307k|                send_bits(s, (int)dist, extra); /* send the extra bits */
  ------------------
  |  |  275|   307k|#define send_bits(s, value, length) \
  |  |  276|   307k|{ int len = length;\
  |  |  277|   307k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|   307k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (277:7): [True: 119k, False: 187k]
  |  |  ------------------
  |  |  278|   119k|    int val = (int)value;\
  |  |  279|   119k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  280|   119k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|   119k|#define put_short(s, w) { \
  |  |  |  |  145|   119k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|   119k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|   119k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|   119k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|   119k|}
  |  |  ------------------
  |  |  281|   119k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|   119k|#define Buf_size 16
  |  |  ------------------
  |  |  282|   119k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|   119k|#define Buf_size 16
  |  |  ------------------
  |  |  283|   187k|  } else {\
  |  |  284|   187k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  285|   187k|    s->bi_valid += len;\
  |  |  286|   187k|  }\
  |  |  287|   307k|}
  ------------------
  939|   307k|            }
  940|   399k|        } /* literal or match pair ? */
  941|       |
  942|       |        /* Check for no overlay of pending_buf on needed symbols */
  943|       |#ifdef LIT_MEM
  944|       |        Assert(s->pending < 2 * (s->lit_bufsize + sx), "pendingBuf overflow");
  945|       |#else
  946|  9.76M|        Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow");
  947|  9.76M|#endif
  948|       |
  949|  9.76M|    } while (sx < s->sym_next);
  ------------------
  |  Branch (949:14): [True: 9.74M, False: 22.5k]
  ------------------
  950|       |
  951|  22.8k|    send_code(s, END_BLOCK, ltree);
  ------------------
  |  |  240|  22.8k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  275|  22.8k|#define send_bits(s, value, length) \
  |  |  |  |  276|  22.8k|{ int len = length;\
  |  |  |  |  277|  22.8k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  22.8k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:7): [True: 8.95k, False: 13.9k]
  |  |  |  |  ------------------
  |  |  |  |  278|  8.95k|    int val = (int)value;\
  |  |  |  |  279|  8.95k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  280|  8.95k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  8.95k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  8.95k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  8.95k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  8.95k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  8.95k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  8.95k|}
  |  |  |  |  ------------------
  |  |  |  |  281|  8.95k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  8.95k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  8.95k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  8.95k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  283|  13.9k|  } else {\
  |  |  |  |  284|  13.9k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  285|  13.9k|    s->bi_valid += len;\
  |  |  |  |  286|  13.9k|  }\
  |  |  |  |  287|  22.8k|}
  |  |  ------------------
  ------------------
  952|  22.8k|}
trees.c:send_all_trees:
  835|  14.9k|                          int blcodes) {
  836|  14.9k|    int rank;                    /* index in bl_order */
  837|       |
  838|  14.9k|    Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
  839|  14.9k|    Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
  840|  14.9k|            "too many codes");
  841|  14.9k|    Tracev((stderr, "\nbl counts: "));
  842|  14.9k|    send_bits(s, lcodes - 257, 5);  /* not +255 as stated in appnote.txt */
  ------------------
  |  |  275|  14.9k|#define send_bits(s, value, length) \
  |  |  276|  14.9k|{ int len = length;\
  |  |  277|  14.9k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  14.9k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (277:7): [True: 0, False: 14.9k]
  |  |  ------------------
  |  |  278|      0|    int val = (int)value;\
  |  |  279|      0|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  280|      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|}
  |  |  ------------------
  |  |  281|      0|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  282|      0|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|      0|#define Buf_size 16
  |  |  ------------------
  |  |  283|  14.9k|  } else {\
  |  |  284|  14.9k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  285|  14.9k|    s->bi_valid += len;\
  |  |  286|  14.9k|  }\
  |  |  287|  14.9k|}
  ------------------
  843|  14.9k|    send_bits(s, dcodes - 1,   5);
  ------------------
  |  |  275|  14.9k|#define send_bits(s, value, length) \
  |  |  276|  14.9k|{ int len = length;\
  |  |  277|  14.9k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  14.9k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (277:7): [True: 5.91k, False: 9.06k]
  |  |  ------------------
  |  |  278|  5.91k|    int val = (int)value;\
  |  |  279|  5.91k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  280|  5.91k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  5.91k|#define put_short(s, w) { \
  |  |  |  |  145|  5.91k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  5.91k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  5.91k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  5.91k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  5.91k|}
  |  |  ------------------
  |  |  281|  5.91k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  5.91k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  5.91k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  5.91k|#define Buf_size 16
  |  |  ------------------
  |  |  283|  9.06k|  } else {\
  |  |  284|  9.06k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  285|  9.06k|    s->bi_valid += len;\
  |  |  286|  9.06k|  }\
  |  |  287|  14.9k|}
  ------------------
  844|  14.9k|    send_bits(s, blcodes - 4,  4);  /* not -3 as stated in appnote.txt */
  ------------------
  |  |  275|  14.9k|#define send_bits(s, value, length) \
  |  |  276|  14.9k|{ int len = length;\
  |  |  277|  14.9k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  14.9k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (277:7): [True: 9.06k, False: 5.91k]
  |  |  ------------------
  |  |  278|  9.06k|    int val = (int)value;\
  |  |  279|  9.06k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  280|  9.06k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  9.06k|#define put_short(s, w) { \
  |  |  |  |  145|  9.06k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  9.06k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  9.06k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  9.06k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  9.06k|}
  |  |  ------------------
  |  |  281|  9.06k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  9.06k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  9.06k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  9.06k|#define Buf_size 16
  |  |  ------------------
  |  |  283|  9.06k|  } else {\
  |  |  284|  5.91k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  285|  5.91k|    s->bi_valid += len;\
  |  |  286|  5.91k|  }\
  |  |  287|  14.9k|}
  ------------------
  845|   281k|    for (rank = 0; rank < blcodes; rank++) {
  ------------------
  |  Branch (845:20): [True: 266k, False: 14.9k]
  ------------------
  846|   266k|        Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
  847|   266k|        send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
  ------------------
  |  |  275|   266k|#define send_bits(s, value, length) \
  |  |  276|   266k|{ int len = length;\
  |  |  277|   266k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|   266k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (277:7): [True: 44.6k, False: 222k]
  |  |  ------------------
  |  |  278|  44.6k|    int val = (int)value;\
  |  |  279|  44.6k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  280|  44.6k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  44.6k|#define put_short(s, w) { \
  |  |  |  |  145|  44.6k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  44.6k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  44.6k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  44.6k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  44.6k|}
  |  |  ------------------
  |  |  281|  44.6k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  44.6k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  44.6k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  44.6k|#define Buf_size 16
  |  |  ------------------
  |  |  283|   222k|  } else {\
  |  |  284|   222k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  285|   222k|    s->bi_valid += len;\
  |  |  286|   222k|  }\
  |  |  287|   266k|}
  ------------------
  848|   266k|    }
  849|  14.9k|    Tracev((stderr, "\nbl tree: sent %lu", s->bits_sent));
  850|       |
  851|  14.9k|    send_tree(s, (ct_data *)s->dyn_ltree, lcodes - 1);  /* literal tree */
  852|  14.9k|    Tracev((stderr, "\nlit tree: sent %lu", s->bits_sent));
  853|       |
  854|  14.9k|    send_tree(s, (ct_data *)s->dyn_dtree, dcodes - 1);  /* distance tree */
  855|  14.9k|    Tracev((stderr, "\ndist tree: sent %lu", s->bits_sent));
  856|  14.9k|}
trees.c:send_tree:
  754|  29.9k|local void send_tree(deflate_state *s, ct_data *tree, int max_code) {
  755|  29.9k|    int n;                     /* iterates over all tree elements */
  756|  29.9k|    int prevlen = -1;          /* last emitted length */
  757|  29.9k|    int curlen;                /* length of current code */
  758|  29.9k|    int nextlen = tree[0].Len; /* length of next code */
  ------------------
  |  |   86|  29.9k|#define Len  dl.len
  ------------------
  759|  29.9k|    int count = 0;             /* repeat count of the current code */
  760|  29.9k|    int max_count = 7;         /* max repeat count */
  761|  29.9k|    int min_count = 4;         /* min repeat count */
  762|       |
  763|       |    /* tree[max_code + 1].Len = -1; */  /* guard already set */
  764|  29.9k|    if (nextlen == 0) max_count = 138, min_count = 3;
  ------------------
  |  Branch (764:9): [True: 4.77k, False: 25.1k]
  ------------------
  765|       |
  766|  3.98M|    for (n = 0; n <= max_code; n++) {
  ------------------
  |  Branch (766:17): [True: 3.95M, False: 29.9k]
  ------------------
  767|  3.95M|        curlen = nextlen; nextlen = tree[n + 1].Len;
  ------------------
  |  |   86|  3.95M|#define Len  dl.len
  ------------------
  768|  3.95M|        if (++count < max_count && curlen == nextlen) {
  ------------------
  |  Branch (768:13): [True: 3.94M, False: 8.58k]
  |  Branch (768:36): [True: 3.18M, False: 761k]
  ------------------
  769|  3.18M|            continue;
  770|  3.18M|        } else if (count < min_count) {
  ------------------
  |  Branch (770:20): [True: 585k, False: 185k]
  ------------------
  771|   721k|            do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
  ------------------
  |  |  240|   721k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  275|   721k|#define send_bits(s, value, length) \
  |  |  |  |  276|   721k|{ int len = length;\
  |  |  |  |  277|   721k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   721k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:7): [True: 117k, False: 603k]
  |  |  |  |  ------------------
  |  |  |  |  278|   117k|    int val = (int)value;\
  |  |  |  |  279|   117k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  280|   117k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|   117k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|   117k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   117k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   117k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|   117k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   117k|}
  |  |  |  |  ------------------
  |  |  |  |  281|   117k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   117k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|   117k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|   117k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  283|   603k|  } else {\
  |  |  |  |  284|   603k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  285|   603k|    s->bi_valid += len;\
  |  |  |  |  286|   603k|  }\
  |  |  |  |  287|   721k|}
  |  |  ------------------
  ------------------
  |  Branch (771:61): [True: 136k, False: 585k]
  ------------------
  772|       |
  773|   585k|        } else if (curlen != 0) {
  ------------------
  |  Branch (773:20): [True: 18.2k, False: 167k]
  ------------------
  774|  18.2k|            if (curlen != prevlen) {
  ------------------
  |  Branch (774:17): [True: 16.0k, False: 2.22k]
  ------------------
  775|  16.0k|                send_code(s, curlen, s->bl_tree); count--;
  ------------------
  |  |  240|  16.0k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  275|  16.0k|#define send_bits(s, value, length) \
  |  |  |  |  276|  16.0k|{ int len = length;\
  |  |  |  |  277|  16.0k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  16.0k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:7): [True: 2.06k, False: 13.9k]
  |  |  |  |  ------------------
  |  |  |  |  278|  2.06k|    int val = (int)value;\
  |  |  |  |  279|  2.06k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  280|  2.06k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  2.06k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  2.06k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  2.06k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  2.06k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  2.06k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  2.06k|}
  |  |  |  |  ------------------
  |  |  |  |  281|  2.06k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  2.06k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  2.06k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  2.06k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  283|  13.9k|  } else {\
  |  |  |  |  284|  13.9k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  285|  13.9k|    s->bi_valid += len;\
  |  |  |  |  286|  13.9k|  }\
  |  |  |  |  287|  16.0k|}
  |  |  ------------------
  ------------------
  776|  16.0k|            }
  777|  18.2k|            Assert(count >= 3 && count <= 6, " 3_6?");
  778|  18.2k|            send_code(s, REP_3_6, s->bl_tree); send_bits(s, count - 3, 2);
  ------------------
  |  |  240|  18.2k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  275|  18.2k|#define send_bits(s, value, length) \
  |  |  |  |  276|  18.2k|{ int len = length;\
  |  |  |  |  277|  18.2k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  18.2k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:7): [True: 4.42k, False: 13.8k]
  |  |  |  |  ------------------
  |  |  |  |  278|  4.42k|    int val = (int)value;\
  |  |  |  |  279|  4.42k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  280|  4.42k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  4.42k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  4.42k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  4.42k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  4.42k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  4.42k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  4.42k|}
  |  |  |  |  ------------------
  |  |  |  |  281|  4.42k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  4.42k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  4.42k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  4.42k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  283|  13.8k|  } else {\
  |  |  |  |  284|  13.8k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  285|  13.8k|    s->bi_valid += len;\
  |  |  |  |  286|  13.8k|  }\
  |  |  |  |  287|  18.2k|}
  |  |  ------------------
  ------------------
                          send_code(s, REP_3_6, s->bl_tree); send_bits(s, count - 3, 2);
  ------------------
  |  |  275|  18.2k|#define send_bits(s, value, length) \
  |  |  276|  18.2k|{ int len = length;\
  |  |  277|  18.2k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  18.2k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (277:7): [True: 2.33k, False: 15.8k]
  |  |  ------------------
  |  |  278|  2.33k|    int val = (int)value;\
  |  |  279|  2.33k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  280|  2.33k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  2.33k|#define put_short(s, w) { \
  |  |  |  |  145|  2.33k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  2.33k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  2.33k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  2.33k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  2.33k|}
  |  |  ------------------
  |  |  281|  2.33k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  2.33k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  2.33k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  2.33k|#define Buf_size 16
  |  |  ------------------
  |  |  283|  15.8k|  } else {\
  |  |  284|  15.8k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  285|  15.8k|    s->bi_valid += len;\
  |  |  286|  15.8k|  }\
  |  |  287|  18.2k|}
  ------------------
  779|       |
  780|   167k|        } else if (count <= 10) {
  ------------------
  |  Branch (780:20): [True: 98.3k, False: 68.6k]
  ------------------
  781|  98.3k|            send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count - 3, 3);
  ------------------
  |  |  240|  98.3k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  275|  98.3k|#define send_bits(s, value, length) \
  |  |  |  |  276|  98.3k|{ int len = length;\
  |  |  |  |  277|  98.3k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  98.3k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:7): [True: 18.0k, False: 80.3k]
  |  |  |  |  ------------------
  |  |  |  |  278|  18.0k|    int val = (int)value;\
  |  |  |  |  279|  18.0k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  280|  18.0k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  18.0k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  18.0k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  18.0k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  18.0k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  18.0k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  18.0k|}
  |  |  |  |  ------------------
  |  |  |  |  281|  18.0k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  18.0k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  18.0k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  18.0k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  283|  80.3k|  } else {\
  |  |  |  |  284|  80.3k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  285|  80.3k|    s->bi_valid += len;\
  |  |  |  |  286|  80.3k|  }\
  |  |  |  |  287|  98.3k|}
  |  |  ------------------
  ------------------
                          send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count - 3, 3);
  ------------------
  |  |  275|  98.3k|#define send_bits(s, value, length) \
  |  |  276|  98.3k|{ int len = length;\
  |  |  277|  98.3k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  98.3k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (277:7): [True: 18.8k, False: 79.5k]
  |  |  ------------------
  |  |  278|  18.8k|    int val = (int)value;\
  |  |  279|  18.8k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  280|  18.8k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  18.8k|#define put_short(s, w) { \
  |  |  |  |  145|  18.8k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  18.8k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  18.8k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  18.8k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  18.8k|}
  |  |  ------------------
  |  |  281|  18.8k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  18.8k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  18.8k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  18.8k|#define Buf_size 16
  |  |  ------------------
  |  |  283|  79.5k|  } else {\
  |  |  284|  79.5k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  285|  79.5k|    s->bi_valid += len;\
  |  |  286|  79.5k|  }\
  |  |  287|  98.3k|}
  ------------------
  782|       |
  783|  98.3k|        } else {
  784|  68.6k|            send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count - 11, 7);
  ------------------
  |  |  240|  68.6k|#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
  |  |  ------------------
  |  |  |  |  275|  68.6k|#define send_bits(s, value, length) \
  |  |  |  |  276|  68.6k|{ int len = length;\
  |  |  |  |  277|  68.6k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  68.6k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:7): [True: 12.5k, False: 56.0k]
  |  |  |  |  ------------------
  |  |  |  |  278|  12.5k|    int val = (int)value;\
  |  |  |  |  279|  12.5k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  |  |  280|  12.5k|    put_short(s, s->bi_buf);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  12.5k|#define put_short(s, w) { \
  |  |  |  |  |  |  145|  12.5k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  12.5k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  12.5k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  293|  12.5k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  12.5k|}
  |  |  |  |  ------------------
  |  |  |  |  281|  12.5k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  12.5k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  282|  12.5k|    s->bi_valid += len - Buf_size;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  12.5k|#define Buf_size 16
  |  |  |  |  ------------------
  |  |  |  |  283|  56.0k|  } else {\
  |  |  |  |  284|  56.0k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  |  |  285|  56.0k|    s->bi_valid += len;\
  |  |  |  |  286|  56.0k|  }\
  |  |  |  |  287|  68.6k|}
  |  |  ------------------
  ------------------
                          send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count - 11, 7);
  ------------------
  |  |  275|  68.6k|#define send_bits(s, value, length) \
  |  |  276|  68.6k|{ int len = length;\
  |  |  277|  68.6k|  if (s->bi_valid > (int)Buf_size - len) {\
  |  |  ------------------
  |  |  |  |   55|  68.6k|#define Buf_size 16
  |  |  ------------------
  |  |  |  Branch (277:7): [True: 29.5k, False: 39.0k]
  |  |  ------------------
  |  |  278|  29.5k|    int val = (int)value;\
  |  |  279|  29.5k|    s->bi_buf |= (ush)val << s->bi_valid;\
  |  |  280|  29.5k|    put_short(s, s->bi_buf);\
  |  |  ------------------
  |  |  |  |  144|  29.5k|#define put_short(s, w) { \
  |  |  |  |  145|  29.5k|    put_byte(s, (uch)((w) & 0xff)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  29.5k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  146|  29.5k|    put_byte(s, (uch)((ush)(w) >> 8)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  293|  29.5k|#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
  |  |  |  |  ------------------
  |  |  |  |  147|  29.5k|}
  |  |  ------------------
  |  |  281|  29.5k|    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
  |  |  ------------------
  |  |  |  |   55|  29.5k|#define Buf_size 16
  |  |  ------------------
  |  |  282|  29.5k|    s->bi_valid += len - Buf_size;\
  |  |  ------------------
  |  |  |  |   55|  29.5k|#define Buf_size 16
  |  |  ------------------
  |  |  283|  39.0k|  } else {\
  |  |  284|  39.0k|    s->bi_buf |= (ush)(value) << s->bi_valid;\
  |  |  285|  39.0k|    s->bi_valid += len;\
  |  |  286|  39.0k|  }\
  |  |  287|  68.6k|}
  ------------------
  785|  68.6k|        }
  786|   770k|        count = 0; prevlen = curlen;
  787|   770k|        if (nextlen == 0) {
  ------------------
  |  Branch (787:13): [True: 271k, False: 498k]
  ------------------
  788|   271k|            max_count = 138, min_count = 3;
  789|   498k|        } else if (curlen == nextlen) {
  ------------------
  |  Branch (789:20): [True: 3.36k, False: 495k]
  ------------------
  790|  3.36k|            max_count = 6, min_count = 3;
  791|   495k|        } else {
  792|   495k|            max_count = 7, min_count = 4;
  793|   495k|        }
  794|   770k|    }
  795|  29.9k|}

zcalloc:
  324|  28.8k|voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) {
  325|  28.8k|    (void)opaque;
  326|  28.8k|    return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
  ------------------
  |  Branch (326:12): [True: 28.8k, Folded]
  ------------------
  327|  28.8k|                              (voidpf)calloc(items, size);
  328|  28.8k|}
zcfree:
  330|  28.8k|void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) {
  331|  28.8k|    (void)opaque;
  332|  28.8k|    free(ptr);
  333|  28.8k|}

