flb_http_client.c:flb_log_check:
  102|  2.37k|static inline int flb_log_check(int l) {
  103|  2.37k|    struct flb_worker *w;
  104|  2.37k|    w = (struct flb_worker *) FLB_TLS_GET(flb_worker_ctx);
  ------------------
  |  |   34|  2.37k|#define FLB_TLS_GET(key)           key
  ------------------
  105|  2.37k|    if (!w && l <= 3) {
  ------------------
  |  Branch (105:9): [True: 2.37k, False: 0]
  |  Branch (105:15): [True: 1.11k, False: 1.26k]
  ------------------
  106|  1.11k|        return FLB_TRUE;
  ------------------
  |  |   26|  1.11k|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|  1.11k|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  107|  1.11k|    }
  108|       |
  109|  1.26k|    if (w == NULL || flb_worker_log_level(w) < l) {
  ------------------
  |  Branch (109:9): [True: 1.26k, False: 0]
  |  Branch (109:22): [True: 0, False: 0]
  ------------------
  110|  1.26k|        return FLB_FALSE;
  ------------------
  |  |   25|  1.26k|#define FLB_FALSE  0
  ------------------
  111|  1.26k|    }
  112|      0|    return FLB_TRUE;
  ------------------
  |  |   26|      0|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      0|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  113|  1.26k|}
flb_log.c:flb_log_check:
  102|    815|static inline int flb_log_check(int l) {
  103|    815|    struct flb_worker *w;
  104|    815|    w = (struct flb_worker *) FLB_TLS_GET(flb_worker_ctx);
  ------------------
  |  |   34|    815|#define FLB_TLS_GET(key)           key
  ------------------
  105|    815|    if (!w && l <= 3) {
  ------------------
  |  Branch (105:9): [True: 815, False: 0]
  |  Branch (105:15): [True: 815, False: 0]
  ------------------
  106|    815|        return FLB_TRUE;
  ------------------
  |  |   26|    815|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    815|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  107|    815|    }
  108|       |
  109|      0|    if (w == NULL || flb_worker_log_level(w) < l) {
  ------------------
  |  Branch (109:9): [True: 0, False: 0]
  |  Branch (109:22): [True: 0, False: 0]
  ------------------
  110|      0|        return FLB_FALSE;
  ------------------
  |  |   25|      0|#define FLB_FALSE  0
  ------------------
  111|      0|    }
  112|      0|    return FLB_TRUE;
  ------------------
  |  |   26|      0|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      0|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  113|      0|}

http_fuzzer.c:flb_malloc:
   67|  1.22k|void *flb_malloc(const size_t size) {
   68|       |
   69|  1.22k|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|  1.22k|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 1.22k]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|  1.22k|#endif
   75|       |
   76|  1.22k|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 1.22k]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|  1.22k|    return malloc(size);
   81|  1.22k|}
http_fuzzer.c:flb_fuzz_get_probability:
   56|  1.22k|static inline int flb_fuzz_get_probability(int val) {
   57|  1.22k|  flb_malloc_p += 1;
   58|  1.22k|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|  1.22k|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 1.22k]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|  1.22k|  return 0;
   63|  1.22k|}
http_fuzzer.c:flb_free:
  126|  1.22k|static inline void flb_free(void *ptr) {
  127|  1.22k|    free(ptr);
  128|  1.22k|}
flb_config.c:flb_malloc:
   67|  25.1k|void *flb_malloc(const size_t size) {
   68|       |
   69|  25.1k|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|  25.1k|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 25.1k]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|  25.1k|#endif
   75|       |
   76|  25.1k|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 25.1k]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|  25.1k|    return malloc(size);
   81|  25.1k|}
flb_config.c:flb_fuzz_get_probability:
   56|  25.6k|static inline int flb_fuzz_get_probability(int val) {
   57|  25.6k|  flb_malloc_p += 1;
   58|  25.6k|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|  25.6k|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 25.6k]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|  25.6k|  return 0;
   63|  25.6k|}
flb_config.c:flb_free:
  126|  26.4k|static inline void flb_free(void *ptr) {
  127|  26.4k|    free(ptr);
  128|  26.4k|}
flb_config.c:flb_calloc:
   84|    413|void *flb_calloc(size_t n, const size_t size) {
   85|    413|    if (size == 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 413]
  ------------------
   86|      0|        return NULL;
   87|      0|    }
   88|    413|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   89|       |   // Add chance of failure. Used by fuzzing to test error-handling code.
   90|    413|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (90:8): [True: 0, False: 413]
  ------------------
   91|      0|     return NULL;
   92|      0|   }
   93|    413|#endif
   94|       |
   95|    413|    return calloc(n, size);
   96|    413|}
flb_connection.c:flb_calloc:
   84|    413|void *flb_calloc(size_t n, const size_t size) {
   85|    413|    if (size == 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 413]
  ------------------
   86|      0|        return NULL;
   87|      0|    }
   88|    413|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   89|       |   // Add chance of failure. Used by fuzzing to test error-handling code.
   90|    413|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (90:8): [True: 0, False: 413]
  ------------------
   91|      0|     return NULL;
   92|      0|   }
   93|    413|#endif
   94|       |
   95|    413|    return calloc(n, size);
   96|    413|}
flb_connection.c:flb_fuzz_get_probability:
   56|    413|static inline int flb_fuzz_get_probability(int val) {
   57|    413|  flb_malloc_p += 1;
   58|    413|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|    413|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 413]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|    413|  return 0;
   63|    413|}
flb_connection.c:flb_free:
  126|    413|static inline void flb_free(void *ptr) {
  127|    413|    free(ptr);
  128|    413|}
flb_upstream.c:flb_calloc:
   84|    413|void *flb_calloc(size_t n, const size_t size) {
   85|    413|    if (size == 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 413]
  ------------------
   86|      0|        return NULL;
   87|      0|    }
   88|    413|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   89|       |   // Add chance of failure. Used by fuzzing to test error-handling code.
   90|    413|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (90:8): [True: 0, False: 413]
  ------------------
   91|      0|     return NULL;
   92|      0|   }
   93|    413|#endif
   94|       |
   95|    413|    return calloc(n, size);
   96|    413|}
flb_upstream.c:flb_fuzz_get_probability:
   56|    826|static inline int flb_fuzz_get_probability(int val) {
   57|    826|  flb_malloc_p += 1;
   58|    826|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|    826|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 826]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|    826|  return 0;
   63|    826|}
flb_upstream.c:flb_free:
  126|  2.06k|static inline void flb_free(void *ptr) {
  127|  2.06k|    free(ptr);
  128|  2.06k|}
flb_upstream.c:flb_malloc:
   67|    413|void *flb_malloc(const size_t size) {
   68|       |
   69|    413|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|    413|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 413]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|    413|#endif
   75|       |
   76|    413|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 413]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|    413|    return malloc(size);
   81|    413|}
flb_plugin.c:flb_malloc:
   67|    413|void *flb_malloc(const size_t size) {
   68|       |
   69|    413|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|    413|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 413]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|    413|#endif
   75|       |
   76|    413|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 413]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|    413|    return malloc(size);
   81|    413|}
flb_plugin.c:flb_fuzz_get_probability:
   56|    413|static inline int flb_fuzz_get_probability(int val) {
   57|    413|  flb_malloc_p += 1;
   58|    413|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|    413|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 413]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|    413|  return 0;
   63|    413|}
flb_plugin.c:flb_free:
  126|    413|static inline void flb_free(void *ptr) {
  127|    413|    free(ptr);
  128|    413|}
flb_http_client.c:flb_calloc:
   84|  1.65k|void *flb_calloc(size_t n, const size_t size) {
   85|  1.65k|    if (size == 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 1.65k]
  ------------------
   86|      0|        return NULL;
   87|      0|    }
   88|  1.65k|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   89|       |   // Add chance of failure. Used by fuzzing to test error-handling code.
   90|  1.65k|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (90:8): [True: 0, False: 1.65k]
  ------------------
   91|      0|     return NULL;
   92|      0|   }
   93|  1.65k|#endif
   94|       |
   95|  1.65k|    return calloc(n, size);
   96|  1.65k|}
flb_http_client.c:flb_fuzz_get_probability:
   56|  3.74k|static inline int flb_fuzz_get_probability(int val) {
   57|  3.74k|  flb_malloc_p += 1;
   58|  3.74k|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|  3.74k|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 3.74k]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|  3.74k|  return 0;
   63|  3.74k|}
flb_http_client.c:flb_free:
  126|  4.58k|static inline void flb_free(void *ptr) {
  127|  4.58k|    free(ptr);
  128|  4.58k|}
flb_http_client.c:flb_malloc:
   67|  2.09k|void *flb_malloc(const size_t size) {
   68|       |
   69|  2.09k|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|  2.09k|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 2.09k]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|  2.09k|#endif
   75|       |
   76|  2.09k|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 2.09k]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|  2.09k|    return malloc(size);
   81|  2.09k|}
flb_http_client.c:flb_realloc:
  100|    182|{
  101|    182|    return realloc(ptr, size);
  102|    182|}
flb_config_format.c:flb_calloc:
   84|    413|void *flb_calloc(size_t n, const size_t size) {
   85|    413|    if (size == 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 413]
  ------------------
   86|      0|        return NULL;
   87|      0|    }
   88|    413|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   89|       |   // Add chance of failure. Used by fuzzing to test error-handling code.
   90|    413|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (90:8): [True: 0, False: 413]
  ------------------
   91|      0|     return NULL;
   92|      0|   }
   93|    413|#endif
   94|       |
   95|    413|    return calloc(n, size);
   96|    413|}
flb_config_format.c:flb_fuzz_get_probability:
   56|    826|static inline int flb_fuzz_get_probability(int val) {
   57|    826|  flb_malloc_p += 1;
   58|    826|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|    826|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 826]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|    826|  return 0;
   63|    826|}
flb_config_format.c:flb_free:
  126|    826|static inline void flb_free(void *ptr) {
  127|    826|    free(ptr);
  128|    826|}
flb_config_format.c:flb_malloc:
   67|    413|void *flb_malloc(const size_t size) {
   68|       |
   69|    413|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|    413|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 413]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|    413|#endif
   75|       |
   76|    413|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 413]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|    413|    return malloc(size);
   81|    413|}
flb_parser.c:flb_calloc:
   84|    826|void *flb_calloc(size_t n, const size_t size) {
   85|    826|    if (size == 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 826]
  ------------------
   86|      0|        return NULL;
   87|      0|    }
   88|    826|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   89|       |   // Add chance of failure. Used by fuzzing to test error-handling code.
   90|    826|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (90:8): [True: 0, False: 826]
  ------------------
   91|      0|     return NULL;
   92|      0|   }
   93|    826|#endif
   94|       |
   95|    826|    return calloc(n, size);
   96|    826|}
flb_parser.c:flb_fuzz_get_probability:
   56|  4.54k|static inline int flb_fuzz_get_probability(int val) {
   57|  4.54k|  flb_malloc_p += 1;
   58|  4.54k|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|  4.54k|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 4.54k]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|  4.54k|  return 0;
   63|  4.54k|}
flb_parser.c:flb_free:
  126|  4.54k|static inline void flb_free(void *ptr) {
  127|  4.54k|    free(ptr);
  128|  4.54k|}
flb_parser.c:flb_malloc:
   67|  3.71k|void *flb_malloc(const size_t size) {
   68|       |
   69|  3.71k|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|  3.71k|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 3.71k]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|  3.71k|#endif
   75|       |
   76|  3.71k|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 3.71k]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|  3.71k|    return malloc(size);
   81|  3.71k|}
flb_regex.c:flb_malloc:
   67|  9.49k|void *flb_malloc(const size_t size) {
   68|       |
   69|  9.49k|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|  9.49k|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 9.49k]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|  9.49k|#endif
   75|       |
   76|  9.49k|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 9.49k]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|  9.49k|    return malloc(size);
   81|  9.49k|}
flb_regex.c:flb_fuzz_get_probability:
   56|  9.49k|static inline int flb_fuzz_get_probability(int val) {
   57|  9.49k|  flb_malloc_p += 1;
   58|  9.49k|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|  9.49k|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 9.49k]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|  9.49k|  return 0;
   63|  9.49k|}
flb_regex.c:flb_free:
  126|  9.49k|static inline void flb_free(void *ptr) {
  127|  9.49k|    free(ptr);
  128|  9.49k|}
flb_kv.c:flb_calloc:
   84|  4.07k|void *flb_calloc(size_t n, const size_t size) {
   85|  4.07k|    if (size == 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 4.07k]
  ------------------
   86|      0|        return NULL;
   87|      0|    }
   88|  4.07k|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   89|       |   // Add chance of failure. Used by fuzzing to test error-handling code.
   90|  4.07k|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (90:8): [True: 0, False: 4.07k]
  ------------------
   91|      0|     return NULL;
   92|      0|   }
   93|  4.07k|#endif
   94|       |
   95|  4.07k|    return calloc(n, size);
   96|  4.07k|}
flb_kv.c:flb_fuzz_get_probability:
   56|  4.07k|static inline int flb_fuzz_get_probability(int val) {
   57|  4.07k|  flb_malloc_p += 1;
   58|  4.07k|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|  4.07k|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 4.07k]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|  4.07k|  return 0;
   63|  4.07k|}
flb_kv.c:flb_free:
  126|  4.07k|static inline void flb_free(void *ptr) {
  127|  4.07k|    free(ptr);
  128|  4.07k|}
flb_env.c:flb_malloc:
   67|    413|void *flb_malloc(const size_t size) {
   68|       |
   69|    413|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|    413|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 413]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|    413|#endif
   75|       |
   76|    413|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 413]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|    413|    return malloc(size);
   81|    413|}
flb_env.c:flb_fuzz_get_probability:
   56|    413|static inline int flb_fuzz_get_probability(int val) {
   57|    413|  flb_malloc_p += 1;
   58|    413|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|    413|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 413]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|    413|  return 0;
   63|    413|}
flb_env.c:flb_free:
  126|    413|static inline void flb_free(void *ptr) {
  127|    413|    free(ptr);
  128|    413|}
flb_hash_table.c:flb_malloc:
   67|    413|void *flb_malloc(const size_t size) {
   68|       |
   69|    413|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|    413|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 413]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|    413|#endif
   75|       |
   76|    413|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 413]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|    413|    return malloc(size);
   81|    413|}
flb_hash_table.c:flb_fuzz_get_probability:
   56|    826|static inline int flb_fuzz_get_probability(int val) {
   57|    826|  flb_malloc_p += 1;
   58|    826|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|    826|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 826]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|    826|  return 0;
   63|    826|}
flb_hash_table.c:flb_calloc:
   84|    413|void *flb_calloc(size_t n, const size_t size) {
   85|    413|    if (size == 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 413]
  ------------------
   86|      0|        return NULL;
   87|      0|    }
   88|    413|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   89|       |   // Add chance of failure. Used by fuzzing to test error-handling code.
   90|    413|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (90:8): [True: 0, False: 413]
  ------------------
   91|      0|     return NULL;
   92|      0|   }
   93|    413|#endif
   94|       |
   95|    413|    return calloc(n, size);
   96|    413|}
flb_hash_table.c:flb_free:
  126|    826|static inline void flb_free(void *ptr) {
  127|    826|    free(ptr);
  128|    826|}
flb_sds.c:flb_malloc:
   67|  37.4k|void *flb_malloc(const size_t size) {
   68|       |
   69|  37.4k|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|  37.4k|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 37.4k]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|  37.4k|#endif
   75|       |
   76|  37.4k|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 37.4k]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|  37.4k|    return malloc(size);
   81|  37.4k|}
flb_sds.c:flb_fuzz_get_probability:
   56|  37.4k|static inline int flb_fuzz_get_probability(int val) {
   57|  37.4k|  flb_malloc_p += 1;
   58|  37.4k|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|  37.4k|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 37.4k]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|  37.4k|  return 0;
   63|  37.4k|}
flb_sds.c:flb_realloc:
  100|    826|{
  101|    826|    return realloc(ptr, size);
  102|    826|}
flb_sds.c:flb_free:
  126|  37.4k|static inline void flb_free(void *ptr) {
  127|  37.4k|    free(ptr);
  128|  37.4k|}
flb_kernel.c:flb_malloc:
   67|    826|void *flb_malloc(const size_t size) {
   68|       |
   69|    826|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|    826|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 826]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|    826|#endif
   75|       |
   76|    826|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 826]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|    826|    return malloc(size);
   81|    826|}
flb_kernel.c:flb_fuzz_get_probability:
   56|    826|static inline int flb_fuzz_get_probability(int val) {
   57|    826|  flb_malloc_p += 1;
   58|    826|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|    826|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 826]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|    826|  return 0;
   63|    826|}
flb_slist.c:flb_malloc:
   67|  13.2k|void *flb_malloc(const size_t size) {
   68|       |
   69|  13.2k|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|  13.2k|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 13.2k]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|  13.2k|#endif
   75|       |
   76|  13.2k|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 13.2k]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|  13.2k|    return malloc(size);
   81|  13.2k|}
flb_slist.c:flb_fuzz_get_probability:
   56|  13.2k|static inline int flb_fuzz_get_probability(int val) {
   57|  13.2k|  flb_malloc_p += 1;
   58|  13.2k|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|  13.2k|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 13.2k]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|  13.2k|  return 0;
   63|  13.2k|}
flb_slist.c:flb_free:
  126|  13.2k|static inline void flb_free(void *ptr) {
  127|  13.2k|    free(ptr);
  128|  13.2k|}
flb_ml_parser.c:flb_calloc:
   84|  2.47k|void *flb_calloc(size_t n, const size_t size) {
   85|  2.47k|    if (size == 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 2.47k]
  ------------------
   86|      0|        return NULL;
   87|      0|    }
   88|  2.47k|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   89|       |   // Add chance of failure. Used by fuzzing to test error-handling code.
   90|  2.47k|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (90:8): [True: 0, False: 2.47k]
  ------------------
   91|      0|     return NULL;
   92|      0|   }
   93|  2.47k|#endif
   94|       |
   95|  2.47k|    return calloc(n, size);
   96|  2.47k|}
flb_ml_parser.c:flb_fuzz_get_probability:
   56|  2.47k|static inline int flb_fuzz_get_probability(int val) {
   57|  2.47k|  flb_malloc_p += 1;
   58|  2.47k|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|  2.47k|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 2.47k]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|  2.47k|  return 0;
   63|  2.47k|}
flb_ml_parser.c:flb_free:
  126|  2.47k|static inline void flb_free(void *ptr) {
  127|  2.47k|    free(ptr);
  128|  2.47k|}
flb_ml_rule.c:flb_calloc:
   84|  9.08k|void *flb_calloc(size_t n, const size_t size) {
   85|  9.08k|    if (size == 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 9.08k]
  ------------------
   86|      0|        return NULL;
   87|      0|    }
   88|  9.08k|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   89|       |   // Add chance of failure. Used by fuzzing to test error-handling code.
   90|  9.08k|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (90:8): [True: 0, False: 9.08k]
  ------------------
   91|      0|     return NULL;
   92|      0|   }
   93|  9.08k|#endif
   94|       |
   95|  9.08k|    return calloc(n, size);
   96|  9.08k|}
flb_ml_rule.c:flb_fuzz_get_probability:
   56|  34.6k|static inline int flb_fuzz_get_probability(int val) {
   57|  34.6k|  flb_malloc_p += 1;
   58|  34.6k|  flb_malloc_p = flb_malloc_p % flb_malloc_mod;
   59|  34.6k|  if (val > flb_malloc_p) {
  ------------------
  |  Branch (59:7): [True: 0, False: 34.6k]
  ------------------
   60|      0|    return 1;
   61|      0|  }
   62|  34.6k|  return 0;
   63|  34.6k|}
flb_ml_rule.c:flb_free:
  126|  34.6k|static inline void flb_free(void *ptr) {
  127|  34.6k|    free(ptr);
  128|  34.6k|}
flb_ml_rule.c:flb_malloc:
   67|  25.6k|void *flb_malloc(const size_t size) {
   68|       |
   69|  25.6k|#ifdef FLB_HAVE_TESTS_OSSFUZZ
   70|       |   // 1% chance of failure
   71|  25.6k|   if (flb_fuzz_get_probability(1)) {
  ------------------
  |  Branch (71:8): [True: 0, False: 25.6k]
  ------------------
   72|      0|     return NULL;
   73|      0|   }
   74|  25.6k|#endif
   75|       |
   76|  25.6k|    if (size == 0) {
  ------------------
  |  Branch (76:9): [True: 0, False: 25.6k]
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|  25.6k|    return malloc(size);
   81|  25.6k|}

flb_plugins_register:
   95|    413|{
   96|    413|    struct flb_custom_plugin *custom;
   97|    413|    struct flb_input_plugin *in;
   98|    413|    struct flb_output_plugin *out;
   99|    413|    struct flb_filter_plugin *filter;
  100|       |
  101|       |
  102|    413|    custom = flb_malloc(sizeof(struct flb_custom_plugin));
  103|    413|    if (!custom) {
  ------------------
  |  Branch (103:9): [True: 0, False: 413]
  ------------------
  104|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  105|      0|        return -1;
  106|      0|    }
  107|    413|    memcpy(custom, &custom_calyptia_plugin, sizeof(struct flb_custom_plugin));
  108|    413|    mk_list_add(&custom->_head, &config->custom_plugins);
  109|       |
  110|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  111|    413|    if (!in) {
  ------------------
  |  Branch (111:9): [True: 0, False: 413]
  ------------------
  112|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  113|      0|        return -1;
  114|      0|    }
  115|    413|    memcpy(in, &in_docker_events_plugin, sizeof(struct flb_input_plugin));
  116|    413|    mk_list_add(&in->_head, &config->in_plugins);
  117|       |
  118|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  119|    413|    if (!in) {
  ------------------
  |  Branch (119:9): [True: 0, False: 413]
  ------------------
  120|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  121|      0|        return -1;
  122|      0|    }
  123|    413|    memcpy(in, &in_node_exporter_metrics_plugin, sizeof(struct flb_input_plugin));
  124|    413|    mk_list_add(&in->_head, &config->in_plugins);
  125|       |
  126|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  127|    413|    if (!in) {
  ------------------
  |  Branch (127:9): [True: 0, False: 413]
  ------------------
  128|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  129|      0|        return -1;
  130|      0|    }
  131|    413|    memcpy(in, &in_fluentbit_metrics_plugin, sizeof(struct flb_input_plugin));
  132|    413|    mk_list_add(&in->_head, &config->in_plugins);
  133|       |
  134|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  135|    413|    if (!in) {
  ------------------
  |  Branch (135:9): [True: 0, False: 413]
  ------------------
  136|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  137|      0|        return -1;
  138|      0|    }
  139|    413|    memcpy(in, &in_prometheus_scrape_plugin, sizeof(struct flb_input_plugin));
  140|    413|    mk_list_add(&in->_head, &config->in_plugins);
  141|       |
  142|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  143|    413|    if (!in) {
  ------------------
  |  Branch (143:9): [True: 0, False: 413]
  ------------------
  144|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  145|      0|        return -1;
  146|      0|    }
  147|    413|    memcpy(in, &in_emitter_plugin, sizeof(struct flb_input_plugin));
  148|    413|    mk_list_add(&in->_head, &config->in_plugins);
  149|       |
  150|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  151|    413|    if (!in) {
  ------------------
  |  Branch (151:9): [True: 0, False: 413]
  ------------------
  152|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  153|      0|        return -1;
  154|      0|    }
  155|    413|    memcpy(in, &in_dummy_plugin, sizeof(struct flb_input_plugin));
  156|    413|    mk_list_add(&in->_head, &config->in_plugins);
  157|       |
  158|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  159|    413|    if (!in) {
  ------------------
  |  Branch (159:9): [True: 0, False: 413]
  ------------------
  160|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  161|      0|        return -1;
  162|      0|    }
  163|    413|    memcpy(in, &in_http_plugin, sizeof(struct flb_input_plugin));
  164|    413|    mk_list_add(&in->_head, &config->in_plugins);
  165|       |
  166|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  167|    413|    if (!in) {
  ------------------
  |  Branch (167:9): [True: 0, False: 413]
  ------------------
  168|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  169|      0|        return -1;
  170|      0|    }
  171|    413|    memcpy(in, &in_statsd_plugin, sizeof(struct flb_input_plugin));
  172|    413|    mk_list_add(&in->_head, &config->in_plugins);
  173|       |
  174|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  175|    413|    if (!in) {
  ------------------
  |  Branch (175:9): [True: 0, False: 413]
  ------------------
  176|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  177|      0|        return -1;
  178|      0|    }
  179|    413|    memcpy(in, &in_opentelemetry_plugin, sizeof(struct flb_input_plugin));
  180|    413|    mk_list_add(&in->_head, &config->in_plugins);
  181|       |
  182|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  183|    413|    if (!in) {
  ------------------
  |  Branch (183:9): [True: 0, False: 413]
  ------------------
  184|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  185|      0|        return -1;
  186|      0|    }
  187|    413|    memcpy(in, &in_elasticsearch_plugin, sizeof(struct flb_input_plugin));
  188|    413|    mk_list_add(&in->_head, &config->in_plugins);
  189|       |
  190|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  191|    413|    if (!in) {
  ------------------
  |  Branch (191:9): [True: 0, False: 413]
  ------------------
  192|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  193|      0|        return -1;
  194|      0|    }
  195|    413|    memcpy(in, &in_event_test_plugin, sizeof(struct flb_input_plugin));
  196|    413|    mk_list_add(&in->_head, &config->in_plugins);
  197|       |
  198|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  199|    413|    if (!in) {
  ------------------
  |  Branch (199:9): [True: 0, False: 413]
  ------------------
  200|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  201|      0|        return -1;
  202|      0|    }
  203|    413|    memcpy(in, &in_event_type_plugin, sizeof(struct flb_input_plugin));
  204|    413|    mk_list_add(&in->_head, &config->in_plugins);
  205|       |
  206|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  207|    413|    if (!in) {
  ------------------
  |  Branch (207:9): [True: 0, False: 413]
  ------------------
  208|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  209|      0|        return -1;
  210|      0|    }
  211|    413|    memcpy(in, &in_storage_backlog_plugin, sizeof(struct flb_input_plugin));
  212|    413|    mk_list_add(&in->_head, &config->in_plugins);
  213|       |
  214|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  215|    413|    if (!in) {
  ------------------
  |  Branch (215:9): [True: 0, False: 413]
  ------------------
  216|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  217|      0|        return -1;
  218|      0|    }
  219|    413|    memcpy(in, &in_nginx_exporter_metrics_plugin, sizeof(struct flb_input_plugin));
  220|    413|    mk_list_add(&in->_head, &config->in_plugins);
  221|       |
  222|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  223|    413|    if (!in) {
  ------------------
  |  Branch (223:9): [True: 0, False: 413]
  ------------------
  224|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  225|      0|        return -1;
  226|      0|    }
  227|    413|    memcpy(in, &in_udp_plugin, sizeof(struct flb_input_plugin));
  228|    413|    mk_list_add(&in->_head, &config->in_plugins);
  229|       |
  230|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  231|    413|    if (!in) {
  ------------------
  |  Branch (231:9): [True: 0, False: 413]
  ------------------
  232|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  233|      0|        return -1;
  234|      0|    }
  235|    413|    memcpy(in, &in_exec_wasi_plugin, sizeof(struct flb_input_plugin));
  236|    413|    mk_list_add(&in->_head, &config->in_plugins);
  237|       |
  238|    413|    in = flb_malloc(sizeof(struct flb_input_plugin));
  239|    413|    if (!in) {
  ------------------
  |  Branch (239:9): [True: 0, False: 413]
  ------------------
  240|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  241|      0|        return -1;
  242|      0|    }
  243|    413|    memcpy(in, &in_lib_plugin, sizeof(struct flb_input_plugin));
  244|    413|    mk_list_add(&in->_head, &config->in_plugins);
  245|       |
  246|       |
  247|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  248|    413|    if (!out) {
  ------------------
  |  Branch (248:9): [True: 0, False: 413]
  ------------------
  249|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  250|      0|        return -1;
  251|      0|    }
  252|    413|    memcpy(out, &out_azure_blob_plugin, sizeof(struct flb_output_plugin));
  253|    413|    mk_list_add(&out->_head, &config->out_plugins);
  254|       |
  255|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  256|    413|    if (!out) {
  ------------------
  |  Branch (256:9): [True: 0, False: 413]
  ------------------
  257|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  258|      0|        return -1;
  259|      0|    }
  260|    413|    memcpy(out, &out_azure_kusto_plugin, sizeof(struct flb_output_plugin));
  261|    413|    mk_list_add(&out->_head, &config->out_plugins);
  262|       |
  263|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  264|    413|    if (!out) {
  ------------------
  |  Branch (264:9): [True: 0, False: 413]
  ------------------
  265|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  266|      0|        return -1;
  267|      0|    }
  268|    413|    memcpy(out, &out_calyptia_plugin, sizeof(struct flb_output_plugin));
  269|    413|    mk_list_add(&out->_head, &config->out_plugins);
  270|       |
  271|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  272|    413|    if (!out) {
  ------------------
  |  Branch (272:9): [True: 0, False: 413]
  ------------------
  273|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  274|      0|        return -1;
  275|      0|    }
  276|    413|    memcpy(out, &out_exit_plugin, sizeof(struct flb_output_plugin));
  277|    413|    mk_list_add(&out->_head, &config->out_plugins);
  278|       |
  279|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  280|    413|    if (!out) {
  ------------------
  |  Branch (280:9): [True: 0, False: 413]
  ------------------
  281|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  282|      0|        return -1;
  283|      0|    }
  284|    413|    memcpy(out, &out_http_plugin, sizeof(struct flb_output_plugin));
  285|    413|    mk_list_add(&out->_head, &config->out_plugins);
  286|       |
  287|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  288|    413|    if (!out) {
  ------------------
  |  Branch (288:9): [True: 0, False: 413]
  ------------------
  289|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  290|      0|        return -1;
  291|      0|    }
  292|    413|    memcpy(out, &out_logdna_plugin, sizeof(struct flb_output_plugin));
  293|    413|    mk_list_add(&out->_head, &config->out_plugins);
  294|       |
  295|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  296|    413|    if (!out) {
  ------------------
  |  Branch (296:9): [True: 0, False: 413]
  ------------------
  297|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  298|      0|        return -1;
  299|      0|    }
  300|    413|    memcpy(out, &out_opensearch_plugin, sizeof(struct flb_output_plugin));
  301|    413|    mk_list_add(&out->_head, &config->out_plugins);
  302|       |
  303|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  304|    413|    if (!out) {
  ------------------
  |  Branch (304:9): [True: 0, False: 413]
  ------------------
  305|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  306|      0|        return -1;
  307|      0|    }
  308|    413|    memcpy(out, &out_skywalking_plugin, sizeof(struct flb_output_plugin));
  309|    413|    mk_list_add(&out->_head, &config->out_plugins);
  310|       |
  311|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  312|    413|    if (!out) {
  ------------------
  |  Branch (312:9): [True: 0, False: 413]
  ------------------
  313|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  314|      0|        return -1;
  315|      0|    }
  316|    413|    memcpy(out, &out_stdout_plugin, sizeof(struct flb_output_plugin));
  317|    413|    mk_list_add(&out->_head, &config->out_plugins);
  318|       |
  319|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  320|    413|    if (!out) {
  ------------------
  |  Branch (320:9): [True: 0, False: 413]
  ------------------
  321|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  322|      0|        return -1;
  323|      0|    }
  324|    413|    memcpy(out, &out_udp_plugin, sizeof(struct flb_output_plugin));
  325|    413|    mk_list_add(&out->_head, &config->out_plugins);
  326|       |
  327|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  328|    413|    if (!out) {
  ------------------
  |  Branch (328:9): [True: 0, False: 413]
  ------------------
  329|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  330|      0|        return -1;
  331|      0|    }
  332|    413|    memcpy(out, &out_td_plugin, sizeof(struct flb_output_plugin));
  333|    413|    mk_list_add(&out->_head, &config->out_plugins);
  334|       |
  335|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  336|    413|    if (!out) {
  ------------------
  |  Branch (336:9): [True: 0, False: 413]
  ------------------
  337|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  338|      0|        return -1;
  339|      0|    }
  340|    413|    memcpy(out, &out_lib_plugin, sizeof(struct flb_output_plugin));
  341|    413|    mk_list_add(&out->_head, &config->out_plugins);
  342|       |
  343|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  344|    413|    if (!out) {
  ------------------
  |  Branch (344:9): [True: 0, False: 413]
  ------------------
  345|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  346|      0|        return -1;
  347|      0|    }
  348|    413|    memcpy(out, &out_websocket_plugin, sizeof(struct flb_output_plugin));
  349|    413|    mk_list_add(&out->_head, &config->out_plugins);
  350|       |
  351|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  352|    413|    if (!out) {
  ------------------
  |  Branch (352:9): [True: 0, False: 413]
  ------------------
  353|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  354|      0|        return -1;
  355|      0|    }
  356|    413|    memcpy(out, &out_cloudwatch_logs_plugin, sizeof(struct flb_output_plugin));
  357|    413|    mk_list_add(&out->_head, &config->out_plugins);
  358|       |
  359|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  360|    413|    if (!out) {
  ------------------
  |  Branch (360:9): [True: 0, False: 413]
  ------------------
  361|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  362|      0|        return -1;
  363|      0|    }
  364|    413|    memcpy(out, &out_kinesis_firehose_plugin, sizeof(struct flb_output_plugin));
  365|    413|    mk_list_add(&out->_head, &config->out_plugins);
  366|       |
  367|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  368|    413|    if (!out) {
  ------------------
  |  Branch (368:9): [True: 0, False: 413]
  ------------------
  369|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  370|      0|        return -1;
  371|      0|    }
  372|    413|    memcpy(out, &out_kinesis_streams_plugin, sizeof(struct flb_output_plugin));
  373|    413|    mk_list_add(&out->_head, &config->out_plugins);
  374|       |
  375|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  376|    413|    if (!out) {
  ------------------
  |  Branch (376:9): [True: 0, False: 413]
  ------------------
  377|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  378|      0|        return -1;
  379|      0|    }
  380|    413|    memcpy(out, &out_opentelemetry_plugin, sizeof(struct flb_output_plugin));
  381|    413|    mk_list_add(&out->_head, &config->out_plugins);
  382|       |
  383|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  384|    413|    if (!out) {
  ------------------
  |  Branch (384:9): [True: 0, False: 413]
  ------------------
  385|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  386|      0|        return -1;
  387|      0|    }
  388|    413|    memcpy(out, &out_prometheus_exporter_plugin, sizeof(struct flb_output_plugin));
  389|    413|    mk_list_add(&out->_head, &config->out_plugins);
  390|       |
  391|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  392|    413|    if (!out) {
  ------------------
  |  Branch (392:9): [True: 0, False: 413]
  ------------------
  393|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  394|      0|        return -1;
  395|      0|    }
  396|    413|    memcpy(out, &out_prometheus_remote_write_plugin, sizeof(struct flb_output_plugin));
  397|    413|    mk_list_add(&out->_head, &config->out_plugins);
  398|       |
  399|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  400|    413|    if (!out) {
  ------------------
  |  Branch (400:9): [True: 0, False: 413]
  ------------------
  401|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  402|      0|        return -1;
  403|      0|    }
  404|    413|    memcpy(out, &out_s3_plugin, sizeof(struct flb_output_plugin));
  405|    413|    mk_list_add(&out->_head, &config->out_plugins);
  406|       |
  407|    413|    out = flb_malloc(sizeof(struct flb_output_plugin));
  408|    413|    if (!out) {
  ------------------
  |  Branch (408:9): [True: 0, False: 413]
  ------------------
  409|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  410|      0|        return -1;
  411|      0|    }
  412|    413|    memcpy(out, &out_vivo_exporter_plugin, sizeof(struct flb_output_plugin));
  413|    413|    mk_list_add(&out->_head, &config->out_plugins);
  414|       |
  415|       |
  416|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  417|    413|    if (!filter) {
  ------------------
  |  Branch (417:9): [True: 0, False: 413]
  ------------------
  418|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  419|      0|        return -1;
  420|      0|    }
  421|    413|    memcpy(filter, &filter_alter_size_plugin, sizeof(struct flb_filter_plugin));
  422|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  423|       |
  424|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  425|    413|    if (!filter) {
  ------------------
  |  Branch (425:9): [True: 0, False: 413]
  ------------------
  426|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  427|      0|        return -1;
  428|      0|    }
  429|    413|    memcpy(filter, &filter_aws_plugin, sizeof(struct flb_filter_plugin));
  430|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  431|       |
  432|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  433|    413|    if (!filter) {
  ------------------
  |  Branch (433:9): [True: 0, False: 413]
  ------------------
  434|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  435|      0|        return -1;
  436|      0|    }
  437|    413|    memcpy(filter, &filter_checklist_plugin, sizeof(struct flb_filter_plugin));
  438|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  439|       |
  440|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  441|    413|    if (!filter) {
  ------------------
  |  Branch (441:9): [True: 0, False: 413]
  ------------------
  442|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  443|      0|        return -1;
  444|      0|    }
  445|    413|    memcpy(filter, &filter_ecs_plugin, sizeof(struct flb_filter_plugin));
  446|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  447|       |
  448|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  449|    413|    if (!filter) {
  ------------------
  |  Branch (449:9): [True: 0, False: 413]
  ------------------
  450|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  451|      0|        return -1;
  452|      0|    }
  453|    413|    memcpy(filter, &filter_record_modifier_plugin, sizeof(struct flb_filter_plugin));
  454|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  455|       |
  456|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  457|    413|    if (!filter) {
  ------------------
  |  Branch (457:9): [True: 0, False: 413]
  ------------------
  458|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  459|      0|        return -1;
  460|      0|    }
  461|    413|    memcpy(filter, &filter_throttle_plugin, sizeof(struct flb_filter_plugin));
  462|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  463|       |
  464|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  465|    413|    if (!filter) {
  ------------------
  |  Branch (465:9): [True: 0, False: 413]
  ------------------
  466|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  467|      0|        return -1;
  468|      0|    }
  469|    413|    memcpy(filter, &filter_type_converter_plugin, sizeof(struct flb_filter_plugin));
  470|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  471|       |
  472|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  473|    413|    if (!filter) {
  ------------------
  |  Branch (473:9): [True: 0, False: 413]
  ------------------
  474|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  475|      0|        return -1;
  476|      0|    }
  477|    413|    memcpy(filter, &filter_kubernetes_plugin, sizeof(struct flb_filter_plugin));
  478|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  479|       |
  480|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  481|    413|    if (!filter) {
  ------------------
  |  Branch (481:9): [True: 0, False: 413]
  ------------------
  482|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  483|      0|        return -1;
  484|      0|    }
  485|    413|    memcpy(filter, &filter_modify_plugin, sizeof(struct flb_filter_plugin));
  486|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  487|       |
  488|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  489|    413|    if (!filter) {
  ------------------
  |  Branch (489:9): [True: 0, False: 413]
  ------------------
  490|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  491|      0|        return -1;
  492|      0|    }
  493|    413|    memcpy(filter, &filter_multiline_plugin, sizeof(struct flb_filter_plugin));
  494|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  495|       |
  496|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  497|    413|    if (!filter) {
  ------------------
  |  Branch (497:9): [True: 0, False: 413]
  ------------------
  498|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  499|      0|        return -1;
  500|      0|    }
  501|    413|    memcpy(filter, &filter_nest_plugin, sizeof(struct flb_filter_plugin));
  502|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  503|       |
  504|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  505|    413|    if (!filter) {
  ------------------
  |  Branch (505:9): [True: 0, False: 413]
  ------------------
  506|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  507|      0|        return -1;
  508|      0|    }
  509|    413|    memcpy(filter, &filter_parser_plugin, sizeof(struct flb_filter_plugin));
  510|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  511|       |
  512|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  513|    413|    if (!filter) {
  ------------------
  |  Branch (513:9): [True: 0, False: 413]
  ------------------
  514|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  515|      0|        return -1;
  516|      0|    }
  517|    413|    memcpy(filter, &filter_expect_plugin, sizeof(struct flb_filter_plugin));
  518|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  519|       |
  520|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  521|    413|    if (!filter) {
  ------------------
  |  Branch (521:9): [True: 0, False: 413]
  ------------------
  522|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  523|      0|        return -1;
  524|      0|    }
  525|    413|    memcpy(filter, &filter_grep_plugin, sizeof(struct flb_filter_plugin));
  526|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  527|       |
  528|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  529|    413|    if (!filter) {
  ------------------
  |  Branch (529:9): [True: 0, False: 413]
  ------------------
  530|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  531|      0|        return -1;
  532|      0|    }
  533|    413|    memcpy(filter, &filter_rewrite_tag_plugin, sizeof(struct flb_filter_plugin));
  534|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  535|       |
  536|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  537|    413|    if (!filter) {
  ------------------
  |  Branch (537:9): [True: 0, False: 413]
  ------------------
  538|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  539|      0|        return -1;
  540|      0|    }
  541|    413|    memcpy(filter, &filter_log_to_metrics_plugin, sizeof(struct flb_filter_plugin));
  542|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  543|       |
  544|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  545|    413|    if (!filter) {
  ------------------
  |  Branch (545:9): [True: 0, False: 413]
  ------------------
  546|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  547|      0|        return -1;
  548|      0|    }
  549|    413|    memcpy(filter, &filter_stdout_plugin, sizeof(struct flb_filter_plugin));
  550|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  551|       |
  552|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  553|    413|    if (!filter) {
  ------------------
  |  Branch (553:9): [True: 0, False: 413]
  ------------------
  554|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  555|      0|        return -1;
  556|      0|    }
  557|    413|    memcpy(filter, &filter_geoip2_plugin, sizeof(struct flb_filter_plugin));
  558|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  559|       |
  560|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  561|    413|    if (!filter) {
  ------------------
  |  Branch (561:9): [True: 0, False: 413]
  ------------------
  562|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  563|      0|        return -1;
  564|      0|    }
  565|    413|    memcpy(filter, &filter_nightfall_plugin, sizeof(struct flb_filter_plugin));
  566|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  567|       |
  568|    413|    filter = flb_malloc(sizeof(struct flb_filter_plugin));
  569|    413|    if (!filter) {
  ------------------
  |  Branch (569:9): [True: 0, False: 413]
  ------------------
  570|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  571|      0|        return -1;
  572|      0|    }
  573|    413|    memcpy(filter, &filter_wasm_plugin, sizeof(struct flb_filter_plugin));
  574|    413|    mk_list_add(&filter->_head, &config->filter_plugins);
  575|       |
  576|       |
  577|       |
  578|    413|    return 0;
  579|    413|}
flb_plugins_unregister:
  582|    413|{
  583|    413|    struct mk_list *tmp;
  584|    413|    struct mk_list *head;
  585|    413|    struct flb_custom_plugin *custom;
  586|    413|    struct flb_input_plugin *in;
  587|    413|    struct flb_output_plugin *out;
  588|    413|    struct flb_filter_plugin *filter;
  589|       |
  590|    413|    mk_list_foreach_safe(head, tmp, &config->custom_plugins) {
  ------------------
  |  |  207|    826|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 413, False: 413]
  |  |  ------------------
  ------------------
  591|    413|        custom = mk_list_entry(head, struct flb_custom_plugin, _head);
  ------------------
  |  |  214|    413|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|    413|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|    413|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|    413|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  592|    413|        mk_list_del(&custom->_head);
  593|    413|        flb_free(custom);
  594|    413|    }
  595|       |
  596|  7.02k|    mk_list_foreach_safe(head, tmp, &config->in_plugins) {
  ------------------
  |  |  207|  7.43k|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 7.02k, False: 413]
  |  |  ------------------
  ------------------
  597|  7.02k|        in = mk_list_entry(head, struct flb_input_plugin, _head);
  ------------------
  |  |  214|  7.02k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  7.02k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  7.02k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  7.02k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  598|  7.02k|        if(in->cb_destroy) {
  ------------------
  |  Branch (598:12): [True: 0, False: 7.02k]
  ------------------
  599|      0|            in->cb_destroy(in);
  600|      0|        }
  601|  7.02k|        mk_list_del(&in->_head);
  602|  7.02k|        flb_free(in);
  603|  7.02k|    }
  604|       |
  605|  8.67k|    mk_list_foreach_safe(head, tmp, &config->out_plugins) {
  ------------------
  |  |  207|  9.08k|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 8.67k, False: 413]
  |  |  ------------------
  ------------------
  606|  8.67k|        out = mk_list_entry(head, struct flb_output_plugin, _head);
  ------------------
  |  |  214|  8.67k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  8.67k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  8.67k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  8.67k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  607|  8.67k|        if(out->cb_destroy) {
  ------------------
  |  Branch (607:12): [True: 0, False: 8.67k]
  ------------------
  608|      0|            out->cb_destroy(out);
  609|      0|        }
  610|  8.67k|        mk_list_del(&out->_head);
  611|  8.67k|        flb_free(out);
  612|  8.67k|    }
  613|       |
  614|  8.26k|    mk_list_foreach_safe(head, tmp, &config->filter_plugins) {
  ------------------
  |  |  207|  8.67k|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 8.26k, False: 413]
  |  |  ------------------
  ------------------
  615|  8.26k|        filter = mk_list_entry(head, struct flb_filter_plugin, _head);
  ------------------
  |  |  214|  8.26k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  8.26k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  8.26k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  8.26k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  616|  8.26k|        mk_list_del(&filter->_head);
  617|  8.26k|        flb_free(filter);
  618|  8.26k|    }
  619|    413|}

flb_http_client.c:flb_sds_casecmp:
   90|  4.42k|{
   91|  4.42k|    if (flb_sds_len(s) != len) {
  ------------------
  |  Branch (91:9): [True: 4.02k, False: 402]
  ------------------
   92|  4.02k|        return -1;
   93|  4.02k|    }
   94|       |
   95|    402|    return strncasecmp(s, str, len);
   96|  4.42k|}
flb_http_client.c:flb_sds_len:
   49|  13.3k|{
   50|  13.3k|    return (size_t) FLB_SDS_HEADER(s)->len;
  ------------------
  |  |   46|  13.3k|#define FLB_SDS_HEADER(s)  ((struct flb_sds *) (s - FLB_SDS_HEADER_SIZE))
  |  |  ------------------
  |  |  |  |   34|  13.3k|#define FLB_SDS_HEADER_SIZE (sizeof(uint64_t) + sizeof(uint64_t))
  |  |  ------------------
  ------------------
   51|  13.3k|}
flb_sds.c:flb_sds_alloc:
   68|    826|{
   69|    826|    return (size_t) FLB_SDS_HEADER(s)->alloc;
  ------------------
  |  |   46|    826|#define FLB_SDS_HEADER(s)  ((struct flb_sds *) (s - FLB_SDS_HEADER_SIZE))
  |  |  ------------------
  |  |  |  |   34|    826|#define FLB_SDS_HEADER_SIZE (sizeof(uint64_t) + sizeof(uint64_t))
  |  |  ------------------
  ------------------
   70|    826|}
flb_sds.c:flb_sds_avail:
   73|  2.47k|{
   74|  2.47k|    struct flb_sds *h;
   75|       |
   76|  2.47k|    h = FLB_SDS_HEADER(s);
  ------------------
  |  |   46|  2.47k|#define FLB_SDS_HEADER(s)  ((struct flb_sds *) (s - FLB_SDS_HEADER_SIZE))
  |  |  ------------------
  |  |  |  |   34|  2.47k|#define FLB_SDS_HEADER_SIZE (sizeof(uint64_t) + sizeof(uint64_t))
  |  |  ------------------
  ------------------
   77|  2.47k|    return (size_t) (h->alloc - h->len);
   78|  2.47k|}
flb_sds.c:flb_sds_len:
   49|    826|{
   50|    826|    return (size_t) FLB_SDS_HEADER(s)->len;
  ------------------
  |  |   46|    826|#define FLB_SDS_HEADER(s)  ((struct flb_sds *) (s - FLB_SDS_HEADER_SIZE))
  |  |  ------------------
  |  |  |  |   34|    826|#define FLB_SDS_HEADER_SIZE (sizeof(uint64_t) + sizeof(uint64_t))
  |  |  ------------------
  ------------------
   51|    826|}

flb_config.c:flb_strdup:
   45|    826|{
   46|    826|    return flb_strndup(s, strlen(s));
   47|    826|}
flb_config.c:flb_strndup:
   31|    826|{
   32|    826|    char *str;
   33|       |
   34|    826|    str = (char *) flb_malloc(n + 1);
   35|    826|    if (!str) {
  ------------------
  |  Branch (35:9): [True: 0, False: 826]
  ------------------
   36|      0|        return NULL;
   37|      0|    }
   38|    826|    memcpy(str, s, n);
   39|    826|    str[n] = '\0';
   40|       |
   41|    826|    return str;
   42|    826|}
flb_config.c:flb_str_emptyval:
   51|  1.23k|{
   52|  1.23k|    if (s != NULL && strcmp(s, "") == 0) {
  ------------------
  |  Branch (52:9): [True: 0, False: 1.23k]
  |  Branch (52:22): [True: 0, False: 0]
  ------------------
   53|      0|        return FLB_TRUE;
  ------------------
  |  |   26|      0|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      0|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
   54|      0|    }
   55|  1.23k|    return FLB_FALSE;
  ------------------
  |  |   25|  1.23k|#define FLB_FALSE  0
  ------------------
   56|  1.23k|}
flb_upstream.c:flb_strdup:
   45|    413|{
   46|    413|    return flb_strndup(s, strlen(s));
   47|    413|}
flb_upstream.c:flb_strndup:
   31|    413|{
   32|    413|    char *str;
   33|       |
   34|    413|    str = (char *) flb_malloc(n + 1);
   35|    413|    if (!str) {
  ------------------
  |  Branch (35:9): [True: 0, False: 413]
  ------------------
   36|      0|        return NULL;
   37|      0|    }
   38|    413|    memcpy(str, s, n);
   39|    413|    str[n] = '\0';
   40|       |
   41|    413|    return str;
   42|    413|}
flb_parser.c:flb_strdup:
   45|  3.71k|{
   46|  3.71k|    return flb_strndup(s, strlen(s));
   47|  3.71k|}
flb_parser.c:flb_strndup:
   31|  3.71k|{
   32|  3.71k|    char *str;
   33|       |
   34|  3.71k|    str = (char *) flb_malloc(n + 1);
   35|  3.71k|    if (!str) {
  ------------------
  |  Branch (35:9): [True: 0, False: 3.71k]
  ------------------
   36|      0|        return NULL;
   37|      0|    }
   38|  3.71k|    memcpy(str, s, n);
   39|  3.71k|    str[n] = '\0';
   40|       |
   41|  3.71k|    return str;
   42|  3.71k|}

flb_connection.c:flb_stream_get_flags:
   83|    815|{
   84|    815|    return stream->flags;
   85|    815|}
flb_upstream.c:flb_stream_is_thread_safe:
  143|    413|{
  144|    413|    return stream->thread_safety_flag;
  145|    413|}
flb_upstream.c:flb_stream_setup:
   65|    413|{
   66|    413|    stream->thread_safety_flag = FLB_FALSE;
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
   67|    413|    stream->tls_context        = tls_context;
   68|    413|    stream->transport          = transport;
   69|    413|    stream->config             = config;
   70|    413|    stream->flags              = flags;
   71|    413|    stream->type               = type;
   72|       |
   73|       |    /* Set default networking setup values */
   74|    413|    if (net_setup == NULL) {
  ------------------
  |  Branch (74:9): [True: 413, False: 0]
  ------------------
   75|    413|        flb_net_setup_init(&stream->net);
   76|    413|    }
   77|      0|    else {
   78|      0|        memcpy(&stream->net, net_setup, sizeof(struct flb_net_setup));
   79|      0|    }
   80|    413|}
flb_upstream.c:flb_stream_enable_flags:
   98|    413|{
   99|    413|    flb_stream_set_flags(stream, flb_stream_get_flags(stream) | flag);
  100|    413|}
flb_upstream.c:flb_stream_set_flags:
   88|    413|{
   89|    413|    stream->flags = flags;
   90|    413|}
flb_upstream.c:flb_stream_get_flags:
   83|    413|{
   84|    413|    return stream->flags;
   85|    413|}
flb_http_client.c:flb_stream_get_flag_status:
   93|  1.22k|{
   94|  1.22k|    return ((flb_stream_get_flags(stream) & flag) != 0);
   95|  1.22k|}
flb_http_client.c:flb_stream_get_flags:
   83|  1.22k|{
   84|  1.22k|    return stream->flags;
   85|  1.22k|}
flb_http_client.c:flb_stream_is_keepalive:
  133|    402|{
  134|    402|    return flb_stream_get_flag_status(stream, FLB_IO_TCP_KA);
  ------------------
  |  |   37|    402|#define FLB_IO_TCP_KA     16  /* use async mode (depends on event loop) */
  ------------------
  135|    402|}

cfl_kvlist.c:cfl_list_init:
   55|    413|{
   56|    413|    list->next = list;
   57|    413|    list->prev = list;
   58|    413|}

cfl_kvlist_create:
   26|    413|{
   27|    413|    struct cfl_kvlist *list;
   28|       |
   29|    413|    list = malloc(sizeof(struct cfl_kvlist));
   30|    413|    if (list == NULL) {
  ------------------
  |  Branch (30:9): [True: 0, False: 413]
  ------------------
   31|      0|        cfl_report_runtime_error();
  ------------------
  |  |   28|      0|#define cfl_report_runtime_error() cfl_report_runtime_error_impl(errno, __FILENAME__, __LINE__)
  ------------------
   32|      0|        return NULL;
   33|      0|    }
   34|       |
   35|    413|    cfl_list_init(&list->list);
   36|    413|    return list;
   37|    413|}
cfl_kvlist_destroy:
   40|    413|{
   41|    413|    struct cfl_list *tmp;
   42|    413|    struct cfl_list *head;
   43|    413|    struct cfl_kvpair *pair;
   44|       |
   45|    413|    cfl_list_foreach_safe(head, tmp, &list->list) {
  ------------------
  |  |  158|    413|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (158:47): [True: 0, False: 413]
  |  |  ------------------
  ------------------
   46|      0|        pair = cfl_list_entry(head, struct cfl_kvpair, _head);
  ------------------
  |  |  165|      0|#define cfl_list_entry( ptr, type, member ) cfl_container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   45|      0|#define cfl_container_of(ptr, type, member) ({                  \
  |  |  |  |   46|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   47|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
   47|       |
   48|      0|        if (pair->key) {
  ------------------
  |  Branch (48:13): [True: 0, False: 0]
  ------------------
   49|      0|            cfl_sds_destroy(pair->key);
   50|      0|        }
   51|       |
   52|      0|        if (pair->val) {
  ------------------
  |  Branch (52:13): [True: 0, False: 0]
  ------------------
   53|      0|            cfl_variant_destroy(pair->val);
   54|      0|        }
   55|      0|        cfl_list_del(&pair->_head);
   56|      0|        free(pair);
   57|      0|    }
   58|       |
   59|    413|    free(list);
   60|    413|}

flb_config.c:MK_EVENT_ZERO:
  123|  1.23k|{
  124|  1.23k|    MK_EVENT_INIT(e, -1, NULL, NULL);
  125|  1.23k|}
flb_config.c:MK_EVENT_INIT:
  113|  1.23k|{
  114|  1.23k|    ev->fd      = fd;
  115|  1.23k|    ev->type    = MK_EVENT_CUSTOM;
  ------------------
  |  |   33|  1.23k|#define MK_EVENT_CUSTOM          4    /* custom fd registered             */
  ------------------
  116|  1.23k|    ev->mask    = MK_EVENT_EMPTY;
  ------------------
  |  |   37|  1.23k|#define MK_EVENT_EMPTY           0
  ------------------
  117|  1.23k|    ev->status  = MK_EVENT_NONE;
  ------------------
  |  |   52|  1.23k|#define MK_EVENT_NONE            1    /* nothing */
  ------------------
  118|  1.23k|    ev->data    = data;
  119|  1.23k|    ev->handler = callback;
  120|  1.23k|}
flb_connection.c:MK_EVENT_ZERO:
  123|    413|{
  124|    413|    MK_EVENT_INIT(e, -1, NULL, NULL);
  125|    413|}
flb_connection.c:MK_EVENT_INIT:
  113|    413|{
  114|    413|    ev->fd      = fd;
  115|    413|    ev->type    = MK_EVENT_CUSTOM;
  ------------------
  |  |   33|    413|#define MK_EVENT_CUSTOM          4    /* custom fd registered             */
  ------------------
  116|    413|    ev->mask    = MK_EVENT_EMPTY;
  ------------------
  |  |   37|    413|#define MK_EVENT_EMPTY           0
  ------------------
  117|    413|    ev->status  = MK_EVENT_NONE;
  ------------------
  |  |   52|    413|#define MK_EVENT_NONE            1    /* nothing */
  ------------------
  118|    413|    ev->data    = data;
  119|    413|    ev->handler = callback;
  120|    413|}

flb_config.c:mk_list_add:
   64|  24.3k|{
   65|  24.3k|    __mk_list_add(_new, head->prev, head);
   66|  24.3k|}
flb_config.c:__mk_list_add:
   56|  24.3k|{
   57|  24.3k|    next->prev = _new;
   58|  24.3k|    _new->next = next;
   59|  24.3k|    _new->prev = prev;
   60|  24.3k|    prev->next = _new;
   61|  24.3k|}
flb_config.c:mk_list_del:
  146|  24.3k|{
  147|  24.3k|    __mk_list_del(entry->prev, entry->next);
  148|  24.3k|    entry->prev = NULL;
  149|  24.3k|    entry->next = NULL;
  150|  24.3k|}
flb_config.c:__mk_list_del:
  140|  24.3k|{
  141|  24.3k|    prev->next = next;
  142|  24.3k|    next->prev = prev;
  143|  24.3k|}
flb_config.c:mk_list_init:
   49|  7.84k|{
   50|  7.84k|    list->next = list;
   51|  7.84k|    list->prev = list;
   52|  7.84k|}
flb_upstream.c:mk_list_init:
   49|  1.23k|{
   50|  1.23k|    list->next = list;
   51|  1.23k|    list->prev = list;
   52|  1.23k|}
flb_upstream.c:mk_list_add:
   64|    413|{
   65|    413|    __mk_list_add(_new, head->prev, head);
   66|    413|}
flb_upstream.c:__mk_list_add:
   56|    413|{
   57|    413|    next->prev = _new;
   58|    413|    _new->next = next;
   59|    413|    _new->prev = prev;
   60|    413|    prev->next = _new;
   61|    413|}
flb_upstream.c:mk_list_del:
  146|    413|{
  147|    413|    __mk_list_del(entry->prev, entry->next);
  148|    413|    entry->prev = NULL;
  149|    413|    entry->next = NULL;
  150|    413|}
flb_upstream.c:__mk_list_del:
  140|    413|{
  141|    413|    prev->next = next;
  142|    413|    next->prev = prev;
  143|    413|}
flb_plugin.c:mk_list_init:
   49|  1.23k|{
   50|  1.23k|    list->next = list;
   51|  1.23k|    list->prev = list;
   52|  1.23k|}
flb_http_client.c:mk_list_init:
   49|    826|{
   50|    826|    list->next = list;
   51|    826|    list->prev = list;
   52|    826|}
flb_config_format.c:mk_list_init:
   49|  4.54k|{
   50|  4.54k|    list->next = list;
   51|  4.54k|    list->prev = list;
   52|  4.54k|}
flb_config_format.c:mk_list_add:
   64|    413|{
   65|    413|    __mk_list_add(_new, head->prev, head);
   66|    413|}
flb_config_format.c:__mk_list_add:
   56|    413|{
   57|    413|    next->prev = _new;
   58|    413|    _new->next = next;
   59|    413|    _new->prev = prev;
   60|    413|    prev->next = _new;
   61|    413|}
flb_config_format.c:mk_list_del:
  146|    413|{
  147|    413|    __mk_list_del(entry->prev, entry->next);
  148|    413|    entry->prev = NULL;
  149|    413|    entry->next = NULL;
  150|    413|}
flb_config_format.c:__mk_list_del:
  140|    413|{
  141|    413|    prev->next = next;
  142|    413|    next->prev = prev;
  143|    413|}
flb_parser.c:mk_list_add:
   64|    826|{
   65|    826|    __mk_list_add(_new, head->prev, head);
   66|    826|}
flb_parser.c:__mk_list_add:
   56|    826|{
   57|    826|    next->prev = _new;
   58|    826|    _new->next = next;
   59|    826|    _new->prev = prev;
   60|    826|    prev->next = _new;
   61|    826|}
flb_parser.c:mk_list_del:
  146|    826|{
  147|    826|    __mk_list_del(entry->prev, entry->next);
  148|    826|    entry->prev = NULL;
  149|    826|    entry->next = NULL;
  150|    826|}
flb_parser.c:__mk_list_del:
  140|    826|{
  141|    826|    prev->next = next;
  142|    826|    next->prev = prev;
  143|    826|}
flb_kv.c:mk_list_add:
   64|  4.07k|{
   65|  4.07k|    __mk_list_add(_new, head->prev, head);
   66|  4.07k|}
flb_kv.c:__mk_list_add:
   56|  4.07k|{
   57|  4.07k|    next->prev = _new;
   58|  4.07k|    _new->next = next;
   59|  4.07k|    _new->prev = prev;
   60|  4.07k|    prev->next = _new;
   61|  4.07k|}
flb_kv.c:mk_list_del:
  146|  4.07k|{
  147|  4.07k|    __mk_list_del(entry->prev, entry->next);
  148|  4.07k|    entry->prev = NULL;
  149|  4.07k|    entry->next = NULL;
  150|  4.07k|}
flb_kv.c:__mk_list_del:
  140|  4.07k|{
  141|  4.07k|    prev->next = next;
  142|  4.07k|    next->prev = prev;
  143|  4.07k|}
flb_hash_table.c:mk_list_init:
   49|  26.8k|{
   50|  26.8k|    list->next = list;
   51|  26.8k|    list->prev = list;
   52|  26.8k|}
flb_slist.c:mk_list_init:
   49|  9.08k|{
   50|  9.08k|    list->next = list;
   51|  9.08k|    list->prev = list;
   52|  9.08k|}
flb_slist.c:mk_list_add:
   64|  13.2k|{
   65|  13.2k|    __mk_list_add(_new, head->prev, head);
   66|  13.2k|}
flb_slist.c:__mk_list_add:
   56|  13.2k|{
   57|  13.2k|    next->prev = _new;
   58|  13.2k|    _new->next = next;
   59|  13.2k|    _new->prev = prev;
   60|  13.2k|    prev->next = _new;
   61|  13.2k|}
flb_slist.c:mk_list_del:
  146|  13.2k|{
  147|  13.2k|    __mk_list_del(entry->prev, entry->next);
  148|  13.2k|    entry->prev = NULL;
  149|  13.2k|    entry->next = NULL;
  150|  13.2k|}
flb_slist.c:__mk_list_del:
  140|  13.2k|{
  141|  13.2k|    prev->next = next;
  142|  13.2k|    next->prev = prev;
  143|  13.2k|}
flb_ml_parser.c:mk_list_init:
   49|  2.47k|{
   50|  2.47k|    list->next = list;
   51|  2.47k|    list->prev = list;
   52|  2.47k|}
flb_ml_parser.c:mk_list_add:
   64|  2.47k|{
   65|  2.47k|    __mk_list_add(_new, head->prev, head);
   66|  2.47k|}
flb_ml_parser.c:__mk_list_add:
   56|  2.47k|{
   57|  2.47k|    next->prev = _new;
   58|  2.47k|    _new->next = next;
   59|  2.47k|    _new->prev = prev;
   60|  2.47k|    prev->next = _new;
   61|  2.47k|}
flb_ml_parser.c:mk_list_del:
  146|  2.47k|{
  147|  2.47k|    __mk_list_del(entry->prev, entry->next);
  148|  2.47k|    entry->prev = NULL;
  149|  2.47k|    entry->next = NULL;
  150|  2.47k|}
flb_ml_parser.c:__mk_list_del:
  140|  2.47k|{
  141|  2.47k|    prev->next = next;
  142|  2.47k|    next->prev = prev;
  143|  2.47k|}
flb_ml_rule.c:mk_list_init:
   49|  9.08k|{
   50|  9.08k|    list->next = list;
   51|  9.08k|    list->prev = list;
   52|  9.08k|}
flb_ml_rule.c:mk_list_size:
  162|  9.08k|{
  163|  9.08k|    int ret = 0;
  164|  9.08k|    struct mk_list *it;
  165|  35.1k|    for (it = head->next; it != head; it = it->next, ret++);
  ------------------
  |  Branch (165:27): [True: 26.0k, False: 9.08k]
  ------------------
  166|  9.08k|    return ret;
  167|  9.08k|}
flb_ml_rule.c:mk_list_add:
   64|  34.6k|{
   65|  34.6k|    __mk_list_add(_new, head->prev, head);
   66|  34.6k|}
flb_ml_rule.c:__mk_list_add:
   56|  34.6k|{
   57|  34.6k|    next->prev = _new;
   58|  34.6k|    _new->next = next;
   59|  34.6k|    _new->prev = prev;
   60|  34.6k|    prev->next = _new;
   61|  34.6k|}
flb_ml_rule.c:mk_list_del:
  146|  34.6k|{
  147|  34.6k|    __mk_list_del(entry->prev, entry->next);
  148|  34.6k|    entry->prev = NULL;
  149|  34.6k|    entry->next = NULL;
  150|  34.6k|}
flb_ml_rule.c:__mk_list_del:
  140|  34.6k|{
  141|  34.6k|    prev->next = next;
  142|  34.6k|    next->prev = prev;
  143|  34.6k|}

flb_kernel.c:mk_mem_free:
   98|    826|{
   99|       |#ifdef MALLOC_JEMALLOC
  100|       |    je_free(ptr);
  101|       |#else
  102|    826|    free(ptr);
  103|    826|#endif
  104|    826|}
mk_string.c:mk_mem_alloc:
   49|    826|{
   50|       |#ifdef MALLOC_JEMALLOC
   51|       |    void *aux = je_malloc(size);
   52|       |#else
   53|    826|    void *aux = malloc(size);
   54|    826|#endif
   55|       |
   56|    826|    if (mk_unlikely(!aux && size)) {
  ------------------
  |  |  116|    826|  #define mk_unlikely(x) __builtin_expect((x),0)
  |  |  ------------------
  |  |  |  Branch (116:26): [True: 0, False: 826]
  |  |  |  Branch (116:44): [True: 0, False: 826]
  |  |  |  Branch (116:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   57|      0|        perror("malloc");
   58|      0|        return NULL;
   59|      0|    }
   60|       |
   61|    826|    return aux;
   62|    826|}

mk_string_char_search:
  287|  13.6k|{
  288|  13.6k|    char *p;
  289|       |
  290|  13.6k|    if (len < 0) {
  ------------------
  |  Branch (290:9): [True: 0, False: 13.6k]
  ------------------
  291|      0|        len = strlen(string);
  292|      0|    }
  293|       |
  294|  13.6k|    p = memchr(string, c, len);
  295|  13.6k|    if (p) {
  ------------------
  |  Branch (295:9): [True: 4.54k, False: 9.08k]
  ------------------
  296|  4.54k|        return (p - string);
  297|  4.54k|    }
  298|       |
  299|  9.08k|    return -1;
  300|  13.6k|}
mk_string_copy_substr:
  591|    826|{
  592|    826|    unsigned int size, bytes;
  593|    826|    char *buffer = 0;
  594|       |
  595|    826|    if (pos_init > pos_end) {
  ------------------
  |  Branch (595:9): [True: 0, False: 826]
  ------------------
  596|      0|        return NULL;
  597|      0|    }
  598|       |
  599|    826|    size = (unsigned int) (pos_end - pos_init) + 1;
  600|    826|    if (size <= 2) {
  ------------------
  |  Branch (600:9): [True: 413, False: 413]
  ------------------
  601|    413|        size = 4;
  602|    413|    }
  603|       |
  604|    826|    buffer = mk_mem_alloc(size);
  605|       |
  606|    826|    if (!buffer) {
  ------------------
  |  Branch (606:9): [True: 0, False: 826]
  ------------------
  607|      0|        return NULL;
  608|      0|    }
  609|       |
  610|    826|    bytes = pos_end - pos_init;
  611|    826|    memcpy(buffer, string + pos_init, bytes);
  612|    826|    buffer[bytes] = '\0';
  613|       |
  614|    826|    return (char *) buffer;
  615|    826|}

onigenc_unicode_is_code_ctype:
  183|  12.3k|{
  184|  12.3k|  if (
  185|  12.3k|#ifdef USE_UNICODE_PROPERTIES
  186|  12.3k|      ctype <= ONIGENC_MAX_STD_CTYPE &&
  ------------------
  |  |  309|  12.3k|#define ONIGENC_MAX_STD_CTYPE  ONIGENC_CTYPE_ASCII
  |  |  ------------------
  |  |  |  |  308|  24.7k|#define ONIGENC_CTYPE_ASCII    14
  |  |  ------------------
  ------------------
  |  Branch (186:7): [True: 12.3k, False: 0]
  ------------------
  187|  12.3k|#endif
  188|  12.3k|      code < 256) {
  ------------------
  |  Branch (188:7): [True: 12.3k, False: 0]
  ------------------
  189|  12.3k|    return ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code, ctype);
  ------------------
  |  |   33|  12.3k|  ((EncUNICODE_ISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
  |  |  ------------------
  |  |  |  |  113|  12.3k|#define CTYPE_TO_BIT(ctype)  (1<<(ctype))
  |  |  ------------------
  ------------------
  190|  12.3k|  }
  191|       |
  192|      0|  if (ctype >= CODE_RANGES_NUM) {
  ------------------
  |  |  179|      0|#define CODE_RANGES_NUM numberof(CodeRanges)
  |  |  ------------------
  |  |  |  |  129|      0|# define numberof(array) (int )(sizeof(array) / sizeof((array)[0]))
  |  |  ------------------
  ------------------
  |  Branch (192:7): [True: 0, False: 0]
  ------------------
  193|      0|    return ONIGERR_TYPE_BUG;
  ------------------
  |  |  633|      0|#define ONIGERR_TYPE_BUG                                       -6
  ------------------
  194|      0|  }
  195|       |
  196|      0|  return onig_is_in_code_range((UChar* )CodeRanges[ctype], code);
  197|      0|}
onigenc_unicode_ctype_code_range:
  202|  5.36k|{
  203|  5.36k|  if (ctype >= CODE_RANGES_NUM) {
  ------------------
  |  |  179|  5.36k|#define CODE_RANGES_NUM numberof(CodeRanges)
  |  |  ------------------
  |  |  |  |  129|  5.36k|# define numberof(array) (int )(sizeof(array) / sizeof((array)[0]))
  |  |  ------------------
  ------------------
  |  Branch (203:7): [True: 0, False: 5.36k]
  ------------------
  204|      0|    return ONIGERR_TYPE_BUG;
  ------------------
  |  |  633|      0|#define ONIGERR_TYPE_BUG                                       -6
  ------------------
  205|      0|  }
  206|       |
  207|  5.36k|  *ranges = CodeRanges[ctype];
  208|       |
  209|  5.36k|  return 0;
  210|  5.36k|}

utf_8.c:mbc_enc_len:
  317|  1.02M|{
  318|  1.02M|  int firstbyte = *p++;
  319|  1.02M|  state_t s;
  320|  1.02M|  s = trans[0][firstbyte];
  321|  1.02M|  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(1) :
  ------------------
  |  |  345|  1.02M|#define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n)   (n)
  ------------------
  |  Branch (321:7): [True: 1.02M, False: 0]
  |  Branch (321:21): [True: 1.02M, False: 0]
  ------------------
  322|  1.02M|                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
  ------------------
  |  |  349|      0|#define ONIGENC_CONSTRUCT_MBCLEN_INVALID()      (-1)
  ------------------
  323|       |
  324|      0|  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_UTF8[firstbyte]-1);
  ------------------
  |  |  352|      0|#define ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(n)    (-1-(n))
  ------------------
  |  Branch (324:7): [True: 0, False: 0]
  ------------------
  325|      0|  s = trans[s][*p++];
  326|      0|  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(2) :
  ------------------
  |  |  345|      0|#define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n)   (n)
  ------------------
  |  Branch (326:7): [True: 0, False: 0]
  |  Branch (326:21): [True: 0, False: 0]
  ------------------
  327|      0|                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
  ------------------
  |  |  349|      0|#define ONIGENC_CONSTRUCT_MBCLEN_INVALID()      (-1)
  ------------------
  328|       |
  329|      0|  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_UTF8[firstbyte]-2);
  ------------------
  |  |  352|      0|#define ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(n)    (-1-(n))
  ------------------
  |  Branch (329:7): [True: 0, False: 0]
  ------------------
  330|      0|  s = trans[s][*p++];
  331|      0|  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(3) :
  ------------------
  |  |  345|      0|#define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n)   (n)
  ------------------
  |  Branch (331:7): [True: 0, False: 0]
  |  Branch (331:21): [True: 0, False: 0]
  ------------------
  332|      0|                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
  ------------------
  |  |  349|      0|#define ONIGENC_CONSTRUCT_MBCLEN_INVALID()      (-1)
  ------------------
  333|       |
  334|      0|  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_UTF8[firstbyte]-3);
  ------------------
  |  |  352|      0|#define ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(n)    (-1-(n))
  ------------------
  |  Branch (334:7): [True: 0, False: 0]
  ------------------
  335|      0|  s = trans[s][*p++];
  336|       |
  337|      0|#ifndef USE_UTF8_31BITS
  338|      0|  return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(4) :
  ------------------
  |  |  345|      0|#define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n)   (n)
  ------------------
  |  Branch (338:10): [True: 0, False: 0]
  ------------------
  339|      0|                       ONIGENC_CONSTRUCT_MBCLEN_INVALID();
  ------------------
  |  |  349|      0|#define ONIGENC_CONSTRUCT_MBCLEN_INVALID()      (-1)
  ------------------
  340|       |#else
  341|       |  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(4) :
  342|       |                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
  343|       |
  344|       |  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_UTF8[firstbyte]-4);
  345|       |  s = trans[s][*p++];
  346|       |  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(5) :
  347|       |                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
  348|       |
  349|       |  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_UTF8[firstbyte]-5);
  350|       |  s = trans[s][*p++];
  351|       |  return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(6) :
  352|       |                       ONIGENC_CONSTRUCT_MBCLEN_INVALID();
  353|       |#endif
  354|      0|}
utf_8.c:mbc_to_code:
  381|   316k|{
  382|   316k|  int c, len;
  383|   316k|  OnigCodePoint n;
  384|       |
  385|   316k|  len = mbc_enc_len(p, end, enc);
  386|   316k|  c = *p++;
  387|   316k|  if (len > 1) {
  ------------------
  |  Branch (387:7): [True: 0, False: 316k]
  ------------------
  388|      0|    len--;
  389|      0|    n = c & ((1 << (6 - len)) - 1);
  390|      0|    while (len--) {
  ------------------
  |  Branch (390:12): [True: 0, False: 0]
  ------------------
  391|      0|      c = *p++;
  392|      0|      n = (n << 6) | (c & ((1 << 6) - 1));
  393|      0|    }
  394|      0|    return n;
  395|      0|  }
  396|   316k|  else {
  397|   316k|#ifdef USE_INVALID_CODE_SCHEME
  398|   316k|    if (c > 0xfd) {
  ------------------
  |  Branch (398:9): [True: 0, False: 316k]
  ------------------
  399|      0|      return ((c == 0xfe) ? INVALID_CODE_FE : INVALID_CODE_FF);
  ------------------
  |  |   44|      0|# define INVALID_CODE_FE  0xfffffffe
  ------------------
                    return ((c == 0xfe) ? INVALID_CODE_FE : INVALID_CODE_FF);
  ------------------
  |  |   45|      0|# define INVALID_CODE_FF  0xffffffff
  ------------------
  |  Branch (399:15): [True: 0, False: 0]
  ------------------
  400|      0|    }
  401|   316k|#endif
  402|   316k|    return (OnigCodePoint )c;
  403|   316k|  }
  404|   316k|}
utf_8.c:code_to_mbclen:
  408|  20.2k|{
  409|  20.2k|  if      ((code & 0xffffff80) == 0) return 1;
  ------------------
  |  Branch (409:12): [True: 20.2k, False: 0]
  ------------------
  410|      0|  else if ((code & 0xfffff800) == 0) return 2;
  ------------------
  |  Branch (410:12): [True: 0, False: 0]
  ------------------
  411|      0|  else if ((code & 0xffff0000) == 0) return 3;
  ------------------
  |  Branch (411:12): [True: 0, False: 0]
  ------------------
  412|      0|#ifndef USE_UTF8_31BITS
  413|      0|  else if (code <= VALID_CODE_LIMIT) return 4;
  ------------------
  |  |   49|      0|#define VALID_CODE_LIMIT  0x0010ffff
  ------------------
  |  Branch (413:12): [True: 0, False: 0]
  ------------------
  414|       |#else
  415|       |  else if ((code & 0xffe00000) == 0) return 4;
  416|       |  else if ((code & 0xfc000000) == 0) return 5;
  417|       |  else if (code <= VALID_CODE_LIMIT) return 6;
  418|       |#endif
  419|      0|#ifdef USE_INVALID_CODE_SCHEME
  420|      0|  else if (code == INVALID_CODE_FE) return 1;
  ------------------
  |  |   44|      0|# define INVALID_CODE_FE  0xfffffffe
  ------------------
  |  Branch (420:12): [True: 0, False: 0]
  ------------------
  421|      0|  else if (code == INVALID_CODE_FF) return 1;
  ------------------
  |  |   45|      0|# define INVALID_CODE_FF  0xffffffff
  ------------------
  |  Branch (421:12): [True: 0, False: 0]
  ------------------
  422|      0|#endif
  423|      0|  else
  424|      0|    return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE;
  ------------------
  |  |  694|      0|#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE                      -401
  ------------------
  425|  20.2k|}
utf_8.c:get_ctype_code_range:
  524|  5.36k|{
  525|  5.36k|  *sb_out = 0x80;
  526|  5.36k|  return onigenc_unicode_ctype_code_range(ctype, ranges);
  527|  5.36k|}

onig_bbuf_init:
  143|  14.8k|{
  144|  14.8k|  if (size <= 0) {
  ------------------
  |  Branch (144:7): [True: 0, False: 14.8k]
  ------------------
  145|      0|    size   = 0;
  146|      0|    buf->p = NULL;
  147|      0|  }
  148|  14.8k|  else {
  149|  14.8k|    buf->p = (UChar* )xmalloc(size);
  ------------------
  |  |  142|  14.8k|# define xmalloc     malloc
  ------------------
  150|  14.8k|    if (IS_NULL(buf->p)) return(ONIGERR_MEMORY);
  ------------------
  |  |  311|  14.8k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 14.8k]
  |  |  ------------------
  ------------------
                  if (IS_NULL(buf->p)) return(ONIGERR_MEMORY);
  ------------------
  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  ------------------
  151|  14.8k|  }
  152|       |
  153|  14.8k|  buf->alloc = (unsigned int )size;
  154|  14.8k|  buf->used  = 0;
  155|  14.8k|  return 0;
  156|  14.8k|}
onig_free_body:
 5535|  9.49k|{
 5536|  9.49k|  if (IS_NOT_NULL(reg)) {
  ------------------
  |  |  312|  9.49k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 9.49k, False: 0]
  |  |  ------------------
  ------------------
 5537|  9.49k|    if (IS_NOT_NULL(reg->p))                xfree(reg->p);
  ------------------
  |  |  312|  9.49k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 9.49k, False: 0]
  |  |  ------------------
  ------------------
                  if (IS_NOT_NULL(reg->p))                xfree(reg->p);
  ------------------
  |  |  145|  9.49k|# define xfree       free
  ------------------
 5538|  9.49k|    if (IS_NOT_NULL(reg->exact))            xfree(reg->exact);
  ------------------
  |  |  312|  9.49k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 4.54k, False: 4.95k]
  |  |  ------------------
  ------------------
                  if (IS_NOT_NULL(reg->exact))            xfree(reg->exact);
  ------------------
  |  |  145|  4.54k|# define xfree       free
  ------------------
 5539|  9.49k|    if (IS_NOT_NULL(reg->repeat_range))     xfree(reg->repeat_range);
  ------------------
  |  |  312|  9.49k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 9.49k]
  |  |  ------------------
  ------------------
                  if (IS_NOT_NULL(reg->repeat_range))     xfree(reg->repeat_range);
  ------------------
  |  |  145|      0|# define xfree       free
  ------------------
 5540|  9.49k|    if (IS_NOT_NULL(reg->chain))            onig_free(reg->chain);
  ------------------
  |  |  312|  9.49k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 9.49k]
  |  |  ------------------
  ------------------
 5541|       |
 5542|  9.49k|#ifdef USE_NAMED_GROUP
 5543|  9.49k|    onig_names_free(reg);
 5544|  9.49k|#endif
 5545|  9.49k|  }
 5546|  9.49k|}
onig_free:
 5550|  9.49k|{
 5551|  9.49k|  if (IS_NOT_NULL(reg)) {
  ------------------
  |  |  312|  9.49k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 9.49k, False: 0]
  |  |  ------------------
  ------------------
 5552|  9.49k|    onig_free_body(reg);
 5553|  9.49k|    xfree(reg);
  ------------------
  |  |  145|  9.49k|# define xfree       free
  ------------------
 5554|  9.49k|  }
 5555|  9.49k|}
onig_compile:
 5620|  9.49k|{
 5621|  9.49k|#define COMPILE_INIT_SIZE  20
 5622|       |
 5623|  9.49k|  int r;
 5624|  9.49k|  OnigDistance init_size;
 5625|  9.49k|  Node*  root;
 5626|  9.49k|  ScanEnv  scan_env = {0};
 5627|  9.49k|#ifdef USE_SUBEXP_CALL
 5628|  9.49k|  UnsetAddrList  uslist;
 5629|  9.49k|#endif
 5630|       |
 5631|  9.49k|  if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL;
  ------------------
  |  |  312|  9.49k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 9.49k, False: 0]
  |  |  ------------------
  ------------------
 5632|       |
 5633|       |#ifdef RUBY
 5634|       |  scan_env.sourcefile = sourcefile;
 5635|       |  scan_env.sourceline = sourceline;
 5636|       |#endif
 5637|       |
 5638|       |#ifdef ONIG_DEBUG
 5639|       |  print_enc_string(stderr, reg->enc, pattern, pattern_end);
 5640|       |#endif
 5641|       |
 5642|  9.49k|  if (reg->alloc == 0) {
  ------------------
  |  Branch (5642:7): [True: 9.49k, False: 0]
  ------------------
 5643|  9.49k|    init_size = (pattern_end - pattern) * 2;
 5644|  9.49k|    if (init_size <= 0) init_size = COMPILE_INIT_SIZE;
  ------------------
  |  | 5621|      0|#define COMPILE_INIT_SIZE  20
  ------------------
  |  Branch (5644:9): [True: 0, False: 9.49k]
  ------------------
 5645|  9.49k|    r = BBUF_INIT(reg, init_size);
  ------------------
  |  |  460|  9.49k|#define BBUF_INIT(buf,size)    onig_bbuf_init((BBuf* )(buf), (size))
  ------------------
 5646|  9.49k|    if (r != 0) goto end;
  ------------------
  |  Branch (5646:9): [True: 0, False: 9.49k]
  ------------------
 5647|  9.49k|  }
 5648|      0|  else
 5649|      0|    reg->used = 0;
 5650|       |
 5651|  9.49k|  reg->num_mem            = 0;
 5652|  9.49k|  reg->num_repeat         = 0;
 5653|  9.49k|  reg->num_null_check     = 0;
 5654|  9.49k|  reg->repeat_range_alloc = 0;
 5655|  9.49k|  reg->repeat_range       = (OnigRepeatRange* )NULL;
 5656|       |#ifdef USE_COMBINATION_EXPLOSION_CHECK
 5657|       |  reg->num_comb_exp_check = 0;
 5658|       |#endif
 5659|       |
 5660|  9.49k|  r = onig_parse_make_tree(&root, pattern, pattern_end, reg, &scan_env);
 5661|  9.49k|  if (r != 0) goto err;
  ------------------
  |  Branch (5661:7): [True: 0, False: 9.49k]
  ------------------
 5662|       |
 5663|       |#ifdef ONIG_DEBUG_PARSE_TREE
 5664|       |# if 0
 5665|       |  fprintf(stderr, "ORIGINAL PARSE TREE:\n");
 5666|       |  print_tree(stderr, root);
 5667|       |# endif
 5668|       |#endif
 5669|       |
 5670|  9.49k|#ifdef USE_NAMED_GROUP
 5671|       |  /* mixed use named group and no-named group */
 5672|  9.49k|  if (scan_env.num_named > 0 &&
  ------------------
  |  Branch (5672:7): [True: 413, False: 9.08k]
  ------------------
 5673|  9.49k|      IS_SYNTAX_BV(scan_env.syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) &&
  ------------------
  |  |  332|  9.91k|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 413, False: 0]
  |  |  ------------------
  ------------------
 5674|  9.49k|      !ONIG_IS_OPTION_ON(reg->options, ONIG_OPTION_CAPTURE_GROUP)) {
  ------------------
  |  |  479|    413|#define ONIG_IS_OPTION_ON(options,option)   ((options) & (option))
  ------------------
  |  Branch (5674:7): [True: 413, False: 0]
  ------------------
 5675|    413|    if (scan_env.num_named != scan_env.num_mem)
  ------------------
  |  Branch (5675:9): [True: 0, False: 413]
  ------------------
 5676|      0|      r = disable_noname_group_capture(&root, reg, &scan_env);
 5677|    413|    else
 5678|    413|      r = numbered_ref_check(root);
 5679|       |
 5680|    413|    if (r != 0) goto err;
  ------------------
  |  Branch (5680:9): [True: 0, False: 413]
  ------------------
 5681|    413|  }
 5682|  9.49k|#endif
 5683|       |
 5684|  9.49k|#ifdef USE_SUBEXP_CALL
 5685|  9.49k|  if (scan_env.num_call > 0) {
  ------------------
  |  Branch (5685:7): [True: 0, False: 9.49k]
  ------------------
 5686|      0|    r = unset_addr_list_init(&uslist, scan_env.num_call);
 5687|      0|    if (r != 0) goto err;
  ------------------
  |  Branch (5687:9): [True: 0, False: 0]
  ------------------
 5688|      0|    scan_env.unset_addr_list = &uslist;
 5689|      0|    r = setup_subexp_call(root, &scan_env);
 5690|      0|    if (r != 0) goto err_unset;
  ------------------
  |  Branch (5690:9): [True: 0, False: 0]
  ------------------
 5691|      0|    r = subexp_recursive_check_trav(root, &scan_env);
 5692|      0|    if (r  < 0) goto err_unset;
  ------------------
  |  Branch (5692:9): [True: 0, False: 0]
  ------------------
 5693|      0|    r = subexp_inf_recursive_check_trav(root, &scan_env);
 5694|      0|    if (r != 0) goto err_unset;
  ------------------
  |  Branch (5694:9): [True: 0, False: 0]
  ------------------
 5695|       |
 5696|      0|    reg->num_call = scan_env.num_call;
 5697|      0|  }
 5698|  9.49k|  else
 5699|  9.49k|    reg->num_call = 0;
 5700|  9.49k|#endif
 5701|       |
 5702|  9.49k|  r = setup_tree(root, reg, 0, &scan_env);
 5703|  9.49k|  if (r != 0) goto err_unset;
  ------------------
  |  Branch (5703:7): [True: 0, False: 9.49k]
  ------------------
 5704|       |
 5705|       |#ifdef ONIG_DEBUG_PARSE_TREE
 5706|       |  print_tree(stderr, root);
 5707|       |#endif
 5708|       |
 5709|  9.49k|  reg->capture_history  = scan_env.capture_history;
 5710|  9.49k|  reg->bt_mem_start     = scan_env.bt_mem_start;
 5711|  9.49k|  reg->bt_mem_start    |= reg->capture_history;
 5712|  9.49k|  if (IS_FIND_CONDITION(reg->options))
  ------------------
  |  |  400|  9.49k|#define IS_FIND_CONDITION(option) ((option) & \
  |  |  ------------------
  |  |  |  Branch (400:35): [True: 0, False: 9.49k]
  |  |  ------------------
  |  |  401|  9.49k|          (ONIG_OPTION_FIND_LONGEST | ONIG_OPTION_FIND_NOT_EMPTY))
  |  |  ------------------
  |  |  |  |  459|  9.49k|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|  9.49k|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  456|  9.49k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  455|  9.49k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  454|  9.49k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                         (ONIG_OPTION_FIND_LONGEST | ONIG_OPTION_FIND_NOT_EMPTY))
  |  |  ------------------
  |  |  |  |  460|  9.49k|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  459|  9.49k|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  458|  9.49k|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  456|  9.49k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  455|  9.49k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|  9.49k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5713|      0|    BIT_STATUS_ON_ALL(reg->bt_mem_end);
  ------------------
  |  |  369|      0|#define BIT_STATUS_ON_ALL(stats)     (stats) = ~((BitStatusType )0)
  ------------------
 5714|  9.49k|  else {
 5715|  9.49k|    reg->bt_mem_end  = scan_env.bt_mem_end;
 5716|  9.49k|    reg->bt_mem_end |= reg->capture_history;
 5717|  9.49k|  }
 5718|       |
 5719|       |#ifdef USE_COMBINATION_EXPLOSION_CHECK
 5720|       |  if (scan_env.backrefed_mem == 0
 5721|       |# ifdef USE_SUBEXP_CALL
 5722|       |      || scan_env.num_call == 0
 5723|       |# endif
 5724|       |      ) {
 5725|       |    setup_comb_exp_check(root, 0, &scan_env);
 5726|       |# ifdef USE_SUBEXP_CALL
 5727|       |    if (scan_env.has_recursion != 0) {
 5728|       |      scan_env.num_comb_exp_check = 0;
 5729|       |    }
 5730|       |    else
 5731|       |# endif
 5732|       |    if (scan_env.comb_exp_max_regnum > 0) {
 5733|       |      int i;
 5734|       |      for (i = 1; i <= scan_env.comb_exp_max_regnum; i++) {
 5735|       |	if (BIT_STATUS_AT(scan_env.backrefed_mem, i) != 0) {
 5736|       |	  scan_env.num_comb_exp_check = 0;
 5737|       |	  break;
 5738|       |	}
 5739|       |      }
 5740|       |    }
 5741|       |  }
 5742|       |
 5743|       |  reg->num_comb_exp_check = scan_env.num_comb_exp_check;
 5744|       |#endif
 5745|       |
 5746|  9.49k|  clear_optimize_info(reg);
 5747|  9.49k|#ifndef ONIG_DONT_OPTIMIZE
 5748|  9.49k|  r = set_optimize_info_from_tree(root, reg, &scan_env);
 5749|  9.49k|  if (r != 0) goto err_unset;
  ------------------
  |  Branch (5749:7): [True: 0, False: 9.49k]
  ------------------
 5750|  9.49k|#endif
 5751|       |
 5752|  9.49k|  if (IS_NOT_NULL(scan_env.mem_nodes_dynamic)) {
  ------------------
  |  |  312|  9.49k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 9.49k]
  |  |  ------------------
  ------------------
 5753|      0|    xfree(scan_env.mem_nodes_dynamic);
  ------------------
  |  |  145|      0|# define xfree       free
  ------------------
 5754|      0|    scan_env.mem_nodes_dynamic = (Node** )NULL;
 5755|      0|  }
 5756|       |
 5757|  9.49k|  r = compile_tree(root, reg);
 5758|  9.49k|  if (r == 0) {
  ------------------
  |  Branch (5758:7): [True: 9.49k, False: 0]
  ------------------
 5759|  9.49k|    r = add_opcode(reg, OP_END);
 5760|  9.49k|#ifdef USE_SUBEXP_CALL
 5761|  9.49k|    if (scan_env.num_call > 0) {
  ------------------
  |  Branch (5761:9): [True: 0, False: 9.49k]
  ------------------
 5762|      0|      r = unset_addr_list_fix(&uslist, reg);
 5763|      0|      unset_addr_list_end(&uslist);
 5764|      0|      if (r) goto err;
  ------------------
  |  Branch (5764:11): [True: 0, False: 0]
  ------------------
 5765|      0|    }
 5766|  9.49k|#endif
 5767|       |
 5768|  9.49k|    if ((reg->num_repeat != 0) || (reg->bt_mem_end != 0))
  ------------------
  |  Branch (5768:9): [True: 0, False: 9.49k]
  |  Branch (5768:35): [True: 0, False: 9.49k]
  ------------------
 5769|      0|      reg->stack_pop_level = STACK_POP_LEVEL_ALL;
  ------------------
  |  |  352|      0|#define STACK_POP_LEVEL_ALL         2
  ------------------
 5770|  9.49k|    else {
 5771|  9.49k|      if (reg->bt_mem_start != 0)
  ------------------
  |  Branch (5771:11): [True: 0, False: 9.49k]
  ------------------
 5772|      0|	reg->stack_pop_level = STACK_POP_LEVEL_MEM_START;
  ------------------
  |  |  351|      0|#define STACK_POP_LEVEL_MEM_START   1
  ------------------
 5773|  9.49k|      else
 5774|  9.49k|	reg->stack_pop_level = STACK_POP_LEVEL_FREE;
  ------------------
  |  |  350|  9.49k|#define STACK_POP_LEVEL_FREE        0
  ------------------
 5775|  9.49k|    }
 5776|  9.49k|  }
 5777|      0|#ifdef USE_SUBEXP_CALL
 5778|      0|  else if (scan_env.num_call > 0) {
  ------------------
  |  Branch (5778:12): [True: 0, False: 0]
  ------------------
 5779|      0|    unset_addr_list_end(&uslist);
 5780|      0|  }
 5781|  9.49k|#endif
 5782|  9.49k|  onig_node_free(root);
 5783|       |
 5784|       |#ifdef ONIG_DEBUG_COMPILE
 5785|       |# ifdef USE_NAMED_GROUP
 5786|       |  onig_print_names(stderr, reg);
 5787|       |# endif
 5788|       |  print_compiled_byte_code_list(stderr, reg);
 5789|       |#endif
 5790|       |
 5791|  9.49k| end:
 5792|  9.49k|  return r;
 5793|       |
 5794|      0| err_unset:
 5795|      0|#ifdef USE_SUBEXP_CALL
 5796|      0|  if (scan_env.num_call > 0) {
  ------------------
  |  Branch (5796:7): [True: 0, False: 0]
  ------------------
 5797|      0|    unset_addr_list_end(&uslist);
 5798|      0|  }
 5799|      0|#endif
 5800|      0| err:
 5801|      0|  if (IS_NOT_NULL(scan_env.error)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5802|      0|    if (IS_NOT_NULL(einfo)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5803|      0|      einfo->enc     = scan_env.enc;
 5804|      0|      einfo->par     = scan_env.error;
 5805|      0|      einfo->par_end = scan_env.error_end;
 5806|      0|    }
 5807|      0|  }
 5808|       |
 5809|      0|  onig_node_free(root);
 5810|      0|  if (IS_NOT_NULL(scan_env.mem_nodes_dynamic))
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5811|      0|      xfree(scan_env.mem_nodes_dynamic);
  ------------------
  |  |  145|      0|# define xfree       free
  ------------------
 5812|      0|  return r;
 5813|      0|}
onig_reg_init:
 5821|  9.49k|{
 5822|  9.49k|  if (! onig_inited)
  ------------------
  |  Branch (5822:7): [True: 1, False: 9.49k]
  ------------------
 5823|      1|    onig_init();
 5824|       |
 5825|  9.49k|  if (IS_NULL(reg))
  ------------------
  |  |  311|  9.49k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 9.49k]
  |  |  ------------------
  ------------------
 5826|      0|    return ONIGERR_INVALID_ARGUMENT;
  ------------------
  |  |  643|      0|#define ONIGERR_INVALID_ARGUMENT                              -30
  ------------------
 5827|       |
 5828|  9.49k|  (reg)->exact            = (UChar* )NULL;
 5829|  9.49k|  (reg)->chain            = (regex_t* )NULL;
 5830|  9.49k|  (reg)->p                = (UChar* )NULL;
 5831|  9.49k|  (reg)->name_table       = (void* )NULL;
 5832|  9.49k|  (reg)->repeat_range     = (OnigRepeatRange* )NULL;
 5833|       |
 5834|  9.49k|  if (ONIGENC_IS_UNDEF(enc))
  ------------------
  |  |  317|  9.49k|#define ONIGENC_IS_UNDEF(enc)          ((enc) == ONIG_ENCODING_UNDEF)
  |  |  ------------------
  |  |  |  |  281|  9.49k|#define ONIG_ENCODING_UNDEF    ((OnigEncoding )0)
  |  |  ------------------
  |  |  |  Branch (317:40): [True: 0, False: 9.49k]
  |  |  ------------------
  ------------------
 5835|      0|    return ONIGERR_DEFAULT_ENCODING_IS_NOT_SET;
  ------------------
  |  |  640|      0|#define ONIGERR_DEFAULT_ENCODING_IS_NOT_SET                   -21
  ------------------
 5836|       |
 5837|  9.49k|  if ((option & (ONIG_OPTION_DONT_CAPTURE_GROUP|ONIG_OPTION_CAPTURE_GROUP))
  ------------------
  |  |  462|  9.49k|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  ------------------
  |  |  |  |  461|  9.49k|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  460|  9.49k|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  459|  9.49k|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  458|  9.49k|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  456|  9.49k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|  9.49k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|  9.49k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                if ((option & (ONIG_OPTION_DONT_CAPTURE_GROUP|ONIG_OPTION_CAPTURE_GROUP))
  ------------------
  |  |  463|  9.49k|#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
  |  |  ------------------
  |  |  |  |  462|  9.49k|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  461|  9.49k|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  460|  9.49k|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  459|  9.49k|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  458|  9.49k|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  456|  9.49k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|  9.49k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|  9.49k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5837:7): [True: 0, False: 9.49k]
  ------------------
 5838|  9.49k|      == (ONIG_OPTION_DONT_CAPTURE_GROUP|ONIG_OPTION_CAPTURE_GROUP)) {
  ------------------
  |  |  462|  9.49k|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  ------------------
  |  |  |  |  461|  9.49k|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  460|  9.49k|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  459|  9.49k|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  458|  9.49k|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  456|  9.49k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|  9.49k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|  9.49k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    == (ONIG_OPTION_DONT_CAPTURE_GROUP|ONIG_OPTION_CAPTURE_GROUP)) {
  ------------------
  |  |  463|  9.49k|#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
  |  |  ------------------
  |  |  |  |  462|  9.49k|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  461|  9.49k|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  460|  9.49k|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  459|  9.49k|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  458|  9.49k|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  456|  9.49k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|  9.49k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|  9.49k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5839|      0|    return ONIGERR_INVALID_COMBINATION_OF_OPTIONS;
  ------------------
  |  |  696|      0|#define ONIGERR_INVALID_COMBINATION_OF_OPTIONS               -403
  ------------------
 5840|      0|  }
 5841|       |
 5842|  9.49k|  if ((option & ONIG_OPTION_NEGATE_SINGLELINE) != 0) {
  ------------------
  |  |  461|  9.49k|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  ------------------
  |  |  |  |  460|  9.49k|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  459|  9.49k|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  458|  9.49k|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  456|  9.49k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  455|  9.49k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|  9.49k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5842:7): [True: 0, False: 9.49k]
  ------------------
 5843|      0|    option |= syntax->options;
 5844|      0|    option &= ~ONIG_OPTION_SINGLELINE;
  ------------------
  |  |  458|      0|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  ------------------
  |  |  |  |  456|      0|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  455|      0|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5845|      0|  }
 5846|  9.49k|  else
 5847|  9.49k|    option |= syntax->options;
 5848|       |
 5849|  9.49k|  (reg)->enc              = enc;
 5850|  9.49k|  (reg)->options          = option;
 5851|  9.49k|  (reg)->syntax           = syntax;
 5852|  9.49k|  (reg)->optimize         = 0;
 5853|       |
 5854|  9.49k|  (reg)->alloc            = 0;
 5855|  9.49k|  (reg)->used             = 0;
 5856|       |
 5857|  9.49k|  (reg)->case_fold_flag   = case_fold_flag;
 5858|  9.49k|  return 0;
 5859|  9.49k|}
onig_new:
 5879|  9.49k|{
 5880|  9.49k|  int r;
 5881|       |
 5882|  9.49k|  *reg = (regex_t* )xmalloc(sizeof(regex_t));
  ------------------
  |  |  142|  9.49k|# define xmalloc     malloc
  ------------------
 5883|  9.49k|  if (IS_NULL(*reg)) return ONIGERR_MEMORY;
  ------------------
  |  |  311|  9.49k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 9.49k]
  |  |  ------------------
  ------------------
                if (IS_NULL(*reg)) return ONIGERR_MEMORY;
  ------------------
  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  ------------------
 5884|       |
 5885|  9.49k|  r = onig_reg_init(*reg, option, ONIGENC_CASE_FOLD_DEFAULT, enc, syntax);
  ------------------
  |  |  131|  9.49k|#define ONIGENC_CASE_FOLD_DEFAULT  OnigDefaultCaseFoldFlag
  ------------------
 5886|  9.49k|  if (r) goto err;
  ------------------
  |  Branch (5886:7): [True: 0, False: 9.49k]
  ------------------
 5887|       |
 5888|  9.49k|  r = onig_compile(*reg, pattern, pattern_end, einfo);
 5889|  9.49k|  if (r) {
  ------------------
  |  Branch (5889:7): [True: 0, False: 9.49k]
  ------------------
 5890|      0|  err:
 5891|      0|    onig_free(*reg);
 5892|      0|    *reg = NULL;
 5893|      0|  }
 5894|  9.49k|  return r;
 5895|  9.49k|}
onig_init:
 5905|    414|{
 5906|    414|  if (onig_inited != 0)
  ------------------
  |  Branch (5906:7): [True: 413, False: 1]
  ------------------
 5907|    413|    return 0;
 5908|       |
 5909|      1|  onig_inited = 1;
 5910|       |
 5911|       |#if defined(ONIG_DEBUG_MEMLEAK) && defined(_MSC_VER)
 5912|       |  _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
 5913|       |#endif
 5914|       |
 5915|      1|  onigenc_init();
 5916|       |  /* onigenc_set_default_caseconv_table((UChar* )0); */
 5917|       |
 5918|       |#ifdef ONIG_DEBUG_STATISTICS
 5919|       |  onig_statistics_init();
 5920|       |#endif
 5921|       |
 5922|      1|  return 0;
 5923|    414|}
onig_is_code_in_cc_len:
 5998|  5.36k|{
 5999|  5.36k|  int found;
 6000|       |
 6001|  5.36k|  if (elen > 1 || (code >= SINGLE_BYTE_SIZE)) {
  ------------------
  |  |  426|  5.36k|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|  5.36k|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (6001:7): [True: 0, False: 5.36k]
  |  Branch (6001:19): [True: 0, False: 5.36k]
  ------------------
 6002|      0|    if (IS_NULL(cc->mbuf)) {
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6003|      0|      found = 0;
 6004|      0|    }
 6005|      0|    else {
 6006|      0|      found = (onig_is_in_code_range(cc->mbuf->p, code) != 0 ? 1 : 0);
  ------------------
  |  Branch (6006:16): [True: 0, False: 0]
  ------------------
 6007|      0|    }
 6008|      0|  }
 6009|  5.36k|  else {
 6010|  5.36k|    found = (BITSET_AT(cc->bs, code) == 0 ? 0 : 1);
  ------------------
  |  |  448|  5.36k|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  445|  5.36k|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|  5.36k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|  5.36k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  446|  5.36k|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|  5.36k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|  5.36k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6010:14): [True: 3.30k, False: 2.06k]
  ------------------
 6011|  5.36k|  }
 6012|       |
 6013|  5.36k|  if (IS_NCCLASS_NOT(cc))
  ------------------
  |  |  809|  5.36k|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|  5.36k|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  5.36k|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (802:37): [True: 2.06k, False: 3.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6014|  2.06k|    return !found;
 6015|  3.30k|  else
 6016|  3.30k|    return found;
 6017|  5.36k|}
onig_is_code_in_cc:
 6021|  5.36k|{
 6022|  5.36k|  int len;
 6023|       |
 6024|  5.36k|  if (ONIGENC_MBC_MINLEN(enc) > 1) {
  ------------------
  |  |  367|  5.36k|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  ------------------
  |  Branch (6024:7): [True: 0, False: 5.36k]
  ------------------
 6025|      0|    len = 2;
 6026|      0|  }
 6027|  5.36k|  else {
 6028|  5.36k|    len = ONIGENC_CODE_TO_MBCLEN(enc, code);
  ------------------
  |  |  370|  5.36k|#define ONIGENC_CODE_TO_MBCLEN(enc,code)       (enc)->code_to_mbclen(code,enc)
  ------------------
 6029|  5.36k|  }
 6030|  5.36k|  return onig_is_code_in_cc_len(len, code, cc);
 6031|  5.36k|}
regcomp.c:numbered_ref_check:
 1989|  8.26k|{
 1990|  8.26k|  int r = 0;
 1991|       |
 1992|  8.26k|  switch (NTYPE(node)) {
  ------------------
  |  |   69|  8.26k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 1993|    413|  case NT_LIST:
  ------------------
  |  |   46|    413|#define NT_LIST        8
  ------------------
  |  Branch (1993:3): [True: 413, False: 7.84k]
  ------------------
 1994|  1.23k|  case NT_ALT:
  ------------------
  |  |   47|  1.23k|#define NT_ALT         9
  ------------------
  |  Branch (1994:3): [True: 826, False: 7.43k]
  ------------------
 1995|  5.36k|    do {
 1996|  5.36k|      r = numbered_ref_check(NCAR(node));
  ------------------
  |  |   86|  5.36k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  5.36k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1997|  5.36k|    } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
  ------------------
  |  |  312|  5.36k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 4.13k, False: 1.23k]
  |  |  ------------------
  ------------------
  |  Branch (1997:14): [True: 5.36k, False: 0]
  ------------------
 1998|  1.23k|    break;
 1999|    826|  case NT_QTFR:
  ------------------
  |  |   43|    826|#define NT_QTFR        5
  ------------------
  |  Branch (1999:3): [True: 826, False: 7.43k]
  ------------------
 2000|    826|    r = numbered_ref_check(NQTFR(node)->target);
  ------------------
  |  |   80|    826|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 2001|    826|    break;
 2002|  1.65k|  case NT_ENCLOSE:
  ------------------
  |  |   44|  1.65k|#define NT_ENCLOSE     6
  ------------------
  |  Branch (2002:3): [True: 1.65k, False: 6.60k]
  ------------------
 2003|  1.65k|    r = numbered_ref_check(NENCLOSE(node)->target);
  ------------------
  |  |   81|  1.65k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 2004|  1.65k|    break;
 2005|       |
 2006|      0|  case NT_BREF:
  ------------------
  |  |   42|      0|#define NT_BREF        4
  ------------------
  |  Branch (2006:3): [True: 0, False: 8.26k]
  ------------------
 2007|      0|    if (! IS_BACKREF_NAME_REF(NBREF(node)))
  ------------------
  |  |  163|      0|#define IS_BACKREF_NAME_REF(bn)        (((bn)->state & NST_NAME_REF)   != 0)
  |  |  ------------------
  |  |  |  |  139|      0|#define NST_NAME_REF              (1<<11)
  |  |  ------------------
  ------------------
  |  Branch (2007:9): [True: 0, False: 0]
  ------------------
 2008|      0|      return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
  ------------------
  |  |  678|      0|#define ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED         -209
  ------------------
 2009|      0|    break;
 2010|       |
 2011|    826|  case NT_ANCHOR:
  ------------------
  |  |   45|    826|#define NT_ANCHOR      7
  ------------------
  |  Branch (2011:3): [True: 826, False: 7.43k]
  ------------------
 2012|    826|    if (NANCHOR(node)->target)
  ------------------
  |  |   82|    826|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
  |  Branch (2012:9): [True: 0, False: 826]
  ------------------
 2013|      0|      r = numbered_ref_check(NANCHOR(node)->target);
  ------------------
  |  |   82|      0|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 2014|    826|    break;
 2015|       |
 2016|  3.71k|  default:
  ------------------
  |  Branch (2016:3): [True: 3.71k, False: 4.54k]
  ------------------
 2017|  3.71k|    break;
 2018|  8.26k|  }
 2019|       |
 2020|  8.26k|  return r;
 2021|  8.26k|}
regcomp.c:get_min_match_length:
 2157|  14.8k|{
 2158|  14.8k|  OnigDistance tmin;
 2159|  14.8k|  int r = 0;
 2160|       |
 2161|  14.8k|  *min = 0;
 2162|  14.8k|  switch (NTYPE(node)) {
  ------------------
  |  |   69|  14.8k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 2163|      0|  case NT_BREF:
  ------------------
  |  |   42|      0|#define NT_BREF        4
  ------------------
  |  Branch (2163:3): [True: 0, False: 14.8k]
  ------------------
 2164|      0|    {
 2165|      0|      int i;
 2166|      0|      int* backs;
 2167|      0|      Node** nodes = SCANENV_MEM_NODES(env);
  ------------------
  |  |  287|      0| (IS_NOT_NULL((senv)->mem_nodes_dynamic) ? \
  |  |  ------------------
  |  |  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  288|      0|    (senv)->mem_nodes_dynamic : (senv)->mem_nodes_static)
  ------------------
 2168|      0|      BRefNode* br = NBREF(node);
  ------------------
  |  |   79|      0|#define NBREF(node)        (&((node)->u.bref))
  ------------------
 2169|      0|      if (br->state & NST_RECURSION) break;
  ------------------
  |  |  135|      0|#define NST_RECURSION             (1<<7)
  ------------------
  |  Branch (2169:11): [True: 0, False: 0]
  ------------------
 2170|       |
 2171|      0|      backs = BACKREFS_P(br);
  ------------------
  |  |  120|      0|  (IS_NOT_NULL((br)->back_dynamic) ? (br)->back_dynamic : (br)->back_static);
  |  |  ------------------
  |  |  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2172|      0|      if (backs[0] > env->num_mem)  return ONIGERR_INVALID_BACKREF;
  ------------------
  |  |  677|      0|#define ONIGERR_INVALID_BACKREF                              -208
  ------------------
  |  Branch (2172:11): [True: 0, False: 0]
  ------------------
 2173|      0|      r = get_min_match_length(nodes[backs[0]], min, env);
 2174|      0|      if (r != 0) break;
  ------------------
  |  Branch (2174:11): [True: 0, False: 0]
  ------------------
 2175|      0|      for (i = 1; i < br->back_num; i++) {
  ------------------
  |  Branch (2175:19): [True: 0, False: 0]
  ------------------
 2176|      0|	if (backs[i] > env->num_mem)  return ONIGERR_INVALID_BACKREF;
  ------------------
  |  |  677|      0|#define ONIGERR_INVALID_BACKREF                              -208
  ------------------
  |  Branch (2176:6): [True: 0, False: 0]
  ------------------
 2177|      0|	r = get_min_match_length(nodes[backs[i]], &tmin, env);
 2178|      0|	if (r != 0) break;
  ------------------
  |  Branch (2178:6): [True: 0, False: 0]
  ------------------
 2179|      0|	if (*min > tmin) *min = tmin;
  ------------------
  |  Branch (2179:6): [True: 0, False: 0]
  ------------------
 2180|      0|      }
 2181|      0|    }
 2182|      0|    break;
 2183|       |
 2184|      0|#ifdef USE_SUBEXP_CALL
 2185|      0|  case NT_CALL:
  ------------------
  |  |   48|      0|#define NT_CALL       10
  ------------------
  |  Branch (2185:3): [True: 0, False: 14.8k]
  ------------------
 2186|      0|    if (IS_CALL_RECURSION(NCALL(node))) {
  ------------------
  |  |  161|      0|#define IS_CALL_RECURSION(cn)          (((cn)->state & NST_RECURSION)  != 0)
  |  |  ------------------
  |  |  |  |  135|      0|#define NST_RECURSION             (1<<7)
  |  |  ------------------
  |  |  |  Branch (161:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2187|      0|      EncloseNode* en = NENCLOSE(NCALL(node)->target);
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 2188|      0|      if (IS_ENCLOSE_MIN_FIXED(en))
  ------------------
  |  |  152|      0|#define IS_ENCLOSE_MIN_FIXED(en)       (((en)->state & NST_MIN_FIXED)     != 0)
  |  |  ------------------
  |  |  |  |  128|      0|#define NST_MIN_FIXED             (1<<0)
  |  |  ------------------
  |  |  |  Branch (152:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2189|      0|	*min = en->min_len;
 2190|      0|    }
 2191|      0|    else
 2192|      0|      r = get_min_match_length(NCALL(node)->target, min, env);
  ------------------
  |  |   84|      0|#define NCALL(node)        (&((node)->u.call))
  ------------------
 2193|      0|    break;
 2194|      0|#endif
 2195|       |
 2196|    826|  case NT_LIST:
  ------------------
  |  |   46|    826|#define NT_LIST        8
  ------------------
  |  Branch (2196:3): [True: 826, False: 14.0k]
  ------------------
 2197|  1.65k|    do {
 2198|  1.65k|      r = get_min_match_length(NCAR(node), &tmin, env);
  ------------------
  |  |   86|  1.65k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  1.65k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 2199|  1.65k|      if (r == 0) *min += tmin;
  ------------------
  |  Branch (2199:11): [True: 1.65k, False: 0]
  ------------------
 2200|  1.65k|    } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
  ------------------
  |  |  312|  1.65k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 826, False: 826]
  |  |  ------------------
  ------------------
  |  Branch (2200:14): [True: 1.65k, False: 0]
  ------------------
 2201|    826|    break;
 2202|       |
 2203|      0|  case NT_ALT:
  ------------------
  |  |   47|      0|#define NT_ALT         9
  ------------------
  |  Branch (2203:3): [True: 0, False: 14.8k]
  ------------------
 2204|      0|    {
 2205|      0|      Node *x, *y;
 2206|      0|      y = node;
 2207|      0|      do {
 2208|      0|	x = NCAR(y);
  ------------------
  |  |   86|      0|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 2209|      0|	r = get_min_match_length(x, &tmin, env);
 2210|      0|	if (r != 0) break;
  ------------------
  |  Branch (2210:6): [True: 0, False: 0]
  ------------------
 2211|      0|	if (y == node) *min = tmin;
  ------------------
  |  Branch (2211:6): [True: 0, False: 0]
  ------------------
 2212|      0|	else if (*min > tmin) *min = tmin;
  ------------------
  |  Branch (2212:11): [True: 0, False: 0]
  ------------------
 2213|      0|      } while (r == 0 && IS_NOT_NULL(y = NCDR(y)));
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2213:16): [True: 0, False: 0]
  ------------------
 2214|      0|    }
 2215|      0|    break;
 2216|       |
 2217|  1.23k|  case NT_STR:
  ------------------
  |  |   38|  1.23k|#define NT_STR         0
  ------------------
  |  Branch (2217:3): [True: 1.23k, False: 13.6k]
  ------------------
 2218|  1.23k|    {
 2219|  1.23k|      StrNode* sn = NSTR(node);
  ------------------
  |  |   76|  1.23k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 2220|  1.23k|      *min = sn->end - sn->s;
 2221|  1.23k|    }
 2222|  1.23k|    break;
 2223|       |
 2224|      0|  case NT_CTYPE:
  ------------------
  |  |   40|      0|#define NT_CTYPE       2
  ------------------
  |  Branch (2224:3): [True: 0, False: 14.8k]
  ------------------
 2225|      0|    *min = 1;
 2226|      0|    break;
 2227|       |
 2228|  9.49k|  case NT_CCLASS:
  ------------------
  |  |   39|  9.49k|#define NT_CCLASS      1
  ------------------
  |  Branch (2228:3): [True: 9.49k, False: 5.36k]
  ------------------
 2229|  11.9k|  case NT_CANY:
  ------------------
  |  |   41|  11.9k|#define NT_CANY        3
  ------------------
  |  Branch (2229:3): [True: 2.47k, False: 12.3k]
  ------------------
 2230|  11.9k|    *min = 1;
 2231|  11.9k|    break;
 2232|       |
 2233|    826|  case NT_QTFR:
  ------------------
  |  |   43|    826|#define NT_QTFR        5
  ------------------
  |  Branch (2233:3): [True: 826, False: 14.0k]
  ------------------
 2234|    826|    {
 2235|    826|      QtfrNode* qn = NQTFR(node);
  ------------------
  |  |   80|    826|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 2236|       |
 2237|    826|      if (qn->lower > 0) {
  ------------------
  |  Branch (2237:11): [True: 826, False: 0]
  ------------------
 2238|    826|	r = get_min_match_length(qn->target, min, env);
 2239|    826|	if (r == 0)
  ------------------
  |  Branch (2239:6): [True: 826, False: 0]
  ------------------
 2240|    826|	  *min = distance_multiply(*min, qn->lower);
 2241|    826|      }
 2242|    826|    }
 2243|    826|    break;
 2244|       |
 2245|      0|  case NT_ENCLOSE:
  ------------------
  |  |   44|      0|#define NT_ENCLOSE     6
  ------------------
  |  Branch (2245:3): [True: 0, False: 14.8k]
  ------------------
 2246|      0|    {
 2247|      0|      EncloseNode* en = NENCLOSE(node);
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 2248|      0|      switch (en->type) {
  ------------------
  |  Branch (2248:15): [True: 0, False: 0]
  ------------------
 2249|      0|      case ENCLOSE_MEMORY:
  ------------------
  |  |   94|      0|#define ENCLOSE_MEMORY           (1<<0)
  ------------------
  |  Branch (2249:7): [True: 0, False: 0]
  ------------------
 2250|      0|        if (IS_ENCLOSE_MIN_FIXED(en))
  ------------------
  |  |  152|      0|#define IS_ENCLOSE_MIN_FIXED(en)       (((en)->state & NST_MIN_FIXED)     != 0)
  |  |  ------------------
  |  |  |  |  128|      0|#define NST_MIN_FIXED             (1<<0)
  |  |  ------------------
  |  |  |  Branch (152:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2251|      0|          *min = en->min_len;
 2252|      0|        else {
 2253|      0|	  if (IS_ENCLOSE_MARK1(NENCLOSE(node)))
  ------------------
  |  |  150|      0|#define IS_ENCLOSE_MARK1(en)           (((en)->state & NST_MARK1)         != 0)
  |  |  ------------------
  |  |  |  |  131|      0|#define NST_MARK1                 (1<<3)
  |  |  ------------------
  |  |  |  Branch (150:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2254|      0|	    *min = 0;  /* recursive */
 2255|      0|	  else {
 2256|      0|	    SET_ENCLOSE_STATUS(node, NST_MARK1);
  ------------------
  |  |  144|      0|#define SET_ENCLOSE_STATUS(node,f)      (node)->u.enclose.state |=  (f)
  ------------------
 2257|      0|	    r = get_min_match_length(en->target, min, env);
 2258|      0|	    CLEAR_ENCLOSE_STATUS(node, NST_MARK1);
  ------------------
  |  |  145|      0|#define CLEAR_ENCLOSE_STATUS(node,f)    (node)->u.enclose.state &= ~(f)
  ------------------
 2259|      0|	    if (r == 0) {
  ------------------
  |  Branch (2259:10): [True: 0, False: 0]
  ------------------
 2260|      0|	      en->min_len = *min;
 2261|      0|	      SET_ENCLOSE_STATUS(node, NST_MIN_FIXED);
  ------------------
  |  |  144|      0|#define SET_ENCLOSE_STATUS(node,f)      (node)->u.enclose.state |=  (f)
  ------------------
 2262|      0|	    }
 2263|      0|	  }
 2264|      0|        }
 2265|      0|        break;
 2266|       |
 2267|      0|      case ENCLOSE_OPTION:
  ------------------
  |  |   95|      0|#define ENCLOSE_OPTION           (1<<1)
  ------------------
  |  Branch (2267:7): [True: 0, False: 0]
  ------------------
 2268|      0|      case ENCLOSE_STOP_BACKTRACK:
  ------------------
  |  |   96|      0|#define ENCLOSE_STOP_BACKTRACK   (1<<2)
  ------------------
  |  Branch (2268:7): [True: 0, False: 0]
  ------------------
 2269|      0|      case ENCLOSE_CONDITION:
  ------------------
  |  |   97|      0|#define ENCLOSE_CONDITION        (1<<3)
  ------------------
  |  Branch (2269:7): [True: 0, False: 0]
  ------------------
 2270|      0|	r = get_min_match_length(en->target, min, env);
 2271|      0|	break;
 2272|       |
 2273|      0|      case ENCLOSE_ABSENT:
  ------------------
  |  |   98|      0|#define ENCLOSE_ABSENT           (1<<4)
  ------------------
  |  Branch (2273:7): [True: 0, False: 0]
  ------------------
 2274|      0|	break;
 2275|      0|      }
 2276|      0|    }
 2277|      0|    break;
 2278|       |
 2279|      0|  case NT_ANCHOR:
  ------------------
  |  |   45|      0|#define NT_ANCHOR      7
  ------------------
  |  Branch (2279:3): [True: 0, False: 14.8k]
  ------------------
 2280|      0|  default:
  ------------------
  |  Branch (2280:3): [True: 0, False: 14.8k]
  ------------------
 2281|      0|    break;
 2282|  14.8k|  }
 2283|       |
 2284|  14.8k|  return r;
 2285|  14.8k|}
regcomp.c:distance_multiply:
  108|  13.6k|{
  109|  13.6k|  if (m == 0) return 0;
  ------------------
  |  Branch (109:7): [True: 4.95k, False: 8.67k]
  ------------------
  110|       |
  111|  8.67k|  if (d < ONIG_INFINITE_DISTANCE / m)
  ------------------
  |  |   85|  8.67k|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
  |  Branch (111:7): [True: 8.67k, False: 0]
  ------------------
  112|  8.67k|    return d * m;
  113|      0|  else
  114|      0|    return ONIG_INFINITE_DISTANCE;
  ------------------
  |  |   85|      0|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
  115|  8.67k|}
regcomp.c:setup_tree:
 3879|  71.0k|{
 3880|  71.0k|  int type;
 3881|  71.0k|  int r = 0;
 3882|       |
 3883|  71.0k|restart:
 3884|  71.0k|  type = NTYPE(node);
  ------------------
  |  |   69|  71.0k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 3885|  71.0k|  switch (type) {
 3886|  9.91k|  case NT_LIST:
  ------------------
  |  |   46|  9.91k|#define NT_LIST        8
  ------------------
  |  Branch (3886:3): [True: 9.91k, False: 61.1k]
  ------------------
 3887|  9.91k|    {
 3888|  9.91k|      Node* prev = NULL_NODE;
  ------------------
  |  |  283|  9.91k|#define NULL_NODE  ((Node* )0)
  ------------------
 3889|  40.8k|      do {
 3890|  40.8k|	r = setup_tree(NCAR(node), reg, state, env);
  ------------------
  |  |   86|  40.8k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  40.8k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 3891|  40.8k|	if (IS_NOT_NULL(prev) && r == 0) {
  ------------------
  |  |  312|  81.7k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 30.9k, False: 9.91k]
  |  |  ------------------
  ------------------
  |  Branch (3891:27): [True: 30.9k, False: 0]
  ------------------
 3892|  30.9k|	  r = next_setup(prev, NCAR(node), reg);
  ------------------
  |  |   86|  30.9k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  30.9k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 3893|  30.9k|	}
 3894|  40.8k|	prev = NCAR(node);
  ------------------
  |  |   86|  40.8k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  40.8k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 3895|  40.8k|      } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
  ------------------
  |  |  312|  40.8k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 30.9k, False: 9.91k]
  |  |  ------------------
  ------------------
  |  Branch (3895:16): [True: 40.8k, False: 0]
  ------------------
 3896|  9.91k|    }
 3897|  9.91k|    break;
 3898|       |
 3899|  2.47k|  case NT_ALT:
  ------------------
  |  |   47|  2.47k|#define NT_ALT         9
  ------------------
  |  Branch (3899:3): [True: 2.47k, False: 68.5k]
  ------------------
 3900|  5.78k|    do {
 3901|  5.78k|      r = setup_tree(NCAR(node), reg, (state | IN_ALT), env);
  ------------------
  |  |   86|  5.78k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  5.78k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
                    r = setup_tree(NCAR(node), reg, (state | IN_ALT), env);
  ------------------
  |  | 3268|  5.78k|#define IN_ALT          (1<<0)
  ------------------
 3902|  5.78k|    } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
  ------------------
  |  |  312|  5.78k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 3.30k, False: 2.47k]
  |  |  ------------------
  ------------------
  |  Branch (3902:14): [True: 5.78k, False: 0]
  ------------------
 3903|  2.47k|    break;
 3904|       |
 3905|  9.91k|  case NT_CCLASS:
  ------------------
  |  |   39|  9.91k|#define NT_CCLASS      1
  ------------------
  |  Branch (3905:3): [True: 9.91k, False: 61.1k]
  ------------------
 3906|  9.91k|    break;
 3907|       |
 3908|  17.7k|  case NT_STR:
  ------------------
  |  |   38|  17.7k|#define NT_STR         0
  ------------------
  |  Branch (3908:3): [True: 17.7k, False: 53.2k]
  ------------------
 3909|  17.7k|    if (IS_IGNORECASE(reg->options) && !NSTRING_IS_RAW(node)) {
  ------------------
  |  |  396|  35.5k|#define IS_IGNORECASE(option)     ((option) & ONIG_OPTION_IGNORECASE)
  |  |  ------------------
  |  |  |  |  454|  17.7k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  ------------------
  |  |  |  Branch (396:35): [True: 0, False: 17.7k]
  |  |  ------------------
  ------------------
                  if (IS_IGNORECASE(reg->options) && !NSTRING_IS_RAW(node)) {
  ------------------
  |  |  114|      0|#define NSTRING_IS_RAW(node)          (((node)->u.str.flag & NSTR_RAW)   != 0)
  |  |  ------------------
  |  |  |  |  104|      0|#define NSTR_RAW                (1<<0) /* by backslashed number */
  |  |  ------------------
  ------------------
  |  Branch (3909:40): [True: 0, False: 0]
  ------------------
 3910|      0|      r = expand_case_fold_string(node, reg, state);
 3911|      0|    }
 3912|  17.7k|    break;
 3913|       |
 3914|      0|  case NT_CTYPE:
  ------------------
  |  |   40|      0|#define NT_CTYPE       2
  ------------------
  |  Branch (3914:3): [True: 0, False: 71.0k]
  ------------------
 3915|  4.13k|  case NT_CANY:
  ------------------
  |  |   41|  4.13k|#define NT_CANY        3
  ------------------
  |  Branch (3915:3): [True: 4.13k, False: 66.9k]
  ------------------
 3916|  4.13k|    break;
 3917|       |
 3918|      0|#ifdef USE_SUBEXP_CALL
 3919|      0|  case NT_CALL:
  ------------------
  |  |   48|      0|#define NT_CALL       10
  ------------------
  |  Branch (3919:3): [True: 0, False: 71.0k]
  ------------------
 3920|      0|    break;
 3921|      0|#endif
 3922|       |
 3923|      0|  case NT_BREF:
  ------------------
  |  |   42|      0|#define NT_BREF        4
  ------------------
  |  Branch (3923:3): [True: 0, False: 71.0k]
  ------------------
 3924|      0|    {
 3925|      0|      int i;
 3926|      0|      int* p;
 3927|      0|      Node** nodes = SCANENV_MEM_NODES(env);
  ------------------
  |  |  287|      0| (IS_NOT_NULL((senv)->mem_nodes_dynamic) ? \
  |  |  ------------------
  |  |  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  288|      0|    (senv)->mem_nodes_dynamic : (senv)->mem_nodes_static)
  ------------------
 3928|      0|      BRefNode* br = NBREF(node);
  ------------------
  |  |   79|      0|#define NBREF(node)        (&((node)->u.bref))
  ------------------
 3929|      0|      p = BACKREFS_P(br);
  ------------------
  |  |  120|      0|  (IS_NOT_NULL((br)->back_dynamic) ? (br)->back_dynamic : (br)->back_static);
  |  |  ------------------
  |  |  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3930|      0|      for (i = 0; i < br->back_num; i++) {
  ------------------
  |  Branch (3930:19): [True: 0, False: 0]
  ------------------
 3931|      0|	if (p[i] > env->num_mem)  return ONIGERR_INVALID_BACKREF;
  ------------------
  |  |  677|      0|#define ONIGERR_INVALID_BACKREF                              -208
  ------------------
  |  Branch (3931:6): [True: 0, False: 0]
  ------------------
 3932|      0|	BIT_STATUS_ON_AT(env->backrefed_mem, p[i]);
  ------------------
  |  |  373|      0|#define BIT_STATUS_ON_AT(stats,n) do {\
  |  |  374|      0|  if ((n) < (int )BIT_STATUS_BITS_NUM)\
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (374:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  375|      0|    (stats) |= (1 << (n));\
  |  |  376|      0|  else\
  |  |  377|      0|    (stats) |= 1;\
  |  |  378|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (378:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3933|      0|	BIT_STATUS_ON_AT(env->bt_mem_start, p[i]);
  ------------------
  |  |  373|      0|#define BIT_STATUS_ON_AT(stats,n) do {\
  |  |  374|      0|  if ((n) < (int )BIT_STATUS_BITS_NUM)\
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (374:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  375|      0|    (stats) |= (1 << (n));\
  |  |  376|      0|  else\
  |  |  377|      0|    (stats) |= 1;\
  |  |  378|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (378:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3934|      0|#ifdef USE_BACKREF_WITH_LEVEL
 3935|      0|	if (IS_BACKREF_NEST_LEVEL(br)) {
  ------------------
  |  |  164|      0|#define IS_BACKREF_NEST_LEVEL(bn)      (((bn)->state & NST_NEST_LEVEL) != 0)
  |  |  ------------------
  |  |  |  |  141|      0|#define NST_NEST_LEVEL            (1<<13)
  |  |  ------------------
  |  |  |  Branch (164:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3936|      0|	  BIT_STATUS_ON_AT(env->bt_mem_end, p[i]);
  ------------------
  |  |  373|      0|#define BIT_STATUS_ON_AT(stats,n) do {\
  |  |  374|      0|  if ((n) < (int )BIT_STATUS_BITS_NUM)\
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (374:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  375|      0|    (stats) |= (1 << (n));\
  |  |  376|      0|  else\
  |  |  377|      0|    (stats) |= 1;\
  |  |  378|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (378:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3937|      0|	}
 3938|      0|#endif
 3939|      0|	SET_ENCLOSE_STATUS(nodes[p[i]], NST_MEM_BACKREFED);
  ------------------
  |  |  144|      0|#define SET_ENCLOSE_STATUS(node,f)      (node)->u.enclose.state |=  (f)
  ------------------
 3940|      0|      }
 3941|      0|    }
 3942|      0|    break;
 3943|       |
 3944|  12.3k|  case NT_QTFR:
  ------------------
  |  |   43|  12.3k|#define NT_QTFR        5
  ------------------
  |  Branch (3944:3): [True: 12.3k, False: 58.6k]
  ------------------
 3945|  12.3k|    {
 3946|  12.3k|      OnigDistance d;
 3947|  12.3k|      QtfrNode* qn = NQTFR(node);
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 3948|  12.3k|      Node* target = qn->target;
 3949|       |
 3950|  12.3k|      if ((state & IN_REPEAT) != 0) {
  ------------------
  |  | 3270|  12.3k|#define IN_REPEAT       (1<<2)
  ------------------
  |  Branch (3950:11): [True: 826, False: 11.5k]
  ------------------
 3951|    826|	qn->state |= NST_IN_REPEAT;
  ------------------
  |  |  140|    826|#define NST_IN_REPEAT             (1<<12) /* STK_REPEAT is nested in stack. */
  ------------------
 3952|    826|      }
 3953|       |
 3954|  12.3k|      if (IS_REPEAT_INFINITE(qn->upper) || qn->upper >= 1) {
  ------------------
  |  |  422|  24.7k|#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
  |  |  ------------------
  |  |  |  |  421|  12.3k|#define REPEAT_INFINITE         -1
  |  |  ------------------
  |  |  |  Branch (422:33): [True: 11.9k, False: 413]
  |  |  ------------------
  ------------------
  |  Branch (3954:44): [True: 413, False: 0]
  ------------------
 3955|  12.3k|	r = get_min_match_length(target, &d, env);
 3956|  12.3k|	if (r) break;
  ------------------
  |  Branch (3956:6): [True: 0, False: 12.3k]
  ------------------
 3957|  12.3k|	if (d == 0) {
  ------------------
  |  Branch (3957:6): [True: 0, False: 12.3k]
  ------------------
 3958|      0|	  qn->target_empty_info = NQ_TARGET_IS_EMPTY;
  ------------------
  |  |  123|      0|#define NQ_TARGET_IS_EMPTY        1
  ------------------
 3959|      0|#ifdef USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT
 3960|      0|	  r = quantifiers_memory_node_info(target);
 3961|      0|	  if (r < 0) break;
  ------------------
  |  Branch (3961:8): [True: 0, False: 0]
  ------------------
 3962|      0|	  if (r > 0) {
  ------------------
  |  Branch (3962:8): [True: 0, False: 0]
  ------------------
 3963|      0|	    qn->target_empty_info = r;
 3964|      0|	  }
 3965|      0|#endif
 3966|       |#if 0
 3967|       |	  r = get_max_match_length(target, &d, env);
 3968|       |	  if (r == 0 && d == 0) {
 3969|       |	    /*  ()* ==> ()?, ()+ ==> ()  */
 3970|       |	    qn->upper = 1;
 3971|       |	    if (qn->lower > 1) qn->lower = 1;
 3972|       |	    if (NTYPE(target) == NT_STR) {
 3973|       |	      qn->upper = qn->lower = 0;  /* /(?:)+/ ==> // */
 3974|       |	    }
 3975|       |	  }
 3976|       |#endif
 3977|      0|	}
 3978|  12.3k|      }
 3979|       |
 3980|  12.3k|      state |= IN_REPEAT;
  ------------------
  |  | 3270|  12.3k|#define IN_REPEAT       (1<<2)
  ------------------
 3981|  12.3k|      if (qn->lower != qn->upper)
  ------------------
  |  Branch (3981:11): [True: 12.3k, False: 0]
  ------------------
 3982|  12.3k|	state |= IN_VAR_REPEAT;
  ------------------
  |  | 3271|  12.3k|#define IN_VAR_REPEAT   (1<<3)
  ------------------
 3983|  12.3k|      r = setup_tree(target, reg, state, env);
 3984|  12.3k|      if (r) break;
  ------------------
  |  Branch (3984:11): [True: 0, False: 12.3k]
  ------------------
 3985|       |
 3986|       |      /* expand string */
 3987|  12.3k|#define EXPAND_STRING_MAX_LENGTH  100
 3988|  12.3k|      if (NTYPE(target) == NT_STR) {
  ------------------
  |  |   69|  12.3k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
                    if (NTYPE(target) == NT_STR) {
  ------------------
  |  |   38|  12.3k|#define NT_STR         0
  ------------------
  |  Branch (3988:11): [True: 413, False: 11.9k]
  ------------------
 3989|    413|	if (qn->lower > 1) {
  ------------------
  |  Branch (3989:6): [True: 0, False: 413]
  ------------------
 3990|      0|	  int i, n = qn->lower;
 3991|      0|	  OnigDistance len = NSTRING_LEN(target);
  ------------------
  |  |  108|      0|#define NSTRING_LEN(node) (OnigDistance )((node)->u.str.end - (node)->u.str.s)
  ------------------
 3992|      0|	  StrNode* sn = NSTR(target);
  ------------------
  |  |   76|      0|#define NSTR(node)         (&((node)->u.str))
  ------------------
 3993|      0|	  Node* np;
 3994|       |
 3995|      0|	  np = onig_node_new_str(sn->s, sn->end);
 3996|      0|	  if (IS_NULL(np)) return ONIGERR_MEMORY;
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	  if (IS_NULL(np)) return ONIGERR_MEMORY;
  ------------------
  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  ------------------
 3997|      0|	  NSTR(np)->flag = sn->flag;
  ------------------
  |  |   76|      0|#define NSTR(node)         (&((node)->u.str))
  ------------------
 3998|       |
 3999|      0|	  for (i = 1; i < n && (i+1) * len <= EXPAND_STRING_MAX_LENGTH; i++) {
  ------------------
  |  | 3987|      0|#define EXPAND_STRING_MAX_LENGTH  100
  ------------------
  |  Branch (3999:16): [True: 0, False: 0]
  |  Branch (3999:25): [True: 0, False: 0]
  ------------------
 4000|      0|	    r = onig_node_str_cat(np, sn->s, sn->end);
 4001|      0|	    if (r) {
  ------------------
  |  Branch (4001:10): [True: 0, False: 0]
  ------------------
 4002|      0|	      onig_node_free(np);
 4003|      0|	      return r;
 4004|      0|	    }
 4005|      0|	  }
 4006|      0|	  if (i < qn->upper || IS_REPEAT_INFINITE(qn->upper)) {
  ------------------
  |  |  422|      0|#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
  |  |  ------------------
  |  |  |  |  421|      0|#define REPEAT_INFINITE         -1
  |  |  ------------------
  |  |  |  Branch (422:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4006:8): [True: 0, False: 0]
  ------------------
 4007|      0|	    Node *np1, *np2;
 4008|       |
 4009|      0|	    qn->lower -= i;
 4010|      0|	    if (! IS_REPEAT_INFINITE(qn->upper))
  ------------------
  |  |  422|      0|#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
  |  |  ------------------
  |  |  |  |  421|      0|#define REPEAT_INFINITE         -1
  |  |  ------------------
  ------------------
  |  Branch (4010:10): [True: 0, False: 0]
  ------------------
 4011|      0|	      qn->upper -= i;
 4012|       |
 4013|      0|	    np1 = onig_node_new_list(np, NULL);
 4014|      0|	    if (IS_NULL(np1)) {
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4015|      0|	      onig_node_free(np);
 4016|      0|	      return ONIGERR_MEMORY;
  ------------------
  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  ------------------
 4017|      0|	    }
 4018|      0|	    swap_node(np1, node);
 4019|      0|	    np2 = onig_node_list_add(node, np1);
 4020|      0|	    if (IS_NULL(np2)) {
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4021|      0|	      onig_node_free(np1);
 4022|      0|	      return ONIGERR_MEMORY;
  ------------------
  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  ------------------
 4023|      0|	    }
 4024|      0|	  }
 4025|      0|	  else {
 4026|      0|	    swap_node(np, node);
 4027|      0|	    onig_node_free(np);
 4028|      0|	  }
 4029|      0|	  break; /* break case NT_QTFR: */
 4030|      0|	}
 4031|    413|      }
 4032|       |
 4033|       |#ifdef USE_OP_PUSH_OR_JUMP_EXACT
 4034|       |      if (qn->greedy && (qn->target_empty_info != 0)) {
 4035|       |	if (NTYPE(target) == NT_QTFR) {
 4036|       |	  QtfrNode* tqn = NQTFR(target);
 4037|       |	  if (IS_NOT_NULL(tqn->head_exact)) {
 4038|       |	    qn->head_exact  = tqn->head_exact;
 4039|       |	    tqn->head_exact = NULL;
 4040|       |	  }
 4041|       |	}
 4042|       |	else {
 4043|       |	  qn->head_exact = get_head_value_node(qn->target, 1, reg);
 4044|       |	}
 4045|       |      }
 4046|       |#endif
 4047|  12.3k|    }
 4048|  12.3k|    break;
 4049|       |
 4050|  12.3k|  case NT_ENCLOSE:
  ------------------
  |  |   44|  2.47k|#define NT_ENCLOSE     6
  ------------------
  |  Branch (4050:3): [True: 2.47k, False: 68.5k]
  ------------------
 4051|  2.47k|    {
 4052|  2.47k|      EncloseNode* en = NENCLOSE(node);
  ------------------
  |  |   81|  2.47k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 4053|       |
 4054|  2.47k|      switch (en->type) {
  ------------------
  |  Branch (4054:15): [True: 0, False: 2.47k]
  ------------------
 4055|    413|      case ENCLOSE_OPTION:
  ------------------
  |  |   95|    413|#define ENCLOSE_OPTION           (1<<1)
  ------------------
  |  Branch (4055:7): [True: 413, False: 2.06k]
  ------------------
 4056|    413|	{
 4057|    413|	  OnigOptionType options = reg->options;
 4058|    413|	  reg->options = NENCLOSE(node)->option;
  ------------------
  |  |   81|    413|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 4059|    413|	  r = setup_tree(NENCLOSE(node)->target, reg, state, env);
  ------------------
  |  |   81|    413|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 4060|    413|	  reg->options = options;
 4061|    413|	}
 4062|    413|	break;
 4063|       |
 4064|  2.06k|      case ENCLOSE_MEMORY:
  ------------------
  |  |   94|  2.06k|#define ENCLOSE_MEMORY           (1<<0)
  ------------------
  |  Branch (4064:7): [True: 2.06k, False: 413]
  ------------------
 4065|  2.06k|	if ((state & (IN_ALT | IN_NOT | IN_VAR_REPEAT | IN_CALL)) != 0) {
  ------------------
  |  | 3268|  2.06k|#define IN_ALT          (1<<0)
  ------------------
              	if ((state & (IN_ALT | IN_NOT | IN_VAR_REPEAT | IN_CALL)) != 0) {
  ------------------
  |  | 3269|  2.06k|#define IN_NOT          (1<<1)
  ------------------
              	if ((state & (IN_ALT | IN_NOT | IN_VAR_REPEAT | IN_CALL)) != 0) {
  ------------------
  |  | 3271|  2.06k|#define IN_VAR_REPEAT   (1<<3)
  ------------------
              	if ((state & (IN_ALT | IN_NOT | IN_VAR_REPEAT | IN_CALL)) != 0) {
  ------------------
  |  | 3272|  2.06k|#define IN_CALL         (1<<4)
  ------------------
  |  Branch (4065:6): [True: 0, False: 2.06k]
  ------------------
 4066|      0|	  BIT_STATUS_ON_AT(env->bt_mem_start, en->regnum);
  ------------------
  |  |  373|      0|#define BIT_STATUS_ON_AT(stats,n) do {\
  |  |  374|      0|  if ((n) < (int )BIT_STATUS_BITS_NUM)\
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (374:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  375|      0|    (stats) |= (1 << (n));\
  |  |  376|      0|  else\
  |  |  377|      0|    (stats) |= 1;\
  |  |  378|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (378:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4067|       |	  /* SET_ENCLOSE_STATUS(node, NST_MEM_IN_ALT_NOT); */
 4068|      0|	}
 4069|  2.06k|	if (IS_ENCLOSE_CALLED(en))
  ------------------
  |  |  147|  2.06k|#define IS_ENCLOSE_CALLED(en)          (((en)->state & NST_CALLED)        != 0)
  |  |  ------------------
  |  |  |  |  136|  2.06k|#define NST_CALLED                (1<<8)
  |  |  ------------------
  |  |  |  Branch (147:40): [True: 0, False: 2.06k]
  |  |  ------------------
  ------------------
 4070|      0|	  state |= IN_CALL;
  ------------------
  |  | 3272|      0|#define IN_CALL         (1<<4)
  ------------------
 4071|  2.06k|	if (IS_ENCLOSE_RECURSION(en))
  ------------------
  |  |  149|  2.06k|#define IS_ENCLOSE_RECURSION(en)       (((en)->state & NST_RECURSION)     != 0)
  |  |  ------------------
  |  |  |  |  135|  2.06k|#define NST_RECURSION             (1<<7)
  |  |  ------------------
  |  |  |  Branch (149:40): [True: 0, False: 2.06k]
  |  |  ------------------
  ------------------
 4072|      0|	  state |= IN_RECCALL;
  ------------------
  |  | 3273|      0|#define IN_RECCALL      (1<<5)
  ------------------
 4073|  2.06k|	else if ((state & IN_RECCALL) != 0)
  ------------------
  |  | 3273|  2.06k|#define IN_RECCALL      (1<<5)
  ------------------
  |  Branch (4073:11): [True: 0, False: 2.06k]
  ------------------
 4074|      0|	  SET_CALL_RECURSION(node);
  ------------------
  |  |  160|      0|#define SET_CALL_RECURSION(node)       (node)->u.call.state |= NST_RECURSION
  |  |  ------------------
  |  |  |  |  135|      0|#define NST_RECURSION             (1<<7)
  |  |  ------------------
  ------------------
 4075|  2.06k|	r = setup_tree(en->target, reg, state, env);
 4076|  2.06k|	break;
 4077|       |
 4078|      0|      case ENCLOSE_STOP_BACKTRACK:
  ------------------
  |  |   96|      0|#define ENCLOSE_STOP_BACKTRACK   (1<<2)
  ------------------
  |  Branch (4078:7): [True: 0, False: 2.47k]
  ------------------
 4079|      0|	{
 4080|      0|	  Node* target = en->target;
 4081|      0|	  r = setup_tree(target, reg, state, env);
 4082|      0|	  if (NTYPE(target) == NT_QTFR) {
  ------------------
  |  |   69|      0|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
              	  if (NTYPE(target) == NT_QTFR) {
  ------------------
  |  |   43|      0|#define NT_QTFR        5
  ------------------
  |  Branch (4082:8): [True: 0, False: 0]
  ------------------
 4083|      0|	    QtfrNode* tqn = NQTFR(target);
  ------------------
  |  |   80|      0|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 4084|      0|	    if (IS_REPEAT_INFINITE(tqn->upper) && tqn->lower <= 1 &&
  ------------------
  |  |  422|      0|#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
  |  |  ------------------
  |  |  |  |  421|      0|#define REPEAT_INFINITE         -1
  |  |  ------------------
  |  |  |  Branch (422:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4084:44): [True: 0, False: 0]
  ------------------
 4085|      0|		tqn->greedy != 0) {  /* (?>a*), a*+ etc... */
  ------------------
  |  Branch (4085:3): [True: 0, False: 0]
  ------------------
 4086|      0|	      int qtype = NTYPE(tqn->target);
  ------------------
  |  |   69|      0|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 4087|      0|	      if (IS_NODE_TYPE_SIMPLE(qtype))
  ------------------
  |  |   66|      0|  ((NTYPE2BIT(type) & (BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE |\
  |  |  ------------------
  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  ------------------
  |  |                 ((NTYPE2BIT(type) & (BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE |\
  |  |  ------------------
  |  |  |  |   53|      0|#define BIT_NT_STR        NTYPE2BIT(NT_STR)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ((NTYPE2BIT(type) & (BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE |\
  |  |  ------------------
  |  |  |  |   54|      0|#define BIT_NT_CCLASS     NTYPE2BIT(NT_CCLASS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ((NTYPE2BIT(type) & (BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE |\
  |  |  ------------------
  |  |  |  |   55|      0|#define BIT_NT_CTYPE      NTYPE2BIT(NT_CTYPE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   67|      0|                       BIT_NT_CANY | BIT_NT_BREF)) != 0)
  |  |  ------------------
  |  |  |  |   56|      0|#define BIT_NT_CANY       NTYPE2BIT(NT_CANY)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                                      BIT_NT_CANY | BIT_NT_BREF)) != 0)
  |  |  ------------------
  |  |  |  |   57|      0|#define BIT_NT_BREF       NTYPE2BIT(NT_BREF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4088|      0|		SET_ENCLOSE_STATUS(node, NST_STOP_BT_SIMPLE_REPEAT);
  ------------------
  |  |  144|      0|#define SET_ENCLOSE_STATUS(node,f)      (node)->u.enclose.state |=  (f)
  ------------------
 4089|      0|	    }
 4090|      0|	  }
 4091|      0|	}
 4092|      0|	break;
 4093|       |
 4094|      0|      case ENCLOSE_CONDITION:
  ------------------
  |  |   97|      0|#define ENCLOSE_CONDITION        (1<<3)
  ------------------
  |  Branch (4094:7): [True: 0, False: 2.47k]
  ------------------
 4095|      0|#ifdef USE_NAMED_GROUP
 4096|      0|	if (! IS_ENCLOSE_NAME_REF(NENCLOSE(node)) &&
  ------------------
  |  |  158|      0|#define IS_ENCLOSE_NAME_REF(en)        (((en)->state & NST_NAME_REF)      != 0)
  |  |  ------------------
  |  |  |  |  139|      0|#define NST_NAME_REF              (1<<11)
  |  |  ------------------
  ------------------
  |  Branch (4096:6): [True: 0, False: 0]
  ------------------
 4097|      0|	    env->num_named > 0 &&
  ------------------
  |  Branch (4097:6): [True: 0, False: 0]
  ------------------
 4098|      0|	    IS_SYNTAX_BV(env->syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) &&
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4099|      0|	    !ONIG_IS_OPTION_ON(env->option, ONIG_OPTION_CAPTURE_GROUP)) {
  ------------------
  |  |  479|      0|#define ONIG_IS_OPTION_ON(options,option)   ((options) & (option))
  ------------------
  |  Branch (4099:6): [True: 0, False: 0]
  ------------------
 4100|      0|	  return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
  ------------------
  |  |  678|      0|#define ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED         -209
  ------------------
 4101|      0|	}
 4102|      0|#endif
 4103|      0|	if (NENCLOSE(node)->regnum > env->num_mem)
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
  |  Branch (4103:6): [True: 0, False: 0]
  ------------------
 4104|      0|	  return ONIGERR_INVALID_BACKREF;
  ------------------
  |  |  677|      0|#define ONIGERR_INVALID_BACKREF                              -208
  ------------------
 4105|      0|	r = setup_tree(NENCLOSE(node)->target, reg, state, env);
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 4106|      0|	break;
 4107|       |
 4108|      0|      case ENCLOSE_ABSENT:
  ------------------
  |  |   98|      0|#define ENCLOSE_ABSENT           (1<<4)
  ------------------
  |  Branch (4108:7): [True: 0, False: 2.47k]
  ------------------
 4109|      0|	r = setup_tree(NENCLOSE(node)->target, reg, state, env);
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 4110|      0|	break;
 4111|  2.47k|      }
 4112|  2.47k|    }
 4113|  2.47k|    break;
 4114|       |
 4115|  11.9k|  case NT_ANCHOR:
  ------------------
  |  |   45|  11.9k|#define NT_ANCHOR      7
  ------------------
  |  Branch (4115:3): [True: 11.9k, False: 59.0k]
  ------------------
 4116|  11.9k|    {
 4117|  11.9k|      AnchorNode* an = NANCHOR(node);
  ------------------
  |  |   82|  11.9k|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 4118|       |
 4119|  11.9k|      switch (an->type) {
  ------------------
  |  Branch (4119:15): [True: 11.9k, False: 0]
  ------------------
 4120|      0|      case ANCHOR_PREC_READ:
  ------------------
  |  |  551|      0|#define ANCHOR_PREC_READ        (1<<10)
  ------------------
  |  Branch (4120:7): [True: 0, False: 11.9k]
  ------------------
 4121|      0|	r = setup_tree(an->target, reg, state, env);
 4122|      0|	break;
 4123|      0|      case ANCHOR_PREC_READ_NOT:
  ------------------
  |  |  552|      0|#define ANCHOR_PREC_READ_NOT    (1<<11)
  ------------------
  |  Branch (4123:7): [True: 0, False: 11.9k]
  ------------------
 4124|      0|	r = setup_tree(an->target, reg, (state | IN_NOT), env);
  ------------------
  |  | 3269|      0|#define IN_NOT          (1<<1)
  ------------------
 4125|      0|	break;
 4126|       |
 4127|       |/* allowed node types in look-behind */
 4128|      0|#define ALLOWED_TYPE_IN_LB  \
 4129|      0|  ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \
 4130|      0|    BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL )
 4131|       |
 4132|      0|#define ALLOWED_ENCLOSE_IN_LB       ( ENCLOSE_MEMORY | ENCLOSE_OPTION )
 4133|      0|#define ALLOWED_ENCLOSE_IN_LB_NOT   ENCLOSE_OPTION
 4134|       |
 4135|      0|#define ALLOWED_ANCHOR_IN_LB \
 4136|      0|( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | \
 4137|      0|  ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION | ANCHOR_KEEP | \
 4138|      0|  ANCHOR_WORD_BOUND | ANCHOR_NOT_WORD_BOUND | \
 4139|      0|  ANCHOR_WORD_BEGIN | ANCHOR_WORD_END )
 4140|      0|#define ALLOWED_ANCHOR_IN_LB_NOT \
 4141|      0|( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | \
 4142|      0|  ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION | ANCHOR_KEEP | \
 4143|      0|  ANCHOR_WORD_BOUND | ANCHOR_NOT_WORD_BOUND | \
 4144|      0|  ANCHOR_WORD_BEGIN | ANCHOR_WORD_END )
 4145|       |
 4146|      0|      case ANCHOR_LOOK_BEHIND:
  ------------------
  |  |  553|      0|#define ANCHOR_LOOK_BEHIND      (1<<12)
  ------------------
  |  Branch (4146:7): [True: 0, False: 11.9k]
  ------------------
 4147|      0|	{
 4148|      0|	  r = check_type_tree(an->target, ALLOWED_TYPE_IN_LB,
  ------------------
  |  | 4129|      0|  ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \
  |  |  ------------------
  |  |  |  |   61|      0|#define BIT_NT_LIST       NTYPE2BIT(NT_LIST)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \
  |  |  ------------------
  |  |  |  |   62|      0|#define BIT_NT_ALT        NTYPE2BIT(NT_ALT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \
  |  |  ------------------
  |  |  |  |   53|      0|#define BIT_NT_STR        NTYPE2BIT(NT_STR)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \
  |  |  ------------------
  |  |  |  |   54|      0|#define BIT_NT_CCLASS     NTYPE2BIT(NT_CCLASS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \
  |  |  ------------------
  |  |  |  |   55|      0|#define BIT_NT_CTYPE      NTYPE2BIT(NT_CTYPE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4130|      0|    BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL )
  |  |  ------------------
  |  |  |  |   56|      0|#define BIT_NT_CANY       NTYPE2BIT(NT_CANY)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL )
  |  |  ------------------
  |  |  |  |   60|      0|#define BIT_NT_ANCHOR     NTYPE2BIT(NT_ANCHOR)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL )
  |  |  ------------------
  |  |  |  |   59|      0|#define BIT_NT_ENCLOSE    NTYPE2BIT(NT_ENCLOSE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL )
  |  |  ------------------
  |  |  |  |   58|      0|#define BIT_NT_QTFR       NTYPE2BIT(NT_QTFR)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL )
  |  |  ------------------
  |  |  |  |   63|      0|#define BIT_NT_CALL       NTYPE2BIT(NT_CALL)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4149|      0|			      ALLOWED_ENCLOSE_IN_LB, ALLOWED_ANCHOR_IN_LB);
  ------------------
  |  | 4132|      0|#define ALLOWED_ENCLOSE_IN_LB       ( ENCLOSE_MEMORY | ENCLOSE_OPTION )
  |  |  ------------------
  |  |  |  |   94|      0|#define ENCLOSE_MEMORY           (1<<0)
  |  |  ------------------
  |  |               #define ALLOWED_ENCLOSE_IN_LB       ( ENCLOSE_MEMORY | ENCLOSE_OPTION )
  |  |  ------------------
  |  |  |  |   95|      0|#define ENCLOSE_OPTION           (1<<1)
  |  |  ------------------
  ------------------
              			      ALLOWED_ENCLOSE_IN_LB, ALLOWED_ANCHOR_IN_LB);
  ------------------
  |  | 4135|      0|#define ALLOWED_ANCHOR_IN_LB \
  |  | 4136|      0|( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | \
  |  |  ------------------
  |  |  |  |  553|      0|#define ANCHOR_LOOK_BEHIND      (1<<12)
  |  |  ------------------
  |  |               ( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | \
  |  |  ------------------
  |  |  |  |  554|      0|#define ANCHOR_LOOK_BEHIND_NOT  (1<<13)
  |  |  ------------------
  |  |               ( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | \
  |  |  ------------------
  |  |  |  |  541|      0|#define ANCHOR_BEGIN_LINE       (1<<1)
  |  |  ------------------
  |  | 4137|      0|  ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION | ANCHOR_KEEP | \
  |  |  ------------------
  |  |  |  |  545|      0|#define ANCHOR_END_LINE         (1<<5)
  |  |  ------------------
  |  |                 ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION | ANCHOR_KEEP | \
  |  |  ------------------
  |  |  |  |  540|      0|#define ANCHOR_BEGIN_BUF        (1<<0)
  |  |  ------------------
  |  |                 ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION | ANCHOR_KEEP | \
  |  |  ------------------
  |  |  |  |  542|      0|#define ANCHOR_BEGIN_POSITION   (1<<2)
  |  |  ------------------
  |  |                 ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION | ANCHOR_KEEP | \
  |  |  ------------------
  |  |  |  |  559|      0|#define ANCHOR_KEEP             (1<<16)
  |  |  ------------------
  |  | 4138|      0|  ANCHOR_WORD_BOUND | ANCHOR_NOT_WORD_BOUND | \
  |  |  ------------------
  |  |  |  |  547|      0|#define ANCHOR_WORD_BOUND       (1<<6)
  |  |  ------------------
  |  |                 ANCHOR_WORD_BOUND | ANCHOR_NOT_WORD_BOUND | \
  |  |  ------------------
  |  |  |  |  548|      0|#define ANCHOR_NOT_WORD_BOUND   (1<<7)
  |  |  ------------------
  |  | 4139|      0|  ANCHOR_WORD_BEGIN | ANCHOR_WORD_END )
  |  |  ------------------
  |  |  |  |  549|      0|#define ANCHOR_WORD_BEGIN       (1<<8)
  |  |  ------------------
  |  |                 ANCHOR_WORD_BEGIN | ANCHOR_WORD_END )
  |  |  ------------------
  |  |  |  |  550|      0|#define ANCHOR_WORD_END         (1<<9)
  |  |  ------------------
  ------------------
 4150|      0|	  if (r < 0) return r;
  ------------------
  |  Branch (4150:8): [True: 0, False: 0]
  ------------------
 4151|      0|	  if (r > 0) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
  ------------------
  |  |  665|      0|#define ONIGERR_INVALID_LOOK_BEHIND_PATTERN                  -122
  ------------------
  |  Branch (4151:8): [True: 0, False: 0]
  ------------------
 4152|      0|	  if (NTYPE(node) != NT_ANCHOR) goto restart;
  ------------------
  |  |   69|      0|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
              	  if (NTYPE(node) != NT_ANCHOR) goto restart;
  ------------------
  |  |   45|      0|#define NT_ANCHOR      7
  ------------------
  |  Branch (4152:8): [True: 0, False: 0]
  ------------------
 4153|      0|	  r = setup_tree(an->target, reg, (state | IN_LOOK_BEHIND), env);
  ------------------
  |  | 3274|      0|#define IN_LOOK_BEHIND  (1<<6)
  ------------------
 4154|      0|	  if (r != 0) return r;
  ------------------
  |  Branch (4154:8): [True: 0, False: 0]
  ------------------
 4155|      0|	  r = setup_look_behind(node, reg, env);
 4156|      0|	}
 4157|      0|	break;
 4158|       |
 4159|      0|      case ANCHOR_LOOK_BEHIND_NOT:
  ------------------
  |  |  554|      0|#define ANCHOR_LOOK_BEHIND_NOT  (1<<13)
  ------------------
  |  Branch (4159:7): [True: 0, False: 11.9k]
  ------------------
 4160|      0|	{
 4161|      0|	  r = check_type_tree(an->target, ALLOWED_TYPE_IN_LB,
  ------------------
  |  | 4129|      0|  ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \
  |  |  ------------------
  |  |  |  |   61|      0|#define BIT_NT_LIST       NTYPE2BIT(NT_LIST)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \
  |  |  ------------------
  |  |  |  |   62|      0|#define BIT_NT_ALT        NTYPE2BIT(NT_ALT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \
  |  |  ------------------
  |  |  |  |   53|      0|#define BIT_NT_STR        NTYPE2BIT(NT_STR)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \
  |  |  ------------------
  |  |  |  |   54|      0|#define BIT_NT_CCLASS     NTYPE2BIT(NT_CCLASS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \
  |  |  ------------------
  |  |  |  |   55|      0|#define BIT_NT_CTYPE      NTYPE2BIT(NT_CTYPE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4130|      0|    BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL )
  |  |  ------------------
  |  |  |  |   56|      0|#define BIT_NT_CANY       NTYPE2BIT(NT_CANY)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL )
  |  |  ------------------
  |  |  |  |   60|      0|#define BIT_NT_ANCHOR     NTYPE2BIT(NT_ANCHOR)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL )
  |  |  ------------------
  |  |  |  |   59|      0|#define BIT_NT_ENCLOSE    NTYPE2BIT(NT_ENCLOSE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL )
  |  |  ------------------
  |  |  |  |   58|      0|#define BIT_NT_QTFR       NTYPE2BIT(NT_QTFR)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL )
  |  |  ------------------
  |  |  |  |   63|      0|#define BIT_NT_CALL       NTYPE2BIT(NT_CALL)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4162|      0|		      ALLOWED_ENCLOSE_IN_LB_NOT, ALLOWED_ANCHOR_IN_LB_NOT);
  ------------------
  |  | 4133|      0|#define ALLOWED_ENCLOSE_IN_LB_NOT   ENCLOSE_OPTION
  |  |  ------------------
  |  |  |  |   95|      0|#define ENCLOSE_OPTION           (1<<1)
  |  |  ------------------
  ------------------
              		      ALLOWED_ENCLOSE_IN_LB_NOT, ALLOWED_ANCHOR_IN_LB_NOT);
  ------------------
  |  | 4140|      0|#define ALLOWED_ANCHOR_IN_LB_NOT \
  |  | 4141|      0|( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | \
  |  |  ------------------
  |  |  |  |  553|      0|#define ANCHOR_LOOK_BEHIND      (1<<12)
  |  |  ------------------
  |  |               ( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | \
  |  |  ------------------
  |  |  |  |  554|      0|#define ANCHOR_LOOK_BEHIND_NOT  (1<<13)
  |  |  ------------------
  |  |               ( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | \
  |  |  ------------------
  |  |  |  |  541|      0|#define ANCHOR_BEGIN_LINE       (1<<1)
  |  |  ------------------
  |  | 4142|      0|  ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION | ANCHOR_KEEP | \
  |  |  ------------------
  |  |  |  |  545|      0|#define ANCHOR_END_LINE         (1<<5)
  |  |  ------------------
  |  |                 ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION | ANCHOR_KEEP | \
  |  |  ------------------
  |  |  |  |  540|      0|#define ANCHOR_BEGIN_BUF        (1<<0)
  |  |  ------------------
  |  |                 ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION | ANCHOR_KEEP | \
  |  |  ------------------
  |  |  |  |  542|      0|#define ANCHOR_BEGIN_POSITION   (1<<2)
  |  |  ------------------
  |  |                 ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION | ANCHOR_KEEP | \
  |  |  ------------------
  |  |  |  |  559|      0|#define ANCHOR_KEEP             (1<<16)
  |  |  ------------------
  |  | 4143|      0|  ANCHOR_WORD_BOUND | ANCHOR_NOT_WORD_BOUND | \
  |  |  ------------------
  |  |  |  |  547|      0|#define ANCHOR_WORD_BOUND       (1<<6)
  |  |  ------------------
  |  |                 ANCHOR_WORD_BOUND | ANCHOR_NOT_WORD_BOUND | \
  |  |  ------------------
  |  |  |  |  548|      0|#define ANCHOR_NOT_WORD_BOUND   (1<<7)
  |  |  ------------------
  |  | 4144|      0|  ANCHOR_WORD_BEGIN | ANCHOR_WORD_END )
  |  |  ------------------
  |  |  |  |  549|      0|#define ANCHOR_WORD_BEGIN       (1<<8)
  |  |  ------------------
  |  |                 ANCHOR_WORD_BEGIN | ANCHOR_WORD_END )
  |  |  ------------------
  |  |  |  |  550|      0|#define ANCHOR_WORD_END         (1<<9)
  |  |  ------------------
  ------------------
 4163|      0|	  if (r < 0) return r;
  ------------------
  |  Branch (4163:8): [True: 0, False: 0]
  ------------------
 4164|      0|	  if (r > 0) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
  ------------------
  |  |  665|      0|#define ONIGERR_INVALID_LOOK_BEHIND_PATTERN                  -122
  ------------------
  |  Branch (4164:8): [True: 0, False: 0]
  ------------------
 4165|      0|	  if (NTYPE(node) != NT_ANCHOR) goto restart;
  ------------------
  |  |   69|      0|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
              	  if (NTYPE(node) != NT_ANCHOR) goto restart;
  ------------------
  |  |   45|      0|#define NT_ANCHOR      7
  ------------------
  |  Branch (4165:8): [True: 0, False: 0]
  ------------------
 4166|      0|	  r = setup_tree(an->target, reg, (state | IN_NOT | IN_LOOK_BEHIND),
  ------------------
  |  | 3269|      0|#define IN_NOT          (1<<1)
  ------------------
              	  r = setup_tree(an->target, reg, (state | IN_NOT | IN_LOOK_BEHIND),
  ------------------
  |  | 3274|      0|#define IN_LOOK_BEHIND  (1<<6)
  ------------------
 4167|      0|			 env);
 4168|      0|	  if (r != 0) return r;
  ------------------
  |  Branch (4168:8): [True: 0, False: 0]
  ------------------
 4169|      0|	  r = setup_look_behind(node, reg, env);
 4170|      0|	}
 4171|      0|	break;
 4172|  11.9k|      }
 4173|  11.9k|    }
 4174|  11.9k|    break;
 4175|       |
 4176|  11.9k|  default:
  ------------------
  |  Branch (4176:3): [True: 0, False: 71.0k]
  ------------------
 4177|      0|    break;
 4178|  71.0k|  }
 4179|       |
 4180|  71.0k|  return r;
 4181|  71.0k|}
regcomp.c:next_setup:
 3333|  30.9k|{
 3334|  30.9k|  int type;
 3335|       |
 3336|  33.0k| retry:
 3337|  33.0k|  type = NTYPE(node);
  ------------------
  |  |   69|  33.0k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 3338|  33.0k|  if (type == NT_QTFR) {
  ------------------
  |  |   43|  33.0k|#define NT_QTFR        5
  ------------------
  |  Branch (3338:7): [True: 11.1k, False: 21.8k]
  ------------------
 3339|  11.1k|    QtfrNode* qn = NQTFR(node);
  ------------------
  |  |   80|  11.1k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 3340|  11.1k|    if (qn->greedy && IS_REPEAT_INFINITE(qn->upper)) {
  ------------------
  |  |  422|  10.7k|#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
  |  |  ------------------
  |  |  |  |  421|  10.7k|#define REPEAT_INFINITE         -1
  |  |  ------------------
  |  |  |  Branch (422:33): [True: 10.3k, False: 413]
  |  |  ------------------
  ------------------
  |  Branch (3340:9): [True: 10.7k, False: 413]
  ------------------
 3341|  10.3k|#ifdef USE_QTFR_PEEK_NEXT
 3342|  10.3k|      Node* n = get_head_value_node(next_node, 1, reg);
 3343|       |      /* '\0': for UTF-16BE etc... */
 3344|  10.3k|      if (IS_NOT_NULL(n) && NSTR(n)->s[0] != '\0') {
  ------------------
  |  |  312|  20.6k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 6.19k, False: 4.13k]
  |  |  ------------------
  ------------------
                    if (IS_NOT_NULL(n) && NSTR(n)->s[0] != '\0') {
  ------------------
  |  |   76|  6.19k|#define NSTR(node)         (&((node)->u.str))
  ------------------
  |  Branch (3344:29): [True: 6.19k, False: 0]
  ------------------
 3345|  6.19k|	qn->next_head_exact = n;
 3346|  6.19k|      }
 3347|  10.3k|#endif
 3348|       |      /* automatic possessification a*b ==> (?>a*)b */
 3349|  10.3k|      if (qn->lower <= 1) {
  ------------------
  |  Branch (3349:11): [True: 10.3k, False: 0]
  ------------------
 3350|  10.3k|	int ttype = NTYPE(qn->target);
  ------------------
  |  |   69|  10.3k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 3351|  10.3k|	if (IS_NODE_TYPE_SIMPLE(ttype)) {
  ------------------
  |  |   66|  10.3k|  ((NTYPE2BIT(type) & (BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE |\
  |  |  ------------------
  |  |  |  |   51|  10.3k|#define NTYPE2BIT(type)      (1<<(type))
  |  |  ------------------
  |  |                 ((NTYPE2BIT(type) & (BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE |\
  |  |  ------------------
  |  |  |  |   53|  10.3k|#define BIT_NT_STR        NTYPE2BIT(NT_STR)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  10.3k|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ((NTYPE2BIT(type) & (BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE |\
  |  |  ------------------
  |  |  |  |   54|  10.3k|#define BIT_NT_CCLASS     NTYPE2BIT(NT_CCLASS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  10.3k|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ((NTYPE2BIT(type) & (BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE |\
  |  |  ------------------
  |  |  |  |   55|  10.3k|#define BIT_NT_CTYPE      NTYPE2BIT(NT_CTYPE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  10.3k|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (66:3): [True: 9.49k, False: 826]
  |  |  ------------------
  |  |   67|  10.3k|                       BIT_NT_CANY | BIT_NT_BREF)) != 0)
  |  |  ------------------
  |  |  |  |   56|  10.3k|#define BIT_NT_CANY       NTYPE2BIT(NT_CANY)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  10.3k|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                                      BIT_NT_CANY | BIT_NT_BREF)) != 0)
  |  |  ------------------
  |  |  |  |   57|  10.3k|#define BIT_NT_BREF       NTYPE2BIT(NT_BREF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  10.3k|#define NTYPE2BIT(type)      (1<<(type))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3352|  9.49k|	  Node *x, *y;
 3353|  9.49k|	  x = get_head_value_node(qn->target, 0, reg);
 3354|  9.49k|	  if (IS_NOT_NULL(x)) {
  ------------------
  |  |  312|  9.49k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 8.26k, False: 1.23k]
  |  |  ------------------
  ------------------
 3355|  8.26k|	    y = get_head_value_node(next_node,  0, reg);
 3356|  8.26k|	    if (IS_NOT_NULL(y) && is_not_included(x, y, reg)) {
  ------------------
  |  |  312|  16.5k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 5.36k, False: 2.89k]
  |  |  ------------------
  ------------------
  |  Branch (3356:28): [True: 5.36k, False: 0]
  ------------------
 3357|  5.36k|	      Node* en = onig_node_new_enclose(ENCLOSE_STOP_BACKTRACK);
  ------------------
  |  |   96|  5.36k|#define ENCLOSE_STOP_BACKTRACK   (1<<2)
  ------------------
 3358|  5.36k|	      CHECK_NULL_RETURN_MEMERR(en);
  ------------------
  |  |  314|  5.36k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  5.36k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 5.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 3359|  5.36k|	      SET_ENCLOSE_STATUS(en, NST_STOP_BT_SIMPLE_REPEAT);
  ------------------
  |  |  144|  5.36k|#define SET_ENCLOSE_STATUS(node,f)      (node)->u.enclose.state |=  (f)
  ------------------
 3360|  5.36k|	      swap_node(node, en);
 3361|  5.36k|	      NENCLOSE(node)->target = en;
  ------------------
  |  |   81|  5.36k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 3362|  5.36k|	    }
 3363|  8.26k|	  }
 3364|  9.49k|	}
 3365|  10.3k|      }
 3366|  10.3k|    }
 3367|  11.1k|  }
 3368|  21.8k|  else if (type == NT_ENCLOSE) {
  ------------------
  |  |   44|  21.8k|#define NT_ENCLOSE     6
  ------------------
  |  Branch (3368:12): [True: 2.47k, False: 19.4k]
  ------------------
 3369|  2.47k|    EncloseNode* en = NENCLOSE(node);
  ------------------
  |  |   81|  2.47k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 3370|  2.47k|    if (en->type == ENCLOSE_MEMORY) {
  ------------------
  |  |   94|  2.47k|#define ENCLOSE_MEMORY           (1<<0)
  ------------------
  |  Branch (3370:9): [True: 2.06k, False: 413]
  ------------------
 3371|  2.06k|      node = en->target;
 3372|  2.06k|      goto retry;
 3373|  2.06k|    }
 3374|  2.47k|  }
 3375|  30.9k|  return 0;
 3376|  33.0k|}
regcomp.c:get_head_value_node:
 2746|  28.9k|{
 2747|  28.9k|  Node* n = NULL_NODE;
  ------------------
  |  |  283|  28.9k|#define NULL_NODE  ((Node* )0)
  ------------------
 2748|       |
 2749|  28.9k|  switch (NTYPE(node)) {
  ------------------
  |  |   69|  28.9k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 2750|      0|  case NT_BREF:
  ------------------
  |  |   42|      0|#define NT_BREF        4
  ------------------
  |  Branch (2750:3): [True: 0, False: 28.9k]
  ------------------
 2751|    826|  case NT_ALT:
  ------------------
  |  |   47|    826|#define NT_ALT         9
  ------------------
  |  Branch (2751:3): [True: 826, False: 28.0k]
  ------------------
 2752|  2.89k|  case NT_CANY:
  ------------------
  |  |   41|  2.89k|#define NT_CANY        3
  ------------------
  |  Branch (2752:3): [True: 2.06k, False: 26.8k]
  ------------------
 2753|  2.89k|#ifdef USE_SUBEXP_CALL
 2754|  2.89k|  case NT_CALL:
  ------------------
  |  |   48|  2.89k|#define NT_CALL       10
  ------------------
  |  Branch (2754:3): [True: 0, False: 28.9k]
  ------------------
 2755|  2.89k|#endif
 2756|  2.89k|    break;
 2757|       |
 2758|      0|  case NT_CTYPE:
  ------------------
  |  |   40|      0|#define NT_CTYPE       2
  ------------------
  |  Branch (2758:3): [True: 0, False: 28.9k]
  ------------------
 2759|  9.08k|  case NT_CCLASS:
  ------------------
  |  |   39|  9.08k|#define NT_CCLASS      1
  ------------------
  |  Branch (2759:3): [True: 9.08k, False: 19.8k]
  ------------------
 2760|  9.08k|    if (exact == 0) {
  ------------------
  |  Branch (2760:9): [True: 8.26k, False: 826]
  ------------------
 2761|  8.26k|      n = node;
 2762|  8.26k|    }
 2763|  9.08k|    break;
 2764|       |
 2765|      0|  case NT_LIST:
  ------------------
  |  |   46|      0|#define NT_LIST        8
  ------------------
  |  Branch (2765:3): [True: 0, False: 28.9k]
  ------------------
 2766|      0|    n = get_head_value_node(NCAR(node), exact, reg);
  ------------------
  |  |   86|      0|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 2767|      0|    break;
 2768|       |
 2769|  11.5k|  case NT_STR:
  ------------------
  |  |   38|  11.5k|#define NT_STR         0
  ------------------
  |  Branch (2769:3): [True: 11.5k, False: 17.3k]
  ------------------
 2770|  11.5k|    {
 2771|  11.5k|      StrNode* sn = NSTR(node);
  ------------------
  |  |   76|  11.5k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 2772|       |
 2773|  11.5k|      if (sn->end <= sn->s)
  ------------------
  |  Branch (2773:11): [True: 0, False: 11.5k]
  ------------------
 2774|      0|	break;
 2775|       |
 2776|  11.5k|      if (exact == 0 ||
  ------------------
  |  Branch (2776:11): [True: 5.36k, False: 6.19k]
  ------------------
 2777|  11.5k|	  NSTRING_IS_RAW(node) || !IS_IGNORECASE(reg->options)) {
  ------------------
  |  |  114|  17.7k|#define NSTRING_IS_RAW(node)          (((node)->u.str.flag & NSTR_RAW)   != 0)
  |  |  ------------------
  |  |  |  |  104|  6.19k|#define NSTR_RAW                (1<<0) /* by backslashed number */
  |  |  ------------------
  |  |  |  Branch (114:39): [True: 0, False: 6.19k]
  |  |  ------------------
  ------------------
              	  NSTRING_IS_RAW(node) || !IS_IGNORECASE(reg->options)) {
  ------------------
  |  |  396|  6.19k|#define IS_IGNORECASE(option)     ((option) & ONIG_OPTION_IGNORECASE)
  |  |  ------------------
  |  |  |  |  454|  6.19k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  ------------------
  ------------------
  |  Branch (2777:28): [True: 6.19k, False: 0]
  ------------------
 2778|  11.5k|	n = node;
 2779|  11.5k|      }
 2780|  11.5k|    }
 2781|      0|    break;
 2782|       |
 2783|  4.13k|  case NT_QTFR:
  ------------------
  |  |   43|  4.13k|#define NT_QTFR        5
  ------------------
  |  Branch (2783:3): [True: 4.13k, False: 24.7k]
  ------------------
 2784|  4.13k|    {
 2785|  4.13k|      QtfrNode* qn = NQTFR(node);
  ------------------
  |  |   80|  4.13k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 2786|  4.13k|      if (qn->lower > 0) {
  ------------------
  |  Branch (2786:11): [True: 826, False: 3.30k]
  ------------------
 2787|       |#ifdef USE_OP_PUSH_OR_JUMP_EXACT
 2788|       |	if (IS_NOT_NULL(qn->head_exact))
 2789|       |	  n = qn->head_exact;
 2790|       |	else
 2791|       |#endif
 2792|    826|	  n = get_head_value_node(qn->target, exact, reg);
 2793|    826|      }
 2794|  4.13k|    }
 2795|  4.13k|    break;
 2796|       |
 2797|      0|  case NT_ENCLOSE:
  ------------------
  |  |   44|      0|#define NT_ENCLOSE     6
  ------------------
  |  Branch (2797:3): [True: 0, False: 28.9k]
  ------------------
 2798|      0|    {
 2799|      0|      EncloseNode* en = NENCLOSE(node);
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 2800|      0|      switch (en->type) {
  ------------------
  |  Branch (2800:15): [True: 0, False: 0]
  ------------------
 2801|      0|      case ENCLOSE_OPTION:
  ------------------
  |  |   95|      0|#define ENCLOSE_OPTION           (1<<1)
  ------------------
  |  Branch (2801:7): [True: 0, False: 0]
  ------------------
 2802|      0|	{
 2803|      0|	  OnigOptionType options = reg->options;
 2804|       |
 2805|      0|	  reg->options = NENCLOSE(node)->option;
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 2806|      0|	  n = get_head_value_node(NENCLOSE(node)->target, exact, reg);
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 2807|      0|	  reg->options = options;
 2808|      0|	}
 2809|      0|	break;
 2810|       |
 2811|      0|      case ENCLOSE_MEMORY:
  ------------------
  |  |   94|      0|#define ENCLOSE_MEMORY           (1<<0)
  ------------------
  |  Branch (2811:7): [True: 0, False: 0]
  ------------------
 2812|      0|      case ENCLOSE_STOP_BACKTRACK:
  ------------------
  |  |   96|      0|#define ENCLOSE_STOP_BACKTRACK   (1<<2)
  ------------------
  |  Branch (2812:7): [True: 0, False: 0]
  ------------------
 2813|      0|      case ENCLOSE_CONDITION:
  ------------------
  |  |   97|      0|#define ENCLOSE_CONDITION        (1<<3)
  ------------------
  |  Branch (2813:7): [True: 0, False: 0]
  ------------------
 2814|      0|	n = get_head_value_node(en->target, exact, reg);
 2815|      0|	break;
 2816|       |
 2817|      0|      case ENCLOSE_ABSENT:
  ------------------
  |  |   98|      0|#define ENCLOSE_ABSENT           (1<<4)
  ------------------
  |  Branch (2817:7): [True: 0, False: 0]
  ------------------
 2818|      0|	break;
 2819|      0|      }
 2820|      0|    }
 2821|      0|    break;
 2822|       |
 2823|  1.23k|  case NT_ANCHOR:
  ------------------
  |  |   45|  1.23k|#define NT_ANCHOR      7
  ------------------
  |  Branch (2823:3): [True: 1.23k, False: 27.6k]
  ------------------
 2824|  1.23k|    if (NANCHOR(node)->type == ANCHOR_PREC_READ)
  ------------------
  |  |   82|  1.23k|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
                  if (NANCHOR(node)->type == ANCHOR_PREC_READ)
  ------------------
  |  |  551|  1.23k|#define ANCHOR_PREC_READ        (1<<10)
  ------------------
  |  Branch (2824:9): [True: 0, False: 1.23k]
  ------------------
 2825|      0|      n = get_head_value_node(NANCHOR(node)->target, exact, reg);
  ------------------
  |  |   82|      0|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 2826|  1.23k|    break;
 2827|       |
 2828|      0|  default:
  ------------------
  |  Branch (2828:3): [True: 0, False: 28.9k]
  ------------------
 2829|      0|    break;
 2830|  28.9k|  }
 2831|       |
 2832|  28.9k|  return n;
 2833|  28.9k|}
regcomp.c:is_not_included:
 2551|  5.36k|{
 2552|  5.36k|  int i;
 2553|  5.36k|  OnigDistance len;
 2554|  5.36k|  OnigCodePoint code;
 2555|  5.36k|  UChar *p;
  ------------------
  |  |   76|  5.36k|# define UChar OnigUChar
  ------------------
 2556|  5.36k|  int ytype;
 2557|       |
 2558|  10.7k| retry:
 2559|  10.7k|  ytype = NTYPE(y);
  ------------------
  |  |   69|  10.7k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 2560|  10.7k|  switch (NTYPE(x)) {
  ------------------
  |  |   69|  10.7k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 2561|      0|  case NT_CTYPE:
  ------------------
  |  |   40|      0|#define NT_CTYPE       2
  ------------------
  |  Branch (2561:3): [True: 0, False: 10.7k]
  ------------------
 2562|      0|    {
 2563|      0|      switch (ytype) {
 2564|      0|      case NT_CTYPE:
  ------------------
  |  |   40|      0|#define NT_CTYPE       2
  ------------------
  |  Branch (2564:7): [True: 0, False: 0]
  ------------------
 2565|      0|	if (NCTYPE(y)->ctype == NCTYPE(x)->ctype &&
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
              	if (NCTYPE(y)->ctype == NCTYPE(x)->ctype &&
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
  |  Branch (2565:6): [True: 0, False: 0]
  ------------------
 2566|      0|	    NCTYPE(y)->not   != NCTYPE(x)->not &&
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
              	    NCTYPE(y)->not   != NCTYPE(x)->not &&
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
  |  Branch (2566:6): [True: 0, False: 0]
  ------------------
 2567|      0|	    NCTYPE(y)->ascii_range == NCTYPE(x)->ascii_range)
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
              	    NCTYPE(y)->ascii_range == NCTYPE(x)->ascii_range)
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
  |  Branch (2567:6): [True: 0, False: 0]
  ------------------
 2568|      0|	  return 1;
 2569|      0|	else
 2570|      0|	  return 0;
 2571|      0|	break;
 2572|       |
 2573|      0|      case NT_CCLASS:
  ------------------
  |  |   39|      0|#define NT_CCLASS      1
  ------------------
  |  Branch (2573:7): [True: 0, False: 0]
  ------------------
 2574|  5.36k|      swap:
 2575|  5.36k|	{
 2576|  5.36k|	  Node* tmp;
 2577|  5.36k|	  tmp = x; x = y; y = tmp;
 2578|  5.36k|	  goto retry;
 2579|      0|	}
 2580|      0|	break;
 2581|       |
 2582|      0|      case NT_STR:
  ------------------
  |  |   38|      0|#define NT_STR         0
  ------------------
  |  Branch (2582:7): [True: 0, False: 0]
  ------------------
 2583|      0|	goto swap;
 2584|      0|	break;
 2585|       |
 2586|      0|      default:
  ------------------
  |  Branch (2586:7): [True: 0, False: 0]
  ------------------
 2587|      0|	break;
 2588|      0|      }
 2589|      0|    }
 2590|      0|    break;
 2591|       |
 2592|  5.36k|  case NT_CCLASS:
  ------------------
  |  |   39|  5.36k|#define NT_CCLASS      1
  ------------------
  |  Branch (2592:3): [True: 5.36k, False: 5.36k]
  ------------------
 2593|  5.36k|    {
 2594|  5.36k|      CClassNode* xc = NCCLASS(x);
  ------------------
  |  |   77|  5.36k|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 2595|  5.36k|      switch (ytype) {
 2596|      0|      case NT_CTYPE:
  ------------------
  |  |   40|      0|#define NT_CTYPE       2
  ------------------
  |  Branch (2596:7): [True: 0, False: 5.36k]
  ------------------
 2597|      0|	switch (NCTYPE(y)->ctype) {
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
 2598|      0|	case ONIGENC_CTYPE_WORD:
  ------------------
  |  |  306|      0|#define ONIGENC_CTYPE_WORD     12
  ------------------
  |  Branch (2598:2): [True: 0, False: 0]
  ------------------
 2599|      0|	  if (NCTYPE(y)->not == 0) {
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
  |  Branch (2599:8): [True: 0, False: 0]
  ------------------
 2600|      0|	    if (IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) {
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	    if (IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) {
  ------------------
  |  |  809|      0|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|      0|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2600:31): [True: 0, False: 0]
  ------------------
 2601|      0|	      for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
  ------------------
  |  |  426|      0|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (2601:20): [True: 0, False: 0]
  ------------------
 2602|      0|		if (BITSET_AT(xc->bs, i)) {
  ------------------
  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2603|      0|		  if (NCTYPE(y)->ascii_range) {
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
  |  Branch (2603:9): [True: 0, False: 0]
  ------------------
 2604|      0|		    if (IS_CODE_SB_WORD(reg->enc, i)) return 0;
  ------------------
  |  |  891|      0|  (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code))
  |  |  ------------------
  |  |  |  |  321|      0|#define ONIGENC_IS_CODE_ASCII(code)       ((code) < 128)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code))
  |  |  ------------------
  |  |  |  |  404|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2605|      0|		  }
 2606|      0|		  else {
 2607|      0|		    if (ONIGENC_IS_CODE_WORD(reg->enc, i)) return 0;
  ------------------
  |  |  404|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2608|      0|		  }
 2609|      0|		}
 2610|      0|	      }
 2611|      0|	      return 1;
 2612|      0|	    }
 2613|      0|	    return 0;
 2614|      0|	  }
 2615|      0|	  else {
 2616|      0|	    if (IS_NOT_NULL(xc->mbuf)) return 0;
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2617|      0|	    for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
  ------------------
  |  |  426|      0|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (2617:18): [True: 0, False: 0]
  ------------------
 2618|      0|	      int is_word;
 2619|      0|	      if (NCTYPE(y)->ascii_range)
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
  |  Branch (2619:12): [True: 0, False: 0]
  ------------------
 2620|      0|		is_word = IS_CODE_SB_WORD(reg->enc, i);
  ------------------
  |  |  891|      0|  (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code))
  |  |  ------------------
  |  |  |  |  321|      0|#define ONIGENC_IS_CODE_ASCII(code)       ((code) < 128)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code))
  |  |  ------------------
  |  |  |  |  404|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2621|      0|	      else
 2622|      0|		is_word = ONIGENC_IS_CODE_WORD(reg->enc, i);
  ------------------
  |  |  404|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  ------------------
  ------------------
 2623|      0|	      if (! is_word) {
  ------------------
  |  Branch (2623:12): [True: 0, False: 0]
  ------------------
 2624|      0|		if (!IS_NCCLASS_NOT(xc)) {
  ------------------
  |  |  809|      0|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|      0|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2624:7): [True: 0, False: 0]
  ------------------
 2625|      0|		  if (BITSET_AT(xc->bs, i))
  ------------------
  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2626|      0|		    return 0;
 2627|      0|		}
 2628|      0|		else {
 2629|      0|		  if (! BITSET_AT(xc->bs, i))
  ------------------
  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2629:9): [True: 0, False: 0]
  ------------------
 2630|      0|		    return 0;
 2631|      0|		}
 2632|      0|	      }
 2633|      0|	    }
 2634|      0|	    return 1;
 2635|      0|	  }
 2636|      0|	  break;
 2637|       |
 2638|      0|	default:
  ------------------
  |  Branch (2638:2): [True: 0, False: 0]
  ------------------
 2639|      0|	  break;
 2640|      0|	}
 2641|      0|	break;
 2642|       |
 2643|      0|      case NT_CCLASS:
  ------------------
  |  |   39|      0|#define NT_CCLASS      1
  ------------------
  |  Branch (2643:7): [True: 0, False: 5.36k]
  ------------------
 2644|      0|	{
 2645|      0|	  int v;
 2646|      0|	  CClassNode* yc = NCCLASS(y);
  ------------------
  |  |   77|      0|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 2647|       |
 2648|      0|	  for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
  ------------------
  |  |  426|      0|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (2648:16): [True: 0, False: 0]
  ------------------
 2649|      0|	    v = BITSET_AT(xc->bs, i);
  ------------------
  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2650|      0|	    if ((v != 0 && !IS_NCCLASS_NOT(xc)) ||
  ------------------
  |  |  809|      0|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|      0|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2650:11): [True: 0, False: 0]
  |  Branch (2650:21): [True: 0, False: 0]
  ------------------
 2651|      0|		(v == 0 && IS_NCCLASS_NOT(xc))) {
  ------------------
  |  |  809|      0|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|      0|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (802:37): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2651:4): [True: 0, False: 0]
  ------------------
 2652|      0|	      v = BITSET_AT(yc->bs, i);
  ------------------
  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2653|      0|	      if ((v != 0 && !IS_NCCLASS_NOT(yc)) ||
  ------------------
  |  |  809|      0|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|      0|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2653:13): [True: 0, False: 0]
  |  Branch (2653:23): [True: 0, False: 0]
  ------------------
 2654|      0|		  (v == 0 && IS_NCCLASS_NOT(yc)))
  ------------------
  |  |  809|      0|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|      0|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (802:37): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2654:6): [True: 0, False: 0]
  ------------------
 2655|      0|		return 0;
 2656|      0|	    }
 2657|      0|	  }
 2658|      0|	  if ((IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) ||
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	  if ((IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) ||
  ------------------
  |  |  809|      0|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|      0|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2658:30): [True: 0, False: 0]
  ------------------
 2659|      0|	      (IS_NULL(yc->mbuf) && !IS_NCCLASS_NOT(yc)))
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	      (IS_NULL(yc->mbuf) && !IS_NCCLASS_NOT(yc)))
  ------------------
  |  |  809|      0|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|      0|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2659:30): [True: 0, False: 0]
  ------------------
 2660|      0|	    return 1;
 2661|      0|	  return 0;
 2662|      0|	}
 2663|      0|	break;
 2664|       |
 2665|  5.36k|      case NT_STR:
  ------------------
  |  |   38|  5.36k|#define NT_STR         0
  ------------------
  |  Branch (2665:7): [True: 5.36k, False: 0]
  ------------------
 2666|  5.36k|	goto swap;
 2667|      0|	break;
 2668|       |
 2669|      0|      default:
  ------------------
  |  Branch (2669:7): [True: 0, False: 5.36k]
  ------------------
 2670|      0|	break;
 2671|  5.36k|      }
 2672|  5.36k|    }
 2673|      0|    break;
 2674|       |
 2675|  5.36k|  case NT_STR:
  ------------------
  |  |   38|  5.36k|#define NT_STR         0
  ------------------
  |  Branch (2675:3): [True: 5.36k, False: 5.36k]
  ------------------
 2676|  5.36k|    {
 2677|  5.36k|      StrNode* xs = NSTR(x);
  ------------------
  |  |   76|  5.36k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 2678|  5.36k|      if (NSTRING_LEN(x) == 0)
  ------------------
  |  |  108|  5.36k|#define NSTRING_LEN(node) (OnigDistance )((node)->u.str.end - (node)->u.str.s)
  ------------------
  |  Branch (2678:11): [True: 0, False: 5.36k]
  ------------------
 2679|      0|	break;
 2680|       |
 2681|  5.36k|      switch (ytype) {
 2682|      0|      case NT_CTYPE:
  ------------------
  |  |   40|      0|#define NT_CTYPE       2
  ------------------
  |  Branch (2682:7): [True: 0, False: 5.36k]
  ------------------
 2683|      0|	switch (NCTYPE(y)->ctype) {
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
 2684|      0|	case ONIGENC_CTYPE_WORD:
  ------------------
  |  |  306|      0|#define ONIGENC_CTYPE_WORD     12
  ------------------
  |  Branch (2684:2): [True: 0, False: 0]
  ------------------
 2685|      0|	  if (NCTYPE(y)->ascii_range) {
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
  |  Branch (2685:8): [True: 0, False: 0]
  ------------------
 2686|      0|	    if (ONIGENC_IS_MBC_ASCII_WORD(reg->enc, xs->s, xs->end))
  ------------------
  |  |  325|      0|   onigenc_ascii_is_code_ctype( \
  |  |  ------------------
  |  |  |  Branch (325:4): [True: 0, False: 0]
  |  |  ------------------
  |  |  326|      0|	ONIGENC_MBC_TO_CODE(enc,s,end),ONIGENC_CTYPE_WORD,enc)
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |               	ONIGENC_MBC_TO_CODE(enc,s,end),ONIGENC_CTYPE_WORD,enc)
  |  |  ------------------
  |  |  |  |  306|      0|#define ONIGENC_CTYPE_WORD     12
  |  |  ------------------
  ------------------
 2687|      0|	      return NCTYPE(y)->not;
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
 2688|      0|	    else
 2689|      0|	      return !(NCTYPE(y)->not);
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
 2690|      0|	  }
 2691|      0|	  else {
 2692|      0|	    if (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end))
  ------------------
  |  |  323|      0|   ONIGENC_IS_CODE_WORD(enc,ONIGENC_MBC_TO_CODE(enc,s,end))
  |  |  ------------------
  |  |  |  |  404|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2693|      0|	      return NCTYPE(y)->not;
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
 2694|      0|	    else
 2695|      0|	      return !(NCTYPE(y)->not);
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
 2696|      0|	  }
 2697|      0|	  break;
 2698|      0|	default:
  ------------------
  |  Branch (2698:2): [True: 0, False: 0]
  ------------------
 2699|      0|	  break;
 2700|      0|	}
 2701|      0|	break;
 2702|       |
 2703|  5.36k|      case NT_CCLASS:
  ------------------
  |  |   39|  5.36k|#define NT_CCLASS      1
  ------------------
  |  Branch (2703:7): [True: 5.36k, False: 0]
  ------------------
 2704|  5.36k|	{
 2705|  5.36k|	  CClassNode* cc = NCCLASS(y);
  ------------------
  |  |   77|  5.36k|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 2706|       |
 2707|  5.36k|	  code = ONIGENC_MBC_TO_CODE(reg->enc, xs->s,
  ------------------
  |  |  369|  5.36k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  ------------------
 2708|  5.36k|				     xs->s + ONIGENC_MBC_MAXLEN(reg->enc));
 2709|  5.36k|	  return (onig_is_code_in_cc(reg->enc, code, cc) != 0 ? 0 : 1);
  ------------------
  |  Branch (2709:12): [True: 0, False: 5.36k]
  ------------------
 2710|      0|	}
 2711|      0|	break;
 2712|       |
 2713|      0|      case NT_STR:
  ------------------
  |  |   38|      0|#define NT_STR         0
  ------------------
  |  Branch (2713:7): [True: 0, False: 5.36k]
  ------------------
 2714|      0|	{
 2715|      0|	  UChar *q;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 2716|      0|	  StrNode* ys = NSTR(y);
  ------------------
  |  |   76|      0|#define NSTR(node)         (&((node)->u.str))
  ------------------
 2717|      0|	  len = NSTRING_LEN(x);
  ------------------
  |  |  108|      0|#define NSTRING_LEN(node) (OnigDistance )((node)->u.str.end - (node)->u.str.s)
  ------------------
 2718|      0|	  if (len > NSTRING_LEN(y)) len = NSTRING_LEN(y);
  ------------------
  |  |  108|      0|#define NSTRING_LEN(node) (OnigDistance )((node)->u.str.end - (node)->u.str.s)
  ------------------
              	  if (len > NSTRING_LEN(y)) len = NSTRING_LEN(y);
  ------------------
  |  |  108|      0|#define NSTRING_LEN(node) (OnigDistance )((node)->u.str.end - (node)->u.str.s)
  ------------------
  |  Branch (2718:8): [True: 0, False: 0]
  ------------------
 2719|      0|	  if (NSTRING_IS_AMBIG(x) || NSTRING_IS_AMBIG(y)) {
  ------------------
  |  |  115|      0|#define NSTRING_IS_AMBIG(node)        (((node)->u.str.flag & NSTR_AMBIG) != 0)
  |  |  ------------------
  |  |  |  |  105|      0|#define NSTR_AMBIG              (1<<1)
  |  |  ------------------
  |  |  |  Branch (115:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	  if (NSTRING_IS_AMBIG(x) || NSTRING_IS_AMBIG(y)) {
  ------------------
  |  |  115|      0|#define NSTRING_IS_AMBIG(node)        (((node)->u.str.flag & NSTR_AMBIG) != 0)
  |  |  ------------------
  |  |  |  |  105|      0|#define NSTR_AMBIG              (1<<1)
  |  |  ------------------
  |  |  |  Branch (115:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2720|       |	    /* tiny version */
 2721|      0|	    return 0;
 2722|      0|	  }
 2723|      0|	  else {
 2724|      0|	    for (i = 0, p = ys->s, q = xs->s; (OnigDistance )i < len; i++, p++, q++) {
  ------------------
  |  Branch (2724:40): [True: 0, False: 0]
  ------------------
 2725|      0|	      if (*p != *q) return 1;
  ------------------
  |  Branch (2725:12): [True: 0, False: 0]
  ------------------
 2726|      0|	    }
 2727|      0|	  }
 2728|      0|	}
 2729|      0|	break;
 2730|       |
 2731|      0|      default:
  ------------------
  |  Branch (2731:7): [True: 0, False: 5.36k]
  ------------------
 2732|      0|	break;
 2733|  5.36k|      }
 2734|  5.36k|    }
 2735|      0|    break;
 2736|       |
 2737|      0|  default:
  ------------------
  |  Branch (2737:3): [True: 0, False: 10.7k]
  ------------------
 2738|      0|    break;
 2739|  10.7k|  }
 2740|       |
 2741|      0|  return 0;
 2742|  10.7k|}
regcomp.c:swap_node:
   72|  5.36k|{
   73|  5.36k|  Node c;
   74|  5.36k|  c = *a; *a = *b; *b = c;
   75|       |
   76|  5.36k|  if (NTYPE(a) == NT_STR) {
  ------------------
  |  |   69|  5.36k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
                if (NTYPE(a) == NT_STR) {
  ------------------
  |  |   38|  5.36k|#define NT_STR         0
  ------------------
  |  Branch (76:7): [True: 0, False: 5.36k]
  ------------------
   77|      0|    StrNode* sn = NSTR(a);
  ------------------
  |  |   76|      0|#define NSTR(node)         (&((node)->u.str))
  ------------------
   78|      0|    if (sn->capa == 0) {
  ------------------
  |  Branch (78:9): [True: 0, False: 0]
  ------------------
   79|      0|      size_t len = sn->end - sn->s;
   80|      0|      sn->s   = sn->buf;
   81|      0|      sn->end = sn->s + len;
   82|      0|    }
   83|      0|  }
   84|       |
   85|  5.36k|  if (NTYPE(b) == NT_STR) {
  ------------------
  |  |   69|  5.36k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
                if (NTYPE(b) == NT_STR) {
  ------------------
  |  |   38|  5.36k|#define NT_STR         0
  ------------------
  |  Branch (85:7): [True: 0, False: 5.36k]
  ------------------
   86|      0|    StrNode* sn = NSTR(b);
  ------------------
  |  |   76|      0|#define NSTR(node)         (&((node)->u.str))
  ------------------
   87|      0|    if (sn->capa == 0) {
  ------------------
  |  Branch (87:9): [True: 0, False: 0]
  ------------------
   88|      0|      size_t len = sn->end - sn->s;
   89|      0|      sn->s   = sn->buf;
   90|      0|      sn->end = sn->s + len;
   91|      0|    }
   92|      0|  }
   93|  5.36k|}
regcomp.c:distance_add:
   97|   163k|{
   98|   163k|  if (d1 == ONIG_INFINITE_DISTANCE || d2 == ONIG_INFINITE_DISTANCE)
  ------------------
  |  |   85|   327k|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
                if (d1 == ONIG_INFINITE_DISTANCE || d2 == ONIG_INFINITE_DISTANCE)
  ------------------
  |  |   85|   124k|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
  |  Branch (98:7): [True: 38.8k, False: 124k]
  |  Branch (98:39): [True: 12.3k, False: 112k]
  ------------------
   99|  51.2k|    return ONIG_INFINITE_DISTANCE;
  ------------------
  |  |   85|  51.2k|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
  100|   112k|  else {
  101|   112k|    if (d1 <= ONIG_INFINITE_DISTANCE - d2) return d1 + d2;
  ------------------
  |  |   85|   112k|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
  |  Branch (101:9): [True: 112k, False: 0]
  ------------------
  102|      0|    else return ONIG_INFINITE_DISTANCE;
  ------------------
  |  |   85|      0|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
  103|   112k|  }
  104|   163k|}
regcomp.c:clear_optimize_info:
 5363|  9.49k|{
 5364|  9.49k|  reg->optimize      = ONIG_OPTIMIZE_NONE;
  ------------------
  |  |  355|  9.49k|#define ONIG_OPTIMIZE_NONE              0
  ------------------
 5365|  9.49k|  reg->anchor        = 0;
 5366|  9.49k|  reg->anchor_dmin   = 0;
 5367|  9.49k|  reg->anchor_dmax   = 0;
 5368|  9.49k|  reg->sub_anchor    = 0;
 5369|  9.49k|  reg->exact_end     = (UChar* )NULL;
 5370|  9.49k|  reg->threshold_len = 0;
 5371|  9.49k|  if (IS_NOT_NULL(reg->exact)) {
  ------------------
  |  |  312|  9.49k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 9.49k]
  |  |  ------------------
  ------------------
 5372|      0|    xfree(reg->exact);
  ------------------
  |  |  145|      0|# define xfree       free
  ------------------
 5373|      0|    reg->exact = (UChar* )NULL;
 5374|      0|  }
 5375|  9.49k|}
regcomp.c:set_optimize_info_from_tree:
 5303|  9.49k|{
 5304|       |
 5305|  9.49k|  int r;
 5306|  9.49k|  NodeOptInfo opt;
 5307|  9.49k|  OptEnv env;
 5308|       |
 5309|  9.49k|  env.enc            = reg->enc;
 5310|  9.49k|  env.options        = reg->options;
 5311|  9.49k|  env.case_fold_flag = reg->case_fold_flag;
 5312|  9.49k|  env.scan_env   = scan_env;
 5313|  9.49k|  clear_mml(&env.mmd);
 5314|       |
 5315|  9.49k|  r = optimize_node_left(node, &opt, &env);
 5316|  9.49k|  if (r) return r;
  ------------------
  |  Branch (5316:7): [True: 0, False: 9.49k]
  ------------------
 5317|       |
 5318|  9.49k|  reg->anchor = opt.anc.left_anchor & (ANCHOR_BEGIN_BUF |
  ------------------
  |  |  540|  9.49k|#define ANCHOR_BEGIN_BUF        (1<<0)
  ------------------
 5319|  9.49k|        ANCHOR_BEGIN_POSITION | ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML |
  ------------------
  |  |  542|  9.49k|#define ANCHOR_BEGIN_POSITION   (1<<2)
  ------------------
                      ANCHOR_BEGIN_POSITION | ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML |
  ------------------
  |  |  556|  9.49k|#define ANCHOR_ANYCHAR_STAR     (1<<14)   /* ".*" optimize info */
  ------------------
                      ANCHOR_BEGIN_POSITION | ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML |
  ------------------
  |  |  557|  9.49k|#define ANCHOR_ANYCHAR_STAR_ML  (1<<15)   /* ".*" optimize info (multi-line) */
  ------------------
 5320|  9.49k|        ANCHOR_LOOK_BEHIND);
  ------------------
  |  |  553|  9.49k|#define ANCHOR_LOOK_BEHIND      (1<<12)
  ------------------
 5321|       |
 5322|  9.49k|  if ((opt.anc.left_anchor & (ANCHOR_LOOK_BEHIND | ANCHOR_PREC_READ_NOT)) != 0)
  ------------------
  |  |  553|  9.49k|#define ANCHOR_LOOK_BEHIND      (1<<12)
  ------------------
                if ((opt.anc.left_anchor & (ANCHOR_LOOK_BEHIND | ANCHOR_PREC_READ_NOT)) != 0)
  ------------------
  |  |  552|  9.49k|#define ANCHOR_PREC_READ_NOT    (1<<11)
  ------------------
  |  Branch (5322:7): [True: 0, False: 9.49k]
  ------------------
 5323|      0|    reg->anchor &= ~ANCHOR_ANYCHAR_STAR_ML;
  ------------------
  |  |  557|      0|#define ANCHOR_ANYCHAR_STAR_ML  (1<<15)   /* ".*" optimize info (multi-line) */
  ------------------
 5324|       |
 5325|  9.49k|  reg->anchor |= opt.anc.right_anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF |
  ------------------
  |  |  543|  9.49k|#define ANCHOR_END_BUF          (1<<3)
  ------------------
                reg->anchor |= opt.anc.right_anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF |
  ------------------
  |  |  544|  9.49k|#define ANCHOR_SEMI_END_BUF     (1<<4)
  ------------------
 5326|  9.49k|	ANCHOR_PREC_READ_NOT);
  ------------------
  |  |  552|  9.49k|#define ANCHOR_PREC_READ_NOT    (1<<11)
  ------------------
 5327|       |
 5328|  9.49k|  if (reg->anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)) {
  ------------------
  |  |  543|  9.49k|#define ANCHOR_END_BUF          (1<<3)
  ------------------
                if (reg->anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)) {
  ------------------
  |  |  544|  9.49k|#define ANCHOR_SEMI_END_BUF     (1<<4)
  ------------------
  |  Branch (5328:7): [True: 0, False: 9.49k]
  ------------------
 5329|      0|    reg->anchor_dmin = opt.len.min;
 5330|      0|    reg->anchor_dmax = opt.len.max;
 5331|      0|  }
 5332|       |
 5333|  9.49k|  if (opt.exb.len > 0 || opt.exm.len > 0) {
  ------------------
  |  Branch (5333:7): [True: 413, False: 9.08k]
  |  Branch (5333:26): [True: 6.19k, False: 2.89k]
  ------------------
 5334|  6.60k|    select_opt_exact_info(reg->enc, &opt.exb, &opt.exm);
 5335|  6.60k|    if (opt.map.value > 0 &&
  ------------------
  |  Branch (5335:9): [True: 6.60k, False: 0]
  ------------------
 5336|  6.60k|	comp_opt_exact_or_map_info(&opt.exb, &opt.map) > 0) {
  ------------------
  |  Branch (5336:2): [True: 2.06k, False: 4.54k]
  ------------------
 5337|  2.06k|      goto set_map;
 5338|  2.06k|    }
 5339|  4.54k|    else {
 5340|  4.54k|      r = set_optimize_exact_info(reg, &opt.exb);
 5341|  4.54k|      set_sub_anchor(reg, &opt.exb.anc);
 5342|  4.54k|    }
 5343|  6.60k|  }
 5344|  2.89k|  else if (opt.map.value > 0) {
  ------------------
  |  Branch (5344:12): [True: 1.23k, False: 1.65k]
  ------------------
 5345|  3.30k|  set_map:
 5346|  3.30k|    set_optimize_map_info(reg, &opt.map);
 5347|  3.30k|    set_sub_anchor(reg, &opt.map.anc);
 5348|  3.30k|  }
 5349|  1.65k|  else {
 5350|  1.65k|    reg->sub_anchor |= opt.anc.left_anchor & ANCHOR_BEGIN_LINE;
  ------------------
  |  |  541|  1.65k|#define ANCHOR_BEGIN_LINE       (1<<1)
  ------------------
 5351|  1.65k|    if (opt.len.max == 0)
  ------------------
  |  Branch (5351:9): [True: 826, False: 826]
  ------------------
 5352|    826|      reg->sub_anchor |= opt.anc.right_anchor & ANCHOR_END_LINE;
  ------------------
  |  |  545|    826|#define ANCHOR_END_LINE         (1<<5)
  ------------------
 5353|  1.65k|  }
 5354|       |
 5355|       |#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH)
 5356|       |  print_optimize_info(stderr, reg);
 5357|       |#endif
 5358|  9.49k|  return r;
 5359|  9.49k|}
regcomp.c:clear_mml:
 4385|   322k|{
 4386|   322k|  mml->min = mml->max = 0;
 4387|   322k|}
regcomp.c:optimize_node_left:
 4866|  76.4k|{
 4867|  76.4k|  int type;
 4868|  76.4k|  int r = 0;
 4869|       |
 4870|  76.4k|  clear_node_opt_info(opt);
 4871|  76.4k|  set_bound_node_opt_info(opt, &env->mmd);
 4872|       |
 4873|  76.4k|  type = NTYPE(node);
  ------------------
  |  |   69|  76.4k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 4874|  76.4k|  switch (type) {
 4875|  9.91k|  case NT_LIST:
  ------------------
  |  |   46|  9.91k|#define NT_LIST        8
  ------------------
  |  Branch (4875:3): [True: 9.91k, False: 66.4k]
  ------------------
 4876|  9.91k|    {
 4877|  9.91k|      OptEnv nenv;
 4878|  9.91k|      NodeOptInfo nopt;
 4879|  9.91k|      Node* nd = node;
 4880|       |
 4881|  9.91k|      copy_opt_env(&nenv, env);
 4882|  40.8k|      do {
 4883|  40.8k|	r = optimize_node_left(NCAR(nd), &nopt, &nenv);
  ------------------
  |  |   86|  40.8k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  40.8k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 4884|  40.8k|	if (r == 0) {
  ------------------
  |  Branch (4884:6): [True: 40.8k, False: 0]
  ------------------
 4885|  40.8k|	  add_mml(&nenv.mmd, &nopt.len);
 4886|  40.8k|	  concat_left_node_opt_info(env->enc, opt, &nopt);
 4887|  40.8k|	}
 4888|  40.8k|      } while (r == 0 && IS_NOT_NULL(nd = NCDR(nd)));
  ------------------
  |  |  312|  40.8k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 30.9k, False: 9.91k]
  |  |  ------------------
  ------------------
  |  Branch (4888:16): [True: 40.8k, False: 0]
  ------------------
 4889|  9.91k|    }
 4890|  9.91k|    break;
 4891|       |
 4892|  2.47k|  case NT_ALT:
  ------------------
  |  |   47|  2.47k|#define NT_ALT         9
  ------------------
  |  Branch (4892:3): [True: 2.47k, False: 73.9k]
  ------------------
 4893|  2.47k|    {
 4894|  2.47k|      NodeOptInfo nopt;
 4895|  2.47k|      Node* nd = node;
 4896|       |
 4897|  5.78k|      do {
 4898|  5.78k|	r = optimize_node_left(NCAR(nd), &nopt, env);
  ------------------
  |  |   86|  5.78k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  5.78k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 4899|  5.78k|	if (r == 0) {
  ------------------
  |  Branch (4899:6): [True: 5.78k, False: 0]
  ------------------
 4900|  5.78k|	  if (nd == node) copy_node_opt_info(opt, &nopt);
  ------------------
  |  Branch (4900:8): [True: 2.47k, False: 3.30k]
  ------------------
 4901|  3.30k|	  else            alt_merge_node_opt_info(opt, &nopt, env);
 4902|  5.78k|	}
 4903|  5.78k|      } while ((r == 0) && IS_NOT_NULL(nd = NCDR(nd)));
  ------------------
  |  |  312|  5.78k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 3.30k, False: 2.47k]
  |  |  ------------------
  ------------------
  |  Branch (4903:16): [True: 5.78k, False: 0]
  ------------------
 4904|  2.47k|    }
 4905|  2.47k|    break;
 4906|       |
 4907|  17.7k|  case NT_STR:
  ------------------
  |  |   38|  17.7k|#define NT_STR         0
  ------------------
  |  Branch (4907:3): [True: 17.7k, False: 58.6k]
  ------------------
 4908|  17.7k|    {
 4909|  17.7k|      StrNode* sn = NSTR(node);
  ------------------
  |  |   76|  17.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 4910|  17.7k|      OnigDistance slen = sn->end - sn->s;
 4911|  17.7k|      int is_raw = NSTRING_IS_RAW(node);
  ------------------
  |  |  114|  17.7k|#define NSTRING_IS_RAW(node)          (((node)->u.str.flag & NSTR_RAW)   != 0)
  |  |  ------------------
  |  |  |  |  104|  17.7k|#define NSTR_RAW                (1<<0) /* by backslashed number */
  |  |  ------------------
  ------------------
 4912|       |
 4913|  17.7k|      if (! NSTRING_IS_AMBIG(node)) {
  ------------------
  |  |  115|  17.7k|#define NSTRING_IS_AMBIG(node)        (((node)->u.str.flag & NSTR_AMBIG) != 0)
  |  |  ------------------
  |  |  |  |  105|  17.7k|#define NSTR_AMBIG              (1<<1)
  |  |  ------------------
  ------------------
  |  Branch (4913:11): [True: 17.7k, False: 0]
  ------------------
 4914|  17.7k|	concat_opt_exact_info_str(&opt->exb, sn->s, sn->end,
 4915|  17.7k|				  is_raw, env->enc);
 4916|  17.7k|	opt->exb.ignore_case = 0;
 4917|  17.7k|	if (slen > 0) {
  ------------------
  |  Branch (4917:6): [True: 17.3k, False: 413]
  ------------------
 4918|  17.3k|	  add_char_opt_map_info(&opt->map, *(sn->s), env->enc);
 4919|  17.3k|	}
 4920|  17.7k|	set_mml(&opt->len, slen, slen);
 4921|  17.7k|      }
 4922|      0|      else {
 4923|      0|	OnigDistance max;
 4924|       |
 4925|      0|	if (NSTRING_IS_DONT_GET_OPT_INFO(node)) {
  ------------------
  |  |  117|      0|  (((node)->u.str.flag & NSTR_DONT_GET_OPT_INFO) != 0)
  |  |  ------------------
  |  |  |  |  106|      0|#define NSTR_DONT_GET_OPT_INFO  (1<<2)
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4926|      0|	  int n = onigenc_strlen(env->enc, sn->s, sn->end);
 4927|      0|	  max = (OnigDistance )ONIGENC_MBC_MAXLEN_DIST(env->enc) * n;
  ------------------
  |  |  366|      0|#define ONIGENC_MBC_MAXLEN_DIST(enc)           ONIGENC_MBC_MAXLEN(enc)
  |  |  ------------------
  |  |  |  |  365|      0|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  |  |  ------------------
  ------------------
 4928|      0|	}
 4929|      0|	else {
 4930|      0|	  concat_opt_exact_info_str(&opt->exb, sn->s, sn->end,
 4931|      0|				    is_raw, env->enc);
 4932|      0|	  opt->exb.ignore_case = 1;
 4933|       |
 4934|      0|	  if (slen > 0) {
  ------------------
  |  Branch (4934:8): [True: 0, False: 0]
  ------------------
 4935|      0|	    r = add_char_amb_opt_map_info(&opt->map, sn->s, sn->end,
 4936|      0|					  env->enc, env->case_fold_flag);
 4937|      0|	    if (r != 0) break;
  ------------------
  |  Branch (4937:10): [True: 0, False: 0]
  ------------------
 4938|      0|	  }
 4939|       |
 4940|      0|	  max = slen;
 4941|      0|	}
 4942|       |
 4943|      0|	set_mml(&opt->len, slen, max);
 4944|      0|      }
 4945|       |
 4946|  17.7k|      if ((OnigDistance )opt->exb.len == slen)
  ------------------
  |  Branch (4946:11): [True: 16.1k, False: 1.65k]
  ------------------
 4947|  16.1k|	opt->exb.reach_end = 1;
 4948|  17.7k|    }
 4949|      0|    break;
 4950|       |
 4951|  9.91k|  case NT_CCLASS:
  ------------------
  |  |   39|  9.91k|#define NT_CCLASS      1
  ------------------
  |  Branch (4951:3): [True: 9.91k, False: 66.4k]
  ------------------
 4952|  9.91k|    {
 4953|  9.91k|      int i, z;
 4954|  9.91k|      CClassNode* cc = NCCLASS(node);
  ------------------
  |  |   77|  9.91k|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 4955|       |
 4956|       |      /* no need to check ignore case. (set in setup_tree()) */
 4957|       |
 4958|  9.91k|      if (IS_NOT_NULL(cc->mbuf) || IS_NCCLASS_NOT(cc)) {
  ------------------
  |  |  312|  19.8k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 9.91k]
  |  |  ------------------
  ------------------
                    if (IS_NOT_NULL(cc->mbuf) || IS_NCCLASS_NOT(cc)) {
  ------------------
  |  |  809|  9.91k|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|  9.91k|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  9.91k|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (802:37): [True: 2.47k, False: 7.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4959|  2.47k|	OnigDistance min = ONIGENC_MBC_MINLEN(env->enc);
  ------------------
  |  |  367|  2.47k|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  ------------------
 4960|  2.47k|	OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
  ------------------
  |  |  366|  2.47k|#define ONIGENC_MBC_MAXLEN_DIST(enc)           ONIGENC_MBC_MAXLEN(enc)
  |  |  ------------------
  |  |  |  |  365|  2.47k|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  |  |  ------------------
  ------------------
 4961|       |
 4962|  2.47k|	set_mml(&opt->len, min, max);
 4963|  2.47k|      }
 4964|  7.43k|      else {
 4965|  1.91M|	for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
  ------------------
  |  |  426|  1.91M|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|  1.91M|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (4965:14): [True: 1.90M, False: 7.43k]
  ------------------
 4966|  1.90M|	  z = BITSET_AT(cc->bs, i);
  ------------------
  |  |  448|  1.90M|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  445|  1.90M|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|  1.90M|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|  1.90M|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  446|  1.90M|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|  1.90M|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|  1.90M|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4967|  1.90M|	  if ((z && !IS_NCCLASS_NOT(cc)) || (!z && IS_NCCLASS_NOT(cc))) {
  ------------------
  |  |  809|  36.7k|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|  36.7k|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  36.7k|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
              	  if ((z && !IS_NCCLASS_NOT(cc)) || (!z && IS_NCCLASS_NOT(cc))) {
  ------------------
  |  |  809|  1.86M|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|  1.86M|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  1.86M|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (802:37): [True: 0, False: 1.86M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4967:9): [True: 36.7k, False: 1.86M]
  |  Branch (4967:14): [True: 36.7k, False: 0]
  |  Branch (4967:39): [True: 1.86M, False: 0]
  ------------------
 4968|  36.7k|	    add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
 4969|  36.7k|	  }
 4970|  1.90M|	}
 4971|  7.43k|	set_mml(&opt->len, 1, 1);
 4972|  7.43k|      }
 4973|  9.91k|    }
 4974|  9.91k|    break;
 4975|       |
 4976|      0|  case NT_CTYPE:
  ------------------
  |  |   40|      0|#define NT_CTYPE       2
  ------------------
  |  Branch (4976:3): [True: 0, False: 76.4k]
  ------------------
 4977|      0|    {
 4978|      0|      int i, min, max;
 4979|      0|      int maxcode;
 4980|       |
 4981|      0|      max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
  ------------------
  |  |  366|      0|#define ONIGENC_MBC_MAXLEN_DIST(enc)           ONIGENC_MBC_MAXLEN(enc)
  |  |  ------------------
  |  |  |  |  365|      0|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  |  |  ------------------
  ------------------
 4982|       |
 4983|      0|      if (max == 1) {
  ------------------
  |  Branch (4983:11): [True: 0, False: 0]
  ------------------
 4984|      0|	min = 1;
 4985|       |
 4986|      0|	maxcode = NCTYPE(node)->ascii_range ? 0x80 : SINGLE_BYTE_SIZE;
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
              	maxcode = NCTYPE(node)->ascii_range ? 0x80 : SINGLE_BYTE_SIZE;
  ------------------
  |  |  426|      0|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (4986:12): [True: 0, False: 0]
  ------------------
 4987|      0|	switch (NCTYPE(node)->ctype) {
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
  |  Branch (4987:10): [True: 0, False: 0]
  ------------------
 4988|      0|	case ONIGENC_CTYPE_WORD:
  ------------------
  |  |  306|      0|#define ONIGENC_CTYPE_WORD     12
  ------------------
  |  Branch (4988:2): [True: 0, False: 0]
  ------------------
 4989|      0|	  if (NCTYPE(node)->not != 0) {
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
  |  Branch (4989:8): [True: 0, False: 0]
  ------------------
 4990|      0|	    for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
  ------------------
  |  |  426|      0|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (4990:18): [True: 0, False: 0]
  ------------------
 4991|      0|	      if (! ONIGENC_IS_CODE_WORD(env->enc, i) || i >= maxcode) {
  ------------------
  |  |  404|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  ------------------
  ------------------
  |  Branch (4991:12): [True: 0, False: 0]
  |  Branch (4991:51): [True: 0, False: 0]
  ------------------
 4992|      0|		add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
 4993|      0|	      }
 4994|      0|	    }
 4995|      0|	  }
 4996|      0|	  else {
 4997|      0|	    for (i = 0; i < maxcode; i++) {
  ------------------
  |  Branch (4997:18): [True: 0, False: 0]
  ------------------
 4998|      0|	      if (ONIGENC_IS_CODE_WORD(env->enc, i)) {
  ------------------
  |  |  404|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4999|      0|		add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
 5000|      0|	      }
 5001|      0|	    }
 5002|      0|	  }
 5003|      0|	  break;
 5004|      0|	}
 5005|      0|      }
 5006|      0|      else {
 5007|      0|	min = ONIGENC_MBC_MINLEN(env->enc);
  ------------------
  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  ------------------
 5008|      0|      }
 5009|      0|      set_mml(&opt->len, min, max);
 5010|      0|    }
 5011|      0|    break;
 5012|       |
 5013|  4.13k|  case NT_CANY:
  ------------------
  |  |   41|  4.13k|#define NT_CANY        3
  ------------------
  |  Branch (5013:3): [True: 4.13k, False: 72.2k]
  ------------------
 5014|  4.13k|    {
 5015|  4.13k|      OnigDistance min = ONIGENC_MBC_MINLEN(env->enc);
  ------------------
  |  |  367|  4.13k|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  ------------------
 5016|  4.13k|      OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
  ------------------
  |  |  366|  4.13k|#define ONIGENC_MBC_MAXLEN_DIST(enc)           ONIGENC_MBC_MAXLEN(enc)
  |  |  ------------------
  |  |  |  |  365|  4.13k|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  |  |  ------------------
  ------------------
 5017|  4.13k|      set_mml(&opt->len, min, max);
 5018|  4.13k|    }
 5019|  4.13k|    break;
 5020|       |
 5021|  11.9k|  case NT_ANCHOR:
  ------------------
  |  |   45|  11.9k|#define NT_ANCHOR      7
  ------------------
  |  Branch (5021:3): [True: 11.9k, False: 64.4k]
  ------------------
 5022|  11.9k|    switch (NANCHOR(node)->type) {
  ------------------
  |  |   82|  11.9k|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
  |  Branch (5022:13): [True: 413, False: 11.5k]
  ------------------
 5023|      0|    case ANCHOR_BEGIN_BUF:
  ------------------
  |  |  540|      0|#define ANCHOR_BEGIN_BUF        (1<<0)
  ------------------
  |  Branch (5023:5): [True: 0, False: 11.9k]
  ------------------
 5024|      0|    case ANCHOR_BEGIN_POSITION:
  ------------------
  |  |  542|      0|#define ANCHOR_BEGIN_POSITION   (1<<2)
  ------------------
  |  Branch (5024:5): [True: 0, False: 11.9k]
  ------------------
 5025|  8.26k|    case ANCHOR_BEGIN_LINE:
  ------------------
  |  |  541|  8.26k|#define ANCHOR_BEGIN_LINE       (1<<1)
  ------------------
  |  Branch (5025:5): [True: 8.26k, False: 3.71k]
  ------------------
 5026|  8.26k|    case ANCHOR_END_BUF:
  ------------------
  |  |  543|  8.26k|#define ANCHOR_END_BUF          (1<<3)
  ------------------
  |  Branch (5026:5): [True: 0, False: 11.9k]
  ------------------
 5027|  8.26k|    case ANCHOR_SEMI_END_BUF:
  ------------------
  |  |  544|  8.26k|#define ANCHOR_SEMI_END_BUF     (1<<4)
  ------------------
  |  Branch (5027:5): [True: 0, False: 11.9k]
  ------------------
 5028|  11.5k|    case ANCHOR_END_LINE:
  ------------------
  |  |  545|  11.5k|#define ANCHOR_END_LINE         (1<<5)
  ------------------
  |  Branch (5028:5): [True: 3.30k, False: 8.67k]
  ------------------
 5029|  11.5k|    case ANCHOR_LOOK_BEHIND:	/* just for (?<=x).* */
  ------------------
  |  |  553|  11.5k|#define ANCHOR_LOOK_BEHIND      (1<<12)
  ------------------
  |  Branch (5029:5): [True: 0, False: 11.9k]
  ------------------
 5030|  11.5k|    case ANCHOR_PREC_READ_NOT:	/* just for (?!x).* */
  ------------------
  |  |  552|  11.5k|#define ANCHOR_PREC_READ_NOT    (1<<11)
  ------------------
  |  Branch (5030:5): [True: 0, False: 11.9k]
  ------------------
 5031|  11.5k|      add_opt_anc_info(&opt->anc, NANCHOR(node)->type);
  ------------------
  |  |   82|  11.5k|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 5032|  11.5k|      break;
 5033|       |
 5034|      0|    case ANCHOR_PREC_READ:
  ------------------
  |  |  551|      0|#define ANCHOR_PREC_READ        (1<<10)
  ------------------
  |  Branch (5034:5): [True: 0, False: 11.9k]
  ------------------
 5035|      0|      {
 5036|      0|	NodeOptInfo nopt;
 5037|       |
 5038|      0|	r = optimize_node_left(NANCHOR(node)->target, &nopt, env);
  ------------------
  |  |   82|      0|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 5039|      0|	if (r == 0) {
  ------------------
  |  Branch (5039:6): [True: 0, False: 0]
  ------------------
 5040|      0|	  if (nopt.exb.len > 0)
  ------------------
  |  Branch (5040:8): [True: 0, False: 0]
  ------------------
 5041|      0|	    copy_opt_exact_info(&opt->expr, &nopt.exb);
 5042|      0|	  else if (nopt.exm.len > 0)
  ------------------
  |  Branch (5042:13): [True: 0, False: 0]
  ------------------
 5043|      0|	    copy_opt_exact_info(&opt->expr, &nopt.exm);
 5044|       |
 5045|      0|	  opt->expr.reach_end = 0;
 5046|       |
 5047|      0|	  if (nopt.map.value > 0)
  ------------------
  |  Branch (5047:8): [True: 0, False: 0]
  ------------------
 5048|      0|	    copy_opt_map_info(&opt->map, &nopt.map);
 5049|      0|	}
 5050|      0|      }
 5051|      0|      break;
 5052|       |
 5053|      0|    case ANCHOR_LOOK_BEHIND_NOT:
  ------------------
  |  |  554|      0|#define ANCHOR_LOOK_BEHIND_NOT  (1<<13)
  ------------------
  |  Branch (5053:5): [True: 0, False: 11.9k]
  ------------------
 5054|      0|      break;
 5055|  11.9k|    }
 5056|  11.9k|    break;
 5057|       |
 5058|  11.9k|  case NT_BREF:
  ------------------
  |  |   42|      0|#define NT_BREF        4
  ------------------
  |  Branch (5058:3): [True: 0, False: 76.4k]
  ------------------
 5059|      0|    {
 5060|      0|      int i;
 5061|      0|      int* backs;
 5062|      0|      OnigDistance min, max, tmin, tmax;
 5063|      0|      Node** nodes = SCANENV_MEM_NODES(env->scan_env);
  ------------------
  |  |  287|      0| (IS_NOT_NULL((senv)->mem_nodes_dynamic) ? \
  |  |  ------------------
  |  |  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  288|      0|    (senv)->mem_nodes_dynamic : (senv)->mem_nodes_static)
  ------------------
 5064|      0|      BRefNode* br = NBREF(node);
  ------------------
  |  |   79|      0|#define NBREF(node)        (&((node)->u.bref))
  ------------------
 5065|       |
 5066|      0|      if (br->state & NST_RECURSION) {
  ------------------
  |  |  135|      0|#define NST_RECURSION             (1<<7)
  ------------------
  |  Branch (5066:11): [True: 0, False: 0]
  ------------------
 5067|      0|	set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE);
  ------------------
  |  |   85|      0|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
 5068|      0|	break;
 5069|      0|      }
 5070|      0|      backs = BACKREFS_P(br);
  ------------------
  |  |  120|      0|  (IS_NOT_NULL((br)->back_dynamic) ? (br)->back_dynamic : (br)->back_static);
  |  |  ------------------
  |  |  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5071|      0|      r = get_min_match_length(nodes[backs[0]], &min, env->scan_env);
 5072|      0|      if (r != 0) break;
  ------------------
  |  Branch (5072:11): [True: 0, False: 0]
  ------------------
 5073|      0|      r = get_max_match_length(nodes[backs[0]], &max, env->scan_env);
 5074|      0|      if (r != 0) break;
  ------------------
  |  Branch (5074:11): [True: 0, False: 0]
  ------------------
 5075|      0|      for (i = 1; i < br->back_num; i++) {
  ------------------
  |  Branch (5075:19): [True: 0, False: 0]
  ------------------
 5076|      0|	r = get_min_match_length(nodes[backs[i]], &tmin, env->scan_env);
 5077|      0|	if (r != 0) break;
  ------------------
  |  Branch (5077:6): [True: 0, False: 0]
  ------------------
 5078|      0|	r = get_max_match_length(nodes[backs[i]], &tmax, env->scan_env);
 5079|      0|	if (r != 0) break;
  ------------------
  |  Branch (5079:6): [True: 0, False: 0]
  ------------------
 5080|      0|	if (min > tmin) min = tmin;
  ------------------
  |  Branch (5080:6): [True: 0, False: 0]
  ------------------
 5081|      0|	if (max < tmax) max = tmax;
  ------------------
  |  Branch (5081:6): [True: 0, False: 0]
  ------------------
 5082|      0|      }
 5083|      0|      if (r == 0) set_mml(&opt->len, min, max);
  ------------------
  |  Branch (5083:11): [True: 0, False: 0]
  ------------------
 5084|      0|    }
 5085|      0|    break;
 5086|       |
 5087|      0|#ifdef USE_SUBEXP_CALL
 5088|      0|  case NT_CALL:
  ------------------
  |  |   48|      0|#define NT_CALL       10
  ------------------
  |  Branch (5088:3): [True: 0, False: 76.4k]
  ------------------
 5089|      0|    if (IS_CALL_RECURSION(NCALL(node)))
  ------------------
  |  |  161|      0|#define IS_CALL_RECURSION(cn)          (((cn)->state & NST_RECURSION)  != 0)
  |  |  ------------------
  |  |  |  |  135|      0|#define NST_RECURSION             (1<<7)
  |  |  ------------------
  |  |  |  Branch (161:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5090|      0|      set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE);
  ------------------
  |  |   85|      0|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
 5091|      0|    else {
 5092|      0|      OnigOptionType save = env->options;
 5093|      0|      env->options = NENCLOSE(NCALL(node)->target)->option;
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 5094|      0|      r = optimize_node_left(NCALL(node)->target, opt, env);
  ------------------
  |  |   84|      0|#define NCALL(node)        (&((node)->u.call))
  ------------------
 5095|      0|      env->options = save;
 5096|      0|    }
 5097|      0|    break;
 5098|      0|#endif
 5099|       |
 5100|  12.3k|  case NT_QTFR:
  ------------------
  |  |   43|  12.3k|#define NT_QTFR        5
  ------------------
  |  Branch (5100:3): [True: 12.3k, False: 64.0k]
  ------------------
 5101|  12.3k|    {
 5102|  12.3k|      int i;
 5103|  12.3k|      OnigDistance min, max;
 5104|  12.3k|      NodeOptInfo nopt;
 5105|  12.3k|      QtfrNode* qn = NQTFR(node);
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 5106|       |
 5107|  12.3k|      r = optimize_node_left(qn->target, &nopt, env);
 5108|  12.3k|      if (r) break;
  ------------------
  |  Branch (5108:11): [True: 0, False: 12.3k]
  ------------------
 5109|       |
 5110|  12.3k|      if (qn->lower == 0 && IS_REPEAT_INFINITE(qn->upper)) {
  ------------------
  |  |  422|  4.95k|#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
  |  |  ------------------
  |  |  |  |  421|  4.95k|#define REPEAT_INFINITE         -1
  |  |  ------------------
  |  |  |  Branch (422:33): [True: 4.54k, False: 413]
  |  |  ------------------
  ------------------
  |  Branch (5110:11): [True: 4.95k, False: 7.43k]
  ------------------
 5111|  4.54k|	if (env->mmd.max == 0 &&
  ------------------
  |  Branch (5111:6): [True: 2.47k, False: 2.06k]
  ------------------
 5112|  4.54k|	    NTYPE(qn->target) == NT_CANY && qn->greedy) {
  ------------------
  |  |   69|  2.47k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
              	    NTYPE(qn->target) == NT_CANY && qn->greedy) {
  ------------------
  |  |   41|  7.02k|#define NT_CANY        3
  ------------------
  |  Branch (5112:6): [True: 0, False: 2.47k]
  |  Branch (5112:38): [True: 0, False: 0]
  ------------------
 5113|      0|	  if (IS_MULTILINE(env->options))
  ------------------
  |  |  395|      0|#define IS_MULTILINE(option)      ((option) & ONIG_OPTION_MULTILINE)
  |  |  ------------------
  |  |  |  |  456|      0|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  455|      0|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (395:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5114|       |	    /* implicit anchor: /.*a/ ==> /\A.*a/ */
 5115|      0|	    add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_ML);
  ------------------
  |  |  557|      0|#define ANCHOR_ANYCHAR_STAR_ML  (1<<15)   /* ".*" optimize info (multi-line) */
  ------------------
 5116|      0|	  else
 5117|      0|	    add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR);
  ------------------
  |  |  556|      0|#define ANCHOR_ANYCHAR_STAR     (1<<14)   /* ".*" optimize info */
  ------------------
 5118|      0|	}
 5119|  4.54k|      }
 5120|  7.84k|      else {
 5121|  7.84k|	if (qn->lower > 0) {
  ------------------
  |  Branch (5121:6): [True: 7.43k, False: 413]
  ------------------
 5122|  7.43k|	  copy_node_opt_info(opt, &nopt);
 5123|  7.43k|	  if (nopt.exb.len > 0) {
  ------------------
  |  Branch (5123:8): [True: 0, False: 7.43k]
  ------------------
 5124|      0|	    if (nopt.exb.reach_end) {
  ------------------
  |  Branch (5124:10): [True: 0, False: 0]
  ------------------
 5125|      0|	      for (i = 2; i <= qn->lower &&
  ------------------
  |  Branch (5125:20): [True: 0, False: 0]
  ------------------
 5126|      0|			  ! is_full_opt_exact_info(&opt->exb); i++) {
  ------------------
  |  Branch (5126:6): [True: 0, False: 0]
  ------------------
 5127|      0|		concat_opt_exact_info(&opt->exb, &nopt.exb, env->enc);
 5128|      0|	      }
 5129|      0|	      if (i < qn->lower) {
  ------------------
  |  Branch (5129:12): [True: 0, False: 0]
  ------------------
 5130|      0|		opt->exb.reach_end = 0;
 5131|      0|	      }
 5132|      0|	    }
 5133|      0|	  }
 5134|       |
 5135|  7.43k|	  if (qn->lower != qn->upper) {
  ------------------
  |  Branch (5135:8): [True: 7.43k, False: 0]
  ------------------
 5136|  7.43k|	    opt->exb.reach_end = 0;
 5137|  7.43k|	    opt->exm.reach_end = 0;
 5138|  7.43k|	  }
 5139|  7.43k|	  if (qn->lower > 1)
  ------------------
  |  Branch (5139:8): [True: 0, False: 7.43k]
  ------------------
 5140|      0|	    opt->exm.reach_end = 0;
 5141|  7.43k|	}
 5142|  7.84k|      }
 5143|       |
 5144|  12.3k|      min = distance_multiply(nopt.len.min, qn->lower);
 5145|  12.3k|      if (IS_REPEAT_INFINITE(qn->upper))
  ------------------
  |  |  422|  12.3k|#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
  |  |  ------------------
  |  |  |  |  421|  12.3k|#define REPEAT_INFINITE         -1
  |  |  ------------------
  |  |  |  Branch (422:33): [True: 11.9k, False: 413]
  |  |  ------------------
  ------------------
 5146|  11.9k|	max = (nopt.len.max > 0 ? ONIG_INFINITE_DISTANCE : 0);
  ------------------
  |  |   85|  11.9k|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
  |  Branch (5146:9): [True: 11.9k, False: 0]
  ------------------
 5147|    413|      else
 5148|    413|	max = distance_multiply(nopt.len.max, qn->upper);
 5149|       |
 5150|  12.3k|      set_mml(&opt->len, min, max);
 5151|  12.3k|    }
 5152|      0|    break;
 5153|       |
 5154|  7.84k|  case NT_ENCLOSE:
  ------------------
  |  |   44|  7.84k|#define NT_ENCLOSE     6
  ------------------
  |  Branch (5154:3): [True: 7.84k, False: 68.5k]
  ------------------
 5155|  7.84k|    {
 5156|  7.84k|      EncloseNode* en = NENCLOSE(node);
  ------------------
  |  |   81|  7.84k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 5157|       |
 5158|  7.84k|      switch (en->type) {
  ------------------
  |  Branch (5158:15): [True: 0, False: 7.84k]
  ------------------
 5159|    413|      case ENCLOSE_OPTION:
  ------------------
  |  |   95|    413|#define ENCLOSE_OPTION           (1<<1)
  ------------------
  |  Branch (5159:7): [True: 413, False: 7.43k]
  ------------------
 5160|    413|	{
 5161|    413|	  OnigOptionType save = env->options;
 5162|       |
 5163|    413|	  env->options = en->option;
 5164|    413|	  r = optimize_node_left(en->target, opt, env);
 5165|    413|	  env->options = save;
 5166|    413|	}
 5167|    413|	break;
 5168|       |
 5169|  2.06k|      case ENCLOSE_MEMORY:
  ------------------
  |  |   94|  2.06k|#define ENCLOSE_MEMORY           (1<<0)
  ------------------
  |  Branch (5169:7): [True: 2.06k, False: 5.78k]
  ------------------
 5170|  2.06k|#ifdef USE_SUBEXP_CALL
 5171|  2.06k|	en->opt_count++;
 5172|  2.06k|	if (en->opt_count > MAX_NODE_OPT_INFO_REF_COUNT) {
  ------------------
  |  | 4862|  2.06k|#define MAX_NODE_OPT_INFO_REF_COUNT    5
  ------------------
  |  Branch (5172:6): [True: 0, False: 2.06k]
  ------------------
 5173|      0|	  OnigDistance min, max;
 5174|       |
 5175|      0|	  min = 0;
 5176|      0|	  max = ONIG_INFINITE_DISTANCE;
  ------------------
  |  |   85|      0|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
 5177|      0|	  if (IS_ENCLOSE_MIN_FIXED(en)) min = en->min_len;
  ------------------
  |  |  152|      0|#define IS_ENCLOSE_MIN_FIXED(en)       (((en)->state & NST_MIN_FIXED)     != 0)
  |  |  ------------------
  |  |  |  |  128|      0|#define NST_MIN_FIXED             (1<<0)
  |  |  ------------------
  |  |  |  Branch (152:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5178|      0|	  if (IS_ENCLOSE_MAX_FIXED(en)) max = en->max_len;
  ------------------
  |  |  153|      0|#define IS_ENCLOSE_MAX_FIXED(en)       (((en)->state & NST_MAX_FIXED)     != 0)
  |  |  ------------------
  |  |  |  |  129|      0|#define NST_MAX_FIXED             (1<<1)
  |  |  ------------------
  |  |  |  Branch (153:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5179|      0|	  set_mml(&opt->len, min, max);
 5180|      0|	}
 5181|  2.06k|	else
 5182|  2.06k|#endif
 5183|  2.06k|	{
 5184|  2.06k|	  r = optimize_node_left(en->target, opt, env);
 5185|       |
 5186|  2.06k|	  if (is_set_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_MASK)) {
  ------------------
  |  |   91|  2.06k|#define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML)
  |  |  ------------------
  |  |  |  |  556|  2.06k|#define ANCHOR_ANYCHAR_STAR     (1<<14)   /* ".*" optimize info */
  |  |  ------------------
  |  |               #define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML)
  |  |  ------------------
  |  |  |  |  557|  2.06k|#define ANCHOR_ANYCHAR_STAR_ML  (1<<15)   /* ".*" optimize info (multi-line) */
  |  |  ------------------
  ------------------
  |  Branch (5186:8): [True: 0, False: 2.06k]
  ------------------
 5187|      0|	    if (BIT_STATUS_AT(env->scan_env->backrefed_mem, en->regnum))
  ------------------
  |  |  371|      0|  ((n) < (int )BIT_STATUS_BITS_NUM  ?  ((stats) & ((BitStatusType )1 << n)) : ((stats) & 1))
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (371:3): [True: 0, False: 0]
  |  |  |  Branch (371:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5188|      0|	      remove_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_MASK);
  ------------------
  |  |   91|      0|#define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML)
  |  |  ------------------
  |  |  |  |  556|      0|#define ANCHOR_ANYCHAR_STAR     (1<<14)   /* ".*" optimize info */
  |  |  ------------------
  |  |               #define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML)
  |  |  ------------------
  |  |  |  |  557|      0|#define ANCHOR_ANYCHAR_STAR_ML  (1<<15)   /* ".*" optimize info (multi-line) */
  |  |  ------------------
  ------------------
 5189|      0|	  }
 5190|  2.06k|	}
 5191|  2.06k|	break;
 5192|       |
 5193|  5.36k|      case ENCLOSE_STOP_BACKTRACK:
  ------------------
  |  |   96|  5.36k|#define ENCLOSE_STOP_BACKTRACK   (1<<2)
  ------------------
  |  Branch (5193:7): [True: 5.36k, False: 2.47k]
  ------------------
 5194|  5.36k|      case ENCLOSE_CONDITION:
  ------------------
  |  |   97|  5.36k|#define ENCLOSE_CONDITION        (1<<3)
  ------------------
  |  Branch (5194:7): [True: 0, False: 7.84k]
  ------------------
 5195|  5.36k|	r = optimize_node_left(en->target, opt, env);
 5196|  5.36k|	break;
 5197|       |
 5198|      0|      case ENCLOSE_ABSENT:
  ------------------
  |  |   98|      0|#define ENCLOSE_ABSENT           (1<<4)
  ------------------
  |  Branch (5198:7): [True: 0, False: 7.84k]
  ------------------
 5199|      0|	set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE);
  ------------------
  |  |   85|      0|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
 5200|      0|	break;
 5201|  7.84k|      }
 5202|  7.84k|    }
 5203|  7.84k|    break;
 5204|       |
 5205|  7.84k|  default:
  ------------------
  |  Branch (5205:3): [True: 0, False: 76.4k]
  ------------------
 5206|       |#ifdef ONIG_DEBUG
 5207|       |    fprintf(stderr, "optimize_node_left: undefined node type %d\n",
 5208|       |	    NTYPE(node));
 5209|       |#endif
 5210|      0|    r = ONIGERR_TYPE_BUG;
  ------------------
  |  |  633|      0|#define ONIGERR_TYPE_BUG                                       -6
  ------------------
 5211|      0|    break;
 5212|  76.4k|  }
 5213|       |
 5214|  76.4k|  return r;
 5215|  76.4k|}
regcomp.c:clear_node_opt_info:
 4775|  76.4k|{
 4776|  76.4k|  clear_mml(&opt->len);
 4777|  76.4k|  clear_opt_anc_info(&opt->anc);
 4778|  76.4k|  clear_opt_exact_info(&opt->exb);
 4779|  76.4k|  clear_opt_exact_info(&opt->exm);
 4780|  76.4k|  clear_opt_exact_info(&opt->expr);
 4781|  76.4k|  clear_opt_map_info(&opt->map);
 4782|  76.4k|}
regcomp.c:clear_opt_anc_info:
 4427|   357k|{
 4428|   357k|  anc->left_anchor  = 0;
 4429|   357k|  anc->right_anchor = 0;
 4430|   357k|}
regcomp.c:clear_opt_exact_info:
 4510|   237k|{
 4511|   237k|  clear_mml(&ex->mmd);
 4512|   237k|  clear_opt_anc_info(&ex->anc);
 4513|   237k|  ex->reach_end   = 0;
 4514|   237k|  ex->ignore_case = -1;   /* unset */
 4515|   237k|  ex->len         = 0;
 4516|   237k|  ex->s[0]        = '\0';
 4517|   237k|}
regcomp.c:clear_opt_map_info:
 4643|  76.4k|{
 4644|  76.4k|  static const OptMapInfo clean_info = {
 4645|  76.4k|    {0, 0}, {0, 0}, 0,
 4646|  76.4k|    {
 4647|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4648|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4649|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4650|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4651|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4652|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4653|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4654|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4655|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4656|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4657|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4658|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4659|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4660|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4661|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 4662|  76.4k|      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 4663|  76.4k|    }
 4664|  76.4k|  };
 4665|       |
 4666|  76.4k|  xmemcpy(map, &clean_info, sizeof(OptMapInfo));
  ------------------
  |  |  215|  76.4k|#define xmemcpy     memcpy
  ------------------
 4667|  76.4k|}
regcomp.c:set_bound_node_opt_info:
 4767|  76.4k|{
 4768|  76.4k|  copy_mml(&(opt->exb.mmd),  mmd);
 4769|  76.4k|  copy_mml(&(opt->expr.mmd), mmd);
 4770|  76.4k|  copy_mml(&(opt->map.mmd),  mmd);
 4771|  76.4k|}
regcomp.c:copy_mml:
 4391|   229k|{
 4392|   229k|  to->min = from->min;
 4393|   229k|  to->max = from->max;
 4394|   229k|}
regcomp.c:copy_opt_env:
 4421|  9.91k|{
 4422|  9.91k|  *to = *from;
 4423|  9.91k|}
regcomp.c:add_mml:
 4398|  81.7k|{
 4399|  81.7k|  to->min = distance_add(to->min, from->min);
 4400|  81.7k|  to->max = distance_add(to->max, from->max);
 4401|  81.7k|}
regcomp.c:concat_left_node_opt_info:
 4792|  40.8k|{
 4793|  40.8k|  int exb_reach, exm_reach;
 4794|  40.8k|  OptAncInfo tanc;
 4795|       |
 4796|  40.8k|  concat_opt_anc_info(&tanc, &to->anc, &add->anc, to->len.max, add->len.max);
 4797|  40.8k|  copy_opt_anc_info(&to->anc, &tanc);
 4798|       |
 4799|  40.8k|  if (add->exb.len > 0 && to->len.max == 0) {
  ------------------
  |  Branch (4799:7): [True: 11.9k, False: 28.9k]
  |  Branch (4799:27): [True: 2.47k, False: 9.49k]
  ------------------
 4800|  2.47k|    concat_opt_anc_info(&tanc, &to->anc, &add->exb.anc,
 4801|  2.47k|			to->len.max, add->len.max);
 4802|  2.47k|    copy_opt_anc_info(&add->exb.anc, &tanc);
 4803|  2.47k|  }
 4804|       |
 4805|  40.8k|  if (add->map.value > 0 && to->len.max == 0) {
  ------------------
  |  Branch (4805:7): [True: 18.9k, False: 21.8k]
  |  Branch (4805:29): [True: 4.54k, False: 14.4k]
  ------------------
 4806|  4.54k|    if (add->map.mmd.max == 0)
  ------------------
  |  Branch (4806:9): [True: 4.54k, False: 0]
  ------------------
 4807|  4.54k|      add->map.anc.left_anchor |= to->anc.left_anchor;
 4808|  4.54k|  }
 4809|       |
 4810|  40.8k|  exb_reach = to->exb.reach_end;
 4811|  40.8k|  exm_reach = to->exm.reach_end;
 4812|       |
 4813|  40.8k|  if (add->len.max != 0)
  ------------------
  |  Branch (4813:7): [True: 28.4k, False: 12.3k]
  ------------------
 4814|  28.4k|    to->exb.reach_end = to->exm.reach_end = 0;
 4815|       |
 4816|  40.8k|  if (add->exb.len > 0) {
  ------------------
  |  Branch (4816:7): [True: 11.9k, False: 28.9k]
  ------------------
 4817|  11.9k|    if (exb_reach) {
  ------------------
  |  Branch (4817:9): [True: 0, False: 11.9k]
  ------------------
 4818|      0|      concat_opt_exact_info(&to->exb, &add->exb, enc);
 4819|      0|      clear_opt_exact_info(&add->exb);
 4820|      0|    }
 4821|  11.9k|    else if (exm_reach) {
  ------------------
  |  Branch (4821:14): [True: 413, False: 11.5k]
  ------------------
 4822|    413|      concat_opt_exact_info(&to->exm, &add->exb, enc);
 4823|    413|      clear_opt_exact_info(&add->exb);
 4824|    413|    }
 4825|  11.9k|  }
 4826|  40.8k|  select_opt_exact_info(enc, &to->exm, &add->exb);
 4827|  40.8k|  select_opt_exact_info(enc, &to->exm, &add->exm);
 4828|       |
 4829|  40.8k|  if (to->expr.len > 0) {
  ------------------
  |  Branch (4829:7): [True: 0, False: 40.8k]
  ------------------
 4830|      0|    if (add->len.max > 0) {
  ------------------
  |  Branch (4830:9): [True: 0, False: 0]
  ------------------
 4831|      0|      if (to->expr.len > (int )add->len.max)
  ------------------
  |  Branch (4831:11): [True: 0, False: 0]
  ------------------
 4832|      0|	to->expr.len = (int )add->len.max;
 4833|       |
 4834|      0|      if (to->expr.mmd.max == 0)
  ------------------
  |  Branch (4834:11): [True: 0, False: 0]
  ------------------
 4835|      0|	select_opt_exact_info(enc, &to->exb, &to->expr);
 4836|      0|      else
 4837|      0|	select_opt_exact_info(enc, &to->exm, &to->expr);
 4838|      0|    }
 4839|      0|  }
 4840|  40.8k|  else if (add->expr.len > 0) {
  ------------------
  |  Branch (4840:12): [True: 0, False: 40.8k]
  ------------------
 4841|      0|    copy_opt_exact_info(&to->expr, &add->expr);
 4842|      0|  }
 4843|       |
 4844|  40.8k|  select_opt_map_info(&to->map, &add->map);
 4845|       |
 4846|  40.8k|  add_mml(&to->len, &add->len);
 4847|  40.8k|}
regcomp.c:concat_opt_anc_info:
 4441|  43.7k|{
 4442|  43.7k|  clear_opt_anc_info(to);
 4443|       |
 4444|  43.7k|  to->left_anchor = left->left_anchor;
 4445|  43.7k|  if (left_len == 0) {
  ------------------
  |  Branch (4445:7): [True: 21.0k, False: 22.7k]
  ------------------
 4446|  21.0k|    to->left_anchor |= right->left_anchor;
 4447|  21.0k|  }
 4448|       |
 4449|  43.7k|  to->right_anchor = right->right_anchor;
 4450|  43.7k|  if (right_len == 0) {
  ------------------
  |  Branch (4450:7): [True: 12.3k, False: 31.3k]
  ------------------
 4451|  12.3k|    to->right_anchor |= left->right_anchor;
 4452|  12.3k|  }
 4453|  31.3k|  else {
 4454|  31.3k|    to->right_anchor |= (left->right_anchor & ANCHOR_PREC_READ_NOT);
  ------------------
  |  |  552|  31.3k|#define ANCHOR_PREC_READ_NOT    (1<<11)
  ------------------
 4455|  31.3k|  }
 4456|  43.7k|}
regcomp.c:copy_opt_anc_info:
 4434|  43.7k|{
 4435|  43.7k|  *to = *from;
 4436|  43.7k|}
regcomp.c:select_opt_map_info:
 4708|  40.8k|{
 4709|  40.8k|  const int z = 1<<15; /* 32768: something big value */
 4710|       |
 4711|  40.8k|  int v1, v2;
 4712|       |
 4713|  40.8k|  if (alt->value == 0) return ;
  ------------------
  |  Branch (4713:7): [True: 21.8k, False: 18.9k]
  ------------------
 4714|  18.9k|  if (now->value == 0) {
  ------------------
  |  Branch (4714:7): [True: 8.67k, False: 10.3k]
  ------------------
 4715|  8.67k|    copy_opt_map_info(now, alt);
 4716|  8.67k|    return ;
 4717|  8.67k|  }
 4718|       |
 4719|  10.3k|  v1 = z / now->value;
 4720|  10.3k|  v2 = z / alt->value;
 4721|  10.3k|  if (comp_distance_value(&now->mmd, &alt->mmd, v1, v2) > 0)
  ------------------
  |  Branch (4721:7): [True: 0, False: 10.3k]
  ------------------
 4722|      0|    copy_opt_map_info(now, alt);
 4723|  10.3k|}
regcomp.c:comp_distance_value:
 4354|  20.6k|{
 4355|  20.6k|  if (v2 <= 0) return -1;
  ------------------
  |  Branch (4355:7): [True: 0, False: 20.6k]
  ------------------
 4356|  20.6k|  if (v1 <= 0) return  1;
  ------------------
  |  Branch (4356:7): [True: 0, False: 20.6k]
  ------------------
 4357|       |
 4358|  20.6k|  v1 *= distance_value(d1);
 4359|  20.6k|  v2 *= distance_value(d2);
 4360|       |
 4361|  20.6k|  if (v2 > v1) return  1;
  ------------------
  |  Branch (4361:7): [True: 1.65k, False: 18.9k]
  ------------------
 4362|  18.9k|  if (v2 < v1) return -1;
  ------------------
  |  Branch (4362:7): [True: 9.08k, False: 9.91k]
  ------------------
 4363|       |
 4364|  9.91k|  if (d2->min < d1->min) return  1;
  ------------------
  |  Branch (4364:7): [True: 413, False: 9.49k]
  ------------------
 4365|  9.49k|  if (d2->min > d1->min) return -1;
  ------------------
  |  Branch (4365:7): [True: 7.43k, False: 2.06k]
  ------------------
 4366|  2.06k|  return 0;
 4367|  9.49k|}
regcomp.c:distance_value:
 4325|  41.3k|{
 4326|       |  /* 1000 / (min-max-dist + 1) */
 4327|  41.3k|  static const short int dist_vals[] = {
 4328|  41.3k|    1000,  500,  333,  250,  200,  167,  143,  125,  111,  100,
 4329|  41.3k|      91,   83,   77,   71,   67,   63,   59,   56,   53,   50,
 4330|  41.3k|      48,   45,   43,   42,   40,   38,   37,   36,   34,   33,
 4331|  41.3k|      32,   31,   30,   29,   29,   28,   27,   26,   26,   25,
 4332|  41.3k|      24,   24,   23,   23,   22,   22,   21,   21,   20,   20,
 4333|  41.3k|      20,   19,   19,   19,   18,   18,   18,   17,   17,   17,
 4334|  41.3k|      16,   16,   16,   16,   15,   15,   15,   15,   14,   14,
 4335|  41.3k|      14,   14,   14,   14,   13,   13,   13,   13,   13,   13,
 4336|  41.3k|      12,   12,   12,   12,   12,   12,   11,   11,   11,   11,
 4337|  41.3k|      11,   11,   11,   11,   11,   10,   10,   10,   10,   10
 4338|  41.3k|  };
 4339|       |
 4340|  41.3k|  OnigDistance d;
 4341|       |
 4342|  41.3k|  if (mm->max == ONIG_INFINITE_DISTANCE) return 0;
  ------------------
  |  |   85|  41.3k|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
  |  Branch (4342:7): [True: 26.0k, False: 15.2k]
  ------------------
 4343|       |
 4344|  15.2k|  d = mm->max - mm->min;
 4345|  15.2k|  if (d < numberof(dist_vals))
  ------------------
  |  |  129|  15.2k|# define numberof(array) (int )(sizeof(array) / sizeof((array)[0]))
  ------------------
  |  Branch (4345:7): [True: 15.2k, False: 0]
  ------------------
 4346|       |    /* return dist_vals[d] * 16 / (mm->min + 12); */
 4347|  15.2k|    return (int )dist_vals[d];
 4348|      0|  else
 4349|      0|    return 1;
 4350|  15.2k|}
regcomp.c:copy_node_opt_info:
 4786|  9.91k|{
 4787|  9.91k|  *to = *from;
 4788|  9.91k|}
regcomp.c:alt_merge_node_opt_info:
 4851|  3.30k|{
 4852|  3.30k|  alt_merge_opt_anc_info  (&to->anc,  &add->anc);
 4853|  3.30k|  alt_merge_opt_exact_info(&to->exb,  &add->exb, env);
 4854|  3.30k|  alt_merge_opt_exact_info(&to->exm,  &add->exm, env);
 4855|  3.30k|  alt_merge_opt_exact_info(&to->expr, &add->expr, env);
 4856|  3.30k|  alt_merge_opt_map_info(env->enc, &to->map,  &add->map);
 4857|       |
 4858|  3.30k|  alt_merge_mml(&to->len, &add->len);
 4859|  3.30k|}
regcomp.c:alt_merge_opt_anc_info:
 4497|  9.08k|{
 4498|  9.08k|  to->left_anchor  &= add->left_anchor;
 4499|  9.08k|  to->right_anchor &= add->right_anchor;
 4500|  9.08k|}
regcomp.c:alt_merge_opt_exact_info:
 4573|  9.91k|{
 4574|  9.91k|  int i, j, len;
 4575|       |
 4576|  9.91k|  if (add->len == 0 || to->len == 0) {
  ------------------
  |  Branch (4576:7): [True: 6.60k, False: 3.30k]
  |  Branch (4576:24): [True: 413, False: 2.89k]
  ------------------
 4577|  7.02k|    clear_opt_exact_info(to);
 4578|  7.02k|    return ;
 4579|  7.02k|  }
 4580|       |
 4581|  2.89k|  if (! is_equal_mml(&to->mmd, &add->mmd)) {
  ------------------
  |  Branch (4581:7): [True: 413, False: 2.47k]
  ------------------
 4582|    413|    clear_opt_exact_info(to);
 4583|    413|    return ;
 4584|    413|  }
 4585|       |
 4586|  4.13k|  for (i = 0; i < to->len && i < add->len; ) {
  ------------------
  |  Branch (4586:15): [True: 4.13k, False: 0]
  |  Branch (4586:30): [True: 4.13k, False: 0]
  ------------------
 4587|  4.13k|    if (to->s[i] != add->s[i]) break;
  ------------------
  |  Branch (4587:9): [True: 2.47k, False: 1.65k]
  ------------------
 4588|  1.65k|    len = enclen(env->enc, to->s + i, to->s + to->len);
  ------------------
  |  |   93|  1.65k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|  1.65k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
 4589|       |
 4590|  1.65k|    for (j = 1; j < len; j++) {
  ------------------
  |  Branch (4590:17): [True: 0, False: 1.65k]
  ------------------
 4591|      0|      if (to->s[i+j] != add->s[i+j]) break;
  ------------------
  |  Branch (4591:11): [True: 0, False: 0]
  ------------------
 4592|      0|    }
 4593|  1.65k|    if (j < len) break;
  ------------------
  |  Branch (4593:9): [True: 0, False: 1.65k]
  ------------------
 4594|  1.65k|    i += len;
 4595|  1.65k|  }
 4596|       |
 4597|  2.47k|  if (! add->reach_end || i < add->len || i < to->len) {
  ------------------
  |  Branch (4597:7): [True: 0, False: 2.47k]
  |  Branch (4597:27): [True: 2.47k, False: 0]
  |  Branch (4597:43): [True: 0, False: 0]
  ------------------
 4598|  2.47k|    to->reach_end = 0;
 4599|  2.47k|  }
 4600|  2.47k|  to->len = i;
 4601|  2.47k|  if (to->ignore_case < 0)
  ------------------
  |  Branch (4601:7): [True: 0, False: 2.47k]
  ------------------
 4602|      0|    to->ignore_case = add->ignore_case;
 4603|  2.47k|  else if (add->ignore_case >= 0)
  ------------------
  |  Branch (4603:12): [True: 2.47k, False: 0]
  ------------------
 4604|  2.47k|    to->ignore_case |= add->ignore_case;
 4605|       |
 4606|  2.47k|  alt_merge_opt_anc_info(&to->anc, &add->anc);
 4607|  2.47k|  if (! to->reach_end) to->anc.right_anchor = 0;
  ------------------
  |  Branch (4607:7): [True: 2.47k, False: 0]
  ------------------
 4608|  2.47k|}
regcomp.c:is_equal_mml:
 4371|  2.89k|{
 4372|  2.89k|  return (a->min == b->min && a->max == b->max) ? 1 : 0;
  ------------------
  |  Branch (4372:11): [True: 2.47k, False: 413]
  |  Branch (4372:31): [True: 2.47k, False: 0]
  ------------------
 4373|  2.89k|}
regcomp.c:alt_merge_opt_map_info:
 4740|  3.30k|{
 4741|  3.30k|  int i, val;
 4742|       |
 4743|       |  /* if (! is_equal_mml(&to->mmd, &add->mmd)) return ; */
 4744|  3.30k|  if (to->value == 0) return ;
  ------------------
  |  Branch (4744:7): [True: 0, False: 3.30k]
  ------------------
 4745|  3.30k|  if (add->value == 0 || to->mmd.max < add->mmd.min) {
  ------------------
  |  Branch (4745:7): [True: 0, False: 3.30k]
  |  Branch (4745:26): [True: 0, False: 3.30k]
  ------------------
 4746|      0|    clear_opt_map_info(to);
 4747|      0|    return ;
 4748|      0|  }
 4749|       |
 4750|  3.30k|  alt_merge_mml(&to->mmd, &add->mmd);
 4751|       |
 4752|  3.30k|  val = 0;
 4753|   849k|  for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) {
  ------------------
  |  |  756|   849k|#define ONIG_CHAR_TABLE_SIZE   256
  ------------------
  |  Branch (4753:15): [True: 845k, False: 3.30k]
  ------------------
 4754|   845k|    if (add->map[i])
  ------------------
  |  Branch (4754:9): [True: 3.30k, False: 842k]
  ------------------
 4755|  3.30k|      to->map[i] = 1;
 4756|       |
 4757|   845k|    if (to->map[i])
  ------------------
  |  Branch (4757:9): [True: 6.19k, False: 839k]
  ------------------
 4758|  6.19k|      val += map_position_value(enc, i);
 4759|   845k|  }
 4760|  3.30k|  to->value = val;
 4761|       |
 4762|  3.30k|  alt_merge_opt_anc_info(&to->anc, &add->anc);
 4763|  3.30k|}
regcomp.c:map_position_value:
 4301|  61.1k|{
 4302|  61.1k|  static const short int ByteValTable[] = {
 4303|  61.1k|     5,  1,  1,  1,  1,  1,  1,  1,  1, 10, 10,  1,  1, 10,  1,  1,
 4304|  61.1k|     1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
 4305|  61.1k|    12,  4,  7,  4,  4,  4,  4,  4,  4,  5,  5,  5,  5,  5,  5,  5,
 4306|  61.1k|     6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  5,  5,  5,  5,  5,  5,
 4307|  61.1k|     5,  6,  6,  6,  6,  7,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,
 4308|  61.1k|     6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  5,  6,  5,  5,  5,
 4309|  61.1k|     5,  6,  6,  6,  6,  7,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,
 4310|  61.1k|     6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  5,  5,  5,  5,  1
 4311|  61.1k|  };
 4312|       |
 4313|  61.1k|  if (i < numberof(ByteValTable)) {
  ------------------
  |  |  129|  61.1k|# define numberof(array) (int )(sizeof(array) / sizeof((array)[0]))
  ------------------
  |  Branch (4313:7): [True: 61.1k, False: 0]
  ------------------
 4314|  61.1k|    if (i == 0 && ONIGENC_MBC_MINLEN(enc) > 1)
  ------------------
  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  ------------------
  |  Branch (4314:9): [True: 0, False: 61.1k]
  |  Branch (4314:19): [True: 0, False: 0]
  ------------------
 4315|      0|      return 20;
 4316|  61.1k|    else
 4317|  61.1k|      return (int )ByteValTable[i];
 4318|  61.1k|  }
 4319|      0|  else
 4320|      0|    return 4;   /* Take it easy. */
 4321|  61.1k|}
regcomp.c:alt_merge_mml:
 4414|  6.60k|{
 4415|  6.60k|  if (to->min > from->min) to->min = from->min;
  ------------------
  |  Branch (4415:7): [True: 826, False: 5.78k]
  ------------------
 4416|  6.60k|  if (to->max < from->max) to->max = from->max;
  ------------------
  |  Branch (4416:7): [True: 1.23k, False: 5.36k]
  ------------------
 4417|  6.60k|}
regcomp.c:concat_opt_exact_info_str:
 4557|  17.7k|{
 4558|  17.7k|  int i, j, len;
 4559|  17.7k|  UChar *p;
  ------------------
  |  |   76|  17.7k|# define UChar OnigUChar
  ------------------
 4560|       |
 4561|   146k|  for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) {
  ------------------
  |  |   89|   130k|#define OPT_EXACT_MAXLEN   24	/* This must be smaller than ONIG_CHAR_TABLE_SIZE. */
  ------------------
  |  Branch (4561:28): [True: 130k, False: 16.1k]
  |  Branch (4561:39): [True: 128k, False: 1.65k]
  ------------------
 4562|   128k|    len = enclen(enc, p, end);
  ------------------
  |  |   93|   128k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|   128k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 128k]
  |  |  ------------------
  ------------------
 4563|   128k|    if (i + len > OPT_EXACT_MAXLEN) break;
  ------------------
  |  |   89|   128k|#define OPT_EXACT_MAXLEN   24	/* This must be smaller than ONIG_CHAR_TABLE_SIZE. */
  ------------------
  |  Branch (4563:9): [True: 0, False: 128k]
  ------------------
 4564|   257k|    for (j = 0; j < len && p < end; j++)
  ------------------
  |  Branch (4564:17): [True: 128k, False: 128k]
  |  Branch (4564:28): [True: 128k, False: 0]
  ------------------
 4565|   128k|      to->s[i++] = *p++;
 4566|   128k|  }
 4567|       |
 4568|  17.7k|  to->len = i;
 4569|  17.7k|}
regcomp.c:add_char_opt_map_info:
 4677|  54.1k|{
 4678|  54.1k|  if (map->map[c] == 0) {
  ------------------
  |  Branch (4678:7): [True: 54.1k, False: 0]
  ------------------
 4679|  54.1k|    map->map[c] = 1;
 4680|  54.1k|    map->value += map_position_value(enc, c);
 4681|  54.1k|  }
 4682|  54.1k|}
regcomp.c:set_mml:
 4378|  44.1k|{
 4379|  44.1k|  mml->min = min;
 4380|  44.1k|  mml->max = max;
 4381|  44.1k|}
regcomp.c:add_opt_anc_info:
 4479|  11.5k|{
 4480|  11.5k|  if (is_left_anchor(anc))
  ------------------
  |  Branch (4480:7): [True: 8.26k, False: 3.30k]
  ------------------
 4481|  8.26k|    to->left_anchor |= anc;
 4482|  3.30k|  else
 4483|  3.30k|    to->right_anchor |= anc;
 4484|  11.5k|}
regcomp.c:is_left_anchor:
 4460|  11.5k|{
 4461|  11.5k|  if (anc == ANCHOR_END_BUF || anc == ANCHOR_SEMI_END_BUF ||
  ------------------
  |  |  543|  23.1k|#define ANCHOR_END_BUF          (1<<3)
  ------------------
                if (anc == ANCHOR_END_BUF || anc == ANCHOR_SEMI_END_BUF ||
  ------------------
  |  |  544|  23.1k|#define ANCHOR_SEMI_END_BUF     (1<<4)
  ------------------
  |  Branch (4461:7): [True: 0, False: 11.5k]
  |  Branch (4461:32): [True: 0, False: 11.5k]
  ------------------
 4462|  11.5k|      anc == ANCHOR_END_LINE || anc == ANCHOR_PREC_READ ||
  ------------------
  |  |  545|  23.1k|#define ANCHOR_END_LINE         (1<<5)
  ------------------
                    anc == ANCHOR_END_LINE || anc == ANCHOR_PREC_READ ||
  ------------------
  |  |  551|  19.8k|#define ANCHOR_PREC_READ        (1<<10)
  ------------------
  |  Branch (4462:7): [True: 3.30k, False: 8.26k]
  |  Branch (4462:33): [True: 0, False: 8.26k]
  ------------------
 4463|  11.5k|      anc == ANCHOR_PREC_READ_NOT)
  ------------------
  |  |  552|  8.26k|#define ANCHOR_PREC_READ_NOT    (1<<11)
  ------------------
  |  Branch (4463:7): [True: 0, False: 8.26k]
  ------------------
 4464|  3.30k|    return 0;
 4465|       |
 4466|  8.26k|  return 1;
 4467|  11.5k|}
regcomp.c:copy_opt_exact_info:
 4521|  14.0k|{
 4522|  14.0k|  *to = *from;
 4523|  14.0k|}
regcomp.c:copy_opt_map_info:
 4671|  8.67k|{
 4672|  8.67k|  *to = *from;
 4673|  8.67k|}
regcomp.c:concat_opt_exact_info:
 4527|    413|{
 4528|    413|  int i, j, len;
 4529|    413|  UChar *p, *end;
  ------------------
  |  |   76|    413|# define UChar OnigUChar
  ------------------
 4530|    413|  OptAncInfo tanc;
 4531|       |
 4532|    413|  if (to->ignore_case < 0)
  ------------------
  |  Branch (4532:7): [True: 0, False: 413]
  ------------------
 4533|      0|    to->ignore_case = add->ignore_case;
 4534|    413|  else if (to->ignore_case != add->ignore_case)
  ------------------
  |  Branch (4534:12): [True: 0, False: 413]
  ------------------
 4535|      0|    return ;  /* avoid */
 4536|       |
 4537|    413|  p = add->s;
 4538|    413|  end = p + add->len;
 4539|  1.65k|  for (i = to->len; p < end; ) {
  ------------------
  |  Branch (4539:21): [True: 1.23k, False: 413]
  ------------------
 4540|  1.23k|    len = enclen(enc, p, end);
  ------------------
  |  |   93|  1.23k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|  1.23k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
 4541|  1.23k|    if (i + len > OPT_EXACT_MAXLEN) break;
  ------------------
  |  |   89|  1.23k|#define OPT_EXACT_MAXLEN   24	/* This must be smaller than ONIG_CHAR_TABLE_SIZE. */
  ------------------
  |  Branch (4541:9): [True: 0, False: 1.23k]
  ------------------
 4542|  2.47k|    for (j = 0; j < len && p < end; j++)
  ------------------
  |  Branch (4542:17): [True: 1.23k, False: 1.23k]
  |  Branch (4542:28): [True: 1.23k, False: 0]
  ------------------
 4543|  1.23k|      to->s[i++] = *p++;
 4544|  1.23k|  }
 4545|       |
 4546|    413|  to->len = i;
 4547|    413|  to->reach_end = (p == end ? add->reach_end : 0);
  ------------------
  |  Branch (4547:20): [True: 413, False: 0]
  ------------------
 4548|       |
 4549|    413|  concat_opt_anc_info(&tanc, &to->anc, &add->anc, 1, 1);
 4550|    413|  if (! to->reach_end) tanc.right_anchor = 0;
  ------------------
  |  Branch (4550:7): [True: 413, False: 0]
  ------------------
 4551|    413|  copy_opt_anc_info(&to->anc, &tanc);
 4552|    413|}
regcomp.c:is_set_opt_anc_info:
 4471|  2.06k|{
 4472|  2.06k|  if ((to->left_anchor & anc) != 0) return 1;
  ------------------
  |  Branch (4472:7): [True: 0, False: 2.06k]
  ------------------
 4473|       |
 4474|  2.06k|  return ((to->right_anchor & anc) != 0 ? 1 : 0);
  ------------------
  |  Branch (4474:11): [True: 0, False: 2.06k]
  ------------------
 4475|  2.06k|}
regcomp.c:select_opt_exact_info:
 4612|  88.3k|{
 4613|  88.3k|  int v1, v2;
 4614|       |
 4615|  88.3k|  v1 = now->len;
 4616|  88.3k|  v2 = alt->len;
 4617|       |
 4618|  88.3k|  if (v2 == 0) {
  ------------------
  |  Branch (4618:7): [True: 70.6k, False: 17.7k]
  ------------------
 4619|  70.6k|    return ;
 4620|  70.6k|  }
 4621|  17.7k|  else if (v1 == 0) {
  ------------------
  |  Branch (4621:12): [True: 14.0k, False: 3.71k]
  ------------------
 4622|  14.0k|    copy_opt_exact_info(now, alt);
 4623|  14.0k|    return ;
 4624|  14.0k|  }
 4625|  3.71k|  else if (v1 <= 2 && v2 <= 2) {
  ------------------
  |  Branch (4625:12): [True: 826, False: 2.89k]
  |  Branch (4625:23): [True: 413, False: 413]
  ------------------
 4626|       |    /* ByteValTable[x] is big value --> low price */
 4627|    413|    v2 = map_position_value(enc, now->s[0]);
 4628|    413|    v1 = map_position_value(enc, alt->s[0]);
 4629|       |
 4630|    413|    if (now->len > 1) v1 += 5;
  ------------------
  |  Branch (4630:9): [True: 0, False: 413]
  ------------------
 4631|    413|    if (alt->len > 1) v2 += 5;
  ------------------
  |  Branch (4631:9): [True: 0, False: 413]
  ------------------
 4632|    413|  }
 4633|       |
 4634|  3.71k|  if (now->ignore_case <= 0) v1 *= 2;
  ------------------
  |  Branch (4634:7): [True: 3.71k, False: 0]
  ------------------
 4635|  3.71k|  if (alt->ignore_case <= 0) v2 *= 2;
  ------------------
  |  Branch (4635:7): [True: 3.71k, False: 0]
  ------------------
 4636|       |
 4637|  3.71k|  if (comp_distance_value(&now->mmd, &alt->mmd, v1, v2) > 0)
  ------------------
  |  Branch (4637:7): [True: 0, False: 3.71k]
  ------------------
 4638|      0|    copy_opt_exact_info(now, alt);
 4639|  3.71k|}
regcomp.c:comp_opt_exact_or_map_info:
 4727|  6.60k|{
 4728|  6.60k|#define COMP_EM_BASE  20
 4729|  6.60k|  int ve, vm;
 4730|       |
 4731|  6.60k|  if (m->value <= 0) return -1;
  ------------------
  |  Branch (4731:7): [True: 0, False: 6.60k]
  ------------------
 4732|       |
 4733|  6.60k|  ve = COMP_EM_BASE * e->len * (e->ignore_case > 0 ? 1 : 2);
  ------------------
  |  | 4728|  6.60k|#define COMP_EM_BASE  20
  ------------------
  |  Branch (4733:33): [True: 0, False: 6.60k]
  ------------------
 4734|  6.60k|  vm = COMP_EM_BASE * 5 * 2 / m->value;
  ------------------
  |  | 4728|  6.60k|#define COMP_EM_BASE  20
  ------------------
 4735|  6.60k|  return comp_distance_value(&e->mmd, &m->mmd, ve, vm);
 4736|  6.60k|}
regcomp.c:set_optimize_exact_info:
 5219|  4.54k|{
 5220|  4.54k|  int allow_reverse;
 5221|       |
 5222|  4.54k|  if (e->len == 0) return 0;
  ------------------
  |  Branch (5222:7): [True: 0, False: 4.54k]
  ------------------
 5223|       |
 5224|  4.54k|  reg->exact = (UChar* )xmalloc(e->len);
  ------------------
  |  |  142|  4.54k|# define xmalloc     malloc
  ------------------
 5225|  4.54k|  CHECK_NULL_RETURN_MEMERR(reg->exact);
  ------------------
  |  |  314|  4.54k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  4.54k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 4.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 5226|  4.54k|  xmemcpy(reg->exact, e->s, e->len);
  ------------------
  |  |  215|  4.54k|#define xmemcpy     memcpy
  ------------------
 5227|  4.54k|  reg->exact_end = reg->exact + e->len;
 5228|       |
 5229|  4.54k|  allow_reverse =
 5230|  4.54k|	ONIGENC_IS_ALLOWED_REVERSE_MATCH(reg->enc, reg->exact, reg->exact_end);
  ------------------
  |  |  335|  4.54k|        (enc)->is_allowed_reverse_match(s,end,enc)
  ------------------
 5231|       |
 5232|  4.54k|  if (e->ignore_case > 0) {
  ------------------
  |  Branch (5232:7): [True: 0, False: 4.54k]
  ------------------
 5233|      0|    if (e->len >= 3 || (e->len >= 2 && allow_reverse)) {
  ------------------
  |  Branch (5233:9): [True: 0, False: 0]
  |  Branch (5233:25): [True: 0, False: 0]
  |  Branch (5233:40): [True: 0, False: 0]
  ------------------
 5234|      0|      e->len = set_bm_skip(reg->exact, reg->exact_end, reg,
 5235|      0|		      reg->map, 1);
 5236|      0|      reg->exact_end = reg->exact + e->len;
 5237|      0|      if (e->len >= 3) {
  ------------------
  |  Branch (5237:11): [True: 0, False: 0]
  ------------------
 5238|      0|	reg->optimize = (allow_reverse != 0
  ------------------
  |  Branch (5238:19): [True: 0, False: 0]
  ------------------
 5239|      0|			 ? ONIG_OPTIMIZE_EXACT_BM_IC : ONIG_OPTIMIZE_EXACT_BM_NOT_REV_IC);
  ------------------
  |  |  361|      0|#define ONIG_OPTIMIZE_EXACT_BM_IC         6 /* BM (ignore case) */
  ------------------
              			 ? ONIG_OPTIMIZE_EXACT_BM_IC : ONIG_OPTIMIZE_EXACT_BM_NOT_REV_IC);
  ------------------
  |  |  362|      0|#define ONIG_OPTIMIZE_EXACT_BM_NOT_REV_IC 7 /* BM (applied to a multibyte string) (ignore case) */
  ------------------
 5240|      0|      }
 5241|      0|      else if (e->len > 0) {
  ------------------
  |  Branch (5241:16): [True: 0, False: 0]
  ------------------
 5242|      0|	reg->optimize = ONIG_OPTIMIZE_EXACT_IC;
  ------------------
  |  |  359|      0|#define ONIG_OPTIMIZE_EXACT_IC          4   /* Slow Search (ignore case) */
  ------------------
 5243|      0|      }
 5244|      0|      else
 5245|      0|	return 0;
 5246|      0|    }
 5247|      0|    else {
 5248|      0|      reg->optimize = ONIG_OPTIMIZE_EXACT_IC;
  ------------------
  |  |  359|      0|#define ONIG_OPTIMIZE_EXACT_IC          4   /* Slow Search (ignore case) */
  ------------------
 5249|      0|    }
 5250|      0|  }
 5251|  4.54k|  else {
 5252|  4.54k|    if (e->len >= 3 || (e->len >= 2 && allow_reverse)) {
  ------------------
  |  Branch (5252:9): [True: 3.30k, False: 1.23k]
  |  Branch (5252:25): [True: 0, False: 1.23k]
  |  Branch (5252:40): [True: 0, False: 0]
  ------------------
 5253|  3.30k|      set_bm_skip(reg->exact, reg->exact_end, reg,
 5254|  3.30k|		  reg->map, 0);
 5255|  3.30k|      reg->optimize = (allow_reverse != 0
  ------------------
  |  Branch (5255:24): [True: 3.30k, False: 0]
  ------------------
 5256|  3.30k|		     ? ONIG_OPTIMIZE_EXACT_BM : ONIG_OPTIMIZE_EXACT_BM_NOT_REV);
  ------------------
  |  |  357|  3.30k|#define ONIG_OPTIMIZE_EXACT_BM          2   /* Boyer Moore Search */
  ------------------
              		     ? ONIG_OPTIMIZE_EXACT_BM : ONIG_OPTIMIZE_EXACT_BM_NOT_REV);
  ------------------
  |  |  358|      0|#define ONIG_OPTIMIZE_EXACT_BM_NOT_REV  3   /* BM (applied to a multibyte string) */
  ------------------
 5257|  3.30k|    }
 5258|  1.23k|    else {
 5259|  1.23k|      reg->optimize = ONIG_OPTIMIZE_EXACT;
  ------------------
  |  |  356|  1.23k|#define ONIG_OPTIMIZE_EXACT             1   /* Slow Search */
  ------------------
 5260|  1.23k|    }
 5261|  4.54k|  }
 5262|       |
 5263|  4.54k|  reg->dmin = e->mmd.min;
 5264|  4.54k|  reg->dmax = e->mmd.max;
 5265|       |
 5266|  4.54k|  if (reg->dmin != ONIG_INFINITE_DISTANCE) {
  ------------------
  |  |   85|  4.54k|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
  |  Branch (5266:7): [True: 4.54k, False: 0]
  ------------------
 5267|  4.54k|    reg->threshold_len = (int )(reg->dmin + (reg->exact_end - reg->exact));
 5268|  4.54k|  }
 5269|       |
 5270|  4.54k|  return 0;
 5271|  4.54k|}
regcomp.c:set_bm_skip:
 4187|  3.30k|{
 4188|  3.30k|  OnigDistance i, len;
 4189|  3.30k|  int clen, flen, n, j, k;
 4190|  3.30k|  UChar *p, buf[ONIGENC_MBC_CASE_FOLD_MAXLEN];
  ------------------
  |  |   76|  3.30k|# define UChar OnigUChar
  ------------------
 4191|  3.30k|  OnigCaseFoldCodeItem items[ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM];
 4192|  3.30k|  OnigEncoding enc = reg->enc;
 4193|       |
 4194|  3.30k|  len = end - s;
 4195|  3.30k|  if (len >= ONIG_CHAR_TABLE_SIZE) {
  ------------------
  |  |  756|  3.30k|#define ONIG_CHAR_TABLE_SIZE   256
  ------------------
  |  Branch (4195:7): [True: 0, False: 3.30k]
  ------------------
 4196|       |    /* This should not happen. */
 4197|      0|    return ONIGERR_TYPE_BUG;
  ------------------
  |  |  633|      0|#define ONIGERR_TYPE_BUG                                       -6
  ------------------
 4198|      0|  }
 4199|       |
 4200|  3.30k|  if (ignore_case) {
  ------------------
  |  Branch (4200:7): [True: 0, False: 3.30k]
  ------------------
 4201|      0|    for (i = 0; i < len; i += clen) {
  ------------------
  |  Branch (4201:17): [True: 0, False: 0]
  ------------------
 4202|      0|      p = s + i;
 4203|      0|      n = ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc, reg->case_fold_flag,
  ------------------
  |  |  341|      0|       (enc)->get_case_fold_codes_by_str(case_fold_flag,p,end,acs,enc)
  ------------------
 4204|      0|	  p, end, items);
 4205|      0|      clen = enclen(enc, p, end);
  ------------------
  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4206|      0|      if (p + clen > end)
  ------------------
  |  Branch (4206:11): [True: 0, False: 0]
  ------------------
 4207|      0|	clen = (int )(end - p);
 4208|       |
 4209|      0|      for (j = 0; j < n; j++) {
  ------------------
  |  Branch (4209:19): [True: 0, False: 0]
  ------------------
 4210|      0|	if ((items[j].code_len != 1) || (items[j].byte_len != clen)) {
  ------------------
  |  Branch (4210:6): [True: 0, False: 0]
  |  Branch (4210:34): [True: 0, False: 0]
  ------------------
 4211|       |	  /* Different length isn't supported. Stop optimization at here. */
 4212|      0|	  end = p;
 4213|      0|	  goto endcheck;
 4214|      0|	}
 4215|      0|	flen = ONIGENC_CODE_TO_MBC(enc, items[j].code[0], buf);
  ------------------
  |  |  371|      0|#define ONIGENC_CODE_TO_MBC(enc,code,buf)      (enc)->code_to_mbc(code,buf,enc)
  ------------------
 4216|      0|	if (flen != clen) {
  ------------------
  |  Branch (4216:6): [True: 0, False: 0]
  ------------------
 4217|       |	  /* Different length isn't supported. Stop optimization at here. */
 4218|      0|	  end = p;
 4219|      0|	  goto endcheck;
 4220|      0|	}
 4221|      0|      }
 4222|      0|    }
 4223|      0|endcheck:
 4224|      0|    len = end - s;
 4225|      0|  }
 4226|       |
 4227|   849k|  for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++)
  ------------------
  |  |  756|   849k|#define ONIG_CHAR_TABLE_SIZE   256
  ------------------
  |  Branch (4227:15): [True: 845k, False: 3.30k]
  ------------------
 4228|   845k|    skip[i] = (UChar )(len + 1);
 4229|  3.30k|  n = 0;
 4230|  51.2k|  for (i = 0; i < len; i += clen) {
  ------------------
  |  Branch (4230:15): [True: 47.9k, False: 3.30k]
  ------------------
 4231|  47.9k|    p = s + i;
 4232|  47.9k|    if (ignore_case)
  ------------------
  |  Branch (4232:9): [True: 0, False: 47.9k]
  ------------------
 4233|      0|      n = ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc, reg->case_fold_flag,
  ------------------
  |  |  341|      0|       (enc)->get_case_fold_codes_by_str(case_fold_flag,p,end,acs,enc)
  ------------------
 4234|  47.9k|					     p, end, items);
 4235|  47.9k|    clen = enclen(enc, p, end);
  ------------------
  |  |   93|  47.9k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|  47.9k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 47.9k]
  |  |  ------------------
  ------------------
 4236|  47.9k|    if (p + clen > end)
  ------------------
  |  Branch (4236:9): [True: 0, False: 47.9k]
  ------------------
 4237|      0|      clen = (int )(end - p);
 4238|       |
 4239|  95.8k|    for (j = 0; j < clen; j++) {
  ------------------
  |  Branch (4239:17): [True: 47.9k, False: 47.9k]
  ------------------
 4240|  47.9k|      skip[s[i + j]] = (UChar )(len - i - j);
 4241|  47.9k|      for (k = 0; k < n; k++) {
  ------------------
  |  Branch (4241:19): [True: 0, False: 47.9k]
  ------------------
 4242|      0|	ONIGENC_CODE_TO_MBC(enc, items[k].code[0], buf);
  ------------------
  |  |  371|      0|#define ONIGENC_CODE_TO_MBC(enc,code,buf)      (enc)->code_to_mbc(code,buf,enc)
  ------------------
 4243|      0|	skip[buf[j]] = (UChar )(len - i - j);
 4244|      0|      }
 4245|  47.9k|    }
 4246|  47.9k|  }
 4247|       |
 4248|  3.30k|  return (int )len;
 4249|  3.30k|}
regcomp.c:set_sub_anchor:
 5292|  7.84k|{
 5293|  7.84k|  reg->sub_anchor |= anc->left_anchor  & ANCHOR_BEGIN_LINE;
  ------------------
  |  |  541|  7.84k|#define ANCHOR_BEGIN_LINE       (1<<1)
  ------------------
 5294|  7.84k|  reg->sub_anchor |= anc->right_anchor & ANCHOR_END_LINE;
  ------------------
  |  |  545|  7.84k|#define ANCHOR_END_LINE         (1<<5)
  ------------------
 5295|  7.84k|}
regcomp.c:set_optimize_map_info:
 5275|  3.30k|{
 5276|  3.30k|  int i;
 5277|       |
 5278|   849k|  for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++)
  ------------------
  |  |  756|   849k|#define ONIG_CHAR_TABLE_SIZE   256
  ------------------
  |  Branch (5278:15): [True: 845k, False: 3.30k]
  ------------------
 5279|   845k|    reg->map[i] = m->map[i];
 5280|       |
 5281|  3.30k|  reg->optimize   = ONIG_OPTIMIZE_MAP;
  ------------------
  |  |  360|  3.30k|#define ONIG_OPTIMIZE_MAP               5   /* char map */
  ------------------
 5282|  3.30k|  reg->dmin       = m->mmd.min;
 5283|  3.30k|  reg->dmax       = m->mmd.max;
 5284|       |
 5285|  3.30k|  if (reg->dmin != ONIG_INFINITE_DISTANCE) {
  ------------------
  |  |   85|  3.30k|#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
  ------------------
  |  Branch (5285:7): [True: 3.30k, False: 0]
  ------------------
 5286|  3.30k|    reg->threshold_len = (int )(reg->dmin + 1);
 5287|  3.30k|  }
 5288|  3.30k|}
regcomp.c:compile_tree:
 1688|  76.4k|{
 1689|  76.4k|  int n, type, len, pos, r = 0;
 1690|       |
 1691|  76.4k|  type = NTYPE(node);
  ------------------
  |  |   69|  76.4k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 1692|  76.4k|  switch (type) {
 1693|  9.91k|  case NT_LIST:
  ------------------
  |  |   46|  9.91k|#define NT_LIST        8
  ------------------
  |  Branch (1693:3): [True: 9.91k, False: 66.4k]
  ------------------
 1694|  40.8k|    do {
 1695|  40.8k|      r = compile_tree(NCAR(node), reg);
  ------------------
  |  |   86|  40.8k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  40.8k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1696|  40.8k|    } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
  ------------------
  |  |  312|  40.8k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 30.9k, False: 9.91k]
  |  |  ------------------
  ------------------
  |  Branch (1696:14): [True: 40.8k, False: 0]
  ------------------
 1697|  9.91k|    break;
 1698|       |
 1699|  2.47k|  case NT_ALT:
  ------------------
  |  |   47|  2.47k|#define NT_ALT         9
  ------------------
  |  Branch (1699:3): [True: 2.47k, False: 73.9k]
  ------------------
 1700|  2.47k|    {
 1701|  2.47k|      Node* x = node;
 1702|  2.47k|      len = 0;
 1703|  5.78k|      do {
 1704|  5.78k|	len += compile_length_tree(NCAR(x), reg);
  ------------------
  |  |   86|  5.78k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  5.78k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1705|  5.78k|	if (NCDR(x) != NULL) {
  ------------------
  |  |   87|  5.78k|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|  5.78k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
  |  Branch (1705:6): [True: 3.30k, False: 2.47k]
  ------------------
 1706|  3.30k|	  len += SIZE_OP_PUSH + SIZE_OP_JUMP;
  ------------------
  |  |  721|  3.30k|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  3.30k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  3.30k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
              	  len += SIZE_OP_PUSH + SIZE_OP_JUMP;
  ------------------
  |  |  720|  3.30k|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  3.30k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  3.30k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1707|  3.30k|	}
 1708|  5.78k|      } while (IS_NOT_NULL(x = NCDR(x)));
  ------------------
  |  |  312|  5.78k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 3.30k, False: 2.47k]
  |  |  ------------------
  ------------------
 1709|  2.47k|      pos = reg->used + len;  /* goal position */
 1710|       |
 1711|  5.78k|      do {
 1712|  5.78k|	len = compile_length_tree(NCAR(node), reg);
  ------------------
  |  |   86|  5.78k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  5.78k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1713|  5.78k|	if (IS_NOT_NULL(NCDR(node))) {
  ------------------
  |  |  312|  5.78k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 3.30k, False: 2.47k]
  |  |  ------------------
  ------------------
 1714|  3.30k|	  r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_JUMP);
  ------------------
  |  |  720|  3.30k|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  3.30k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  3.30k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1715|  3.30k|	  if (r) break;
  ------------------
  |  Branch (1715:8): [True: 0, False: 3.30k]
  ------------------
 1716|  3.30k|	}
 1717|  5.78k|	r = compile_tree(NCAR(node), reg);
  ------------------
  |  |   86|  5.78k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  5.78k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1718|  5.78k|	if (r) break;
  ------------------
  |  Branch (1718:6): [True: 0, False: 5.78k]
  ------------------
 1719|  5.78k|	if (IS_NOT_NULL(NCDR(node))) {
  ------------------
  |  |  312|  5.78k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 3.30k, False: 2.47k]
  |  |  ------------------
  ------------------
 1720|  3.30k|	  len = pos - (reg->used + SIZE_OP_JUMP);
  ------------------
  |  |  720|  3.30k|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  3.30k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  3.30k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1721|  3.30k|	  r = add_opcode_rel_addr(reg, OP_JUMP, len);
 1722|  3.30k|	  if (r) break;
  ------------------
  |  Branch (1722:8): [True: 0, False: 3.30k]
  ------------------
 1723|  3.30k|	}
 1724|  5.78k|      } while (IS_NOT_NULL(node = NCDR(node)));
  ------------------
  |  |  312|  5.78k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 3.30k, False: 2.47k]
  |  |  ------------------
  ------------------
 1725|  2.47k|    }
 1726|      0|    break;
 1727|       |
 1728|  17.7k|  case NT_STR:
  ------------------
  |  |   38|  17.7k|#define NT_STR         0
  ------------------
  |  Branch (1728:3): [True: 17.7k, False: 58.6k]
  ------------------
 1729|  17.7k|    if (NSTRING_IS_RAW(node))
  ------------------
  |  |  114|  17.7k|#define NSTRING_IS_RAW(node)          (((node)->u.str.flag & NSTR_RAW)   != 0)
  |  |  ------------------
  |  |  |  |  104|  17.7k|#define NSTR_RAW                (1<<0) /* by backslashed number */
  |  |  ------------------
  |  |  |  Branch (114:39): [True: 0, False: 17.7k]
  |  |  ------------------
  ------------------
 1730|      0|      r = compile_string_raw_node(NSTR(node), reg);
  ------------------
  |  |   76|      0|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1731|  17.7k|    else
 1732|  17.7k|      r = compile_string_node(node, reg);
 1733|  17.7k|    break;
 1734|       |
 1735|  16.5k|  case NT_CCLASS:
  ------------------
  |  |   39|  16.5k|#define NT_CCLASS      1
  ------------------
  |  Branch (1735:3): [True: 16.5k, False: 59.8k]
  ------------------
 1736|  16.5k|    r = compile_cclass_node(NCCLASS(node), reg);
  ------------------
  |  |   77|  16.5k|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 1737|  16.5k|    break;
 1738|       |
 1739|      0|  case NT_CTYPE:
  ------------------
  |  |   40|      0|#define NT_CTYPE       2
  ------------------
  |  Branch (1739:3): [True: 0, False: 76.4k]
  ------------------
 1740|      0|    {
 1741|      0|      int op;
 1742|       |
 1743|      0|      switch (NCTYPE(node)->ctype) {
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
 1744|      0|      case ONIGENC_CTYPE_WORD:
  ------------------
  |  |  306|      0|#define ONIGENC_CTYPE_WORD     12
  ------------------
  |  Branch (1744:7): [True: 0, False: 0]
  ------------------
 1745|      0|	if (NCTYPE(node)->ascii_range != 0) {
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
  |  Branch (1745:6): [True: 0, False: 0]
  ------------------
 1746|      0|	  if (NCTYPE(node)->not != 0)  op = OP_NOT_ASCII_WORD;
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
  |  Branch (1746:8): [True: 0, False: 0]
  ------------------
 1747|      0|	  else                         op = OP_ASCII_WORD;
 1748|      0|	}
 1749|      0|	else {
 1750|      0|	  if (NCTYPE(node)->not != 0)  op = OP_NOT_WORD;
  ------------------
  |  |   78|      0|#define NCTYPE(node)       (&((node)->u.ctype))
  ------------------
  |  Branch (1750:8): [True: 0, False: 0]
  ------------------
 1751|      0|	  else                         op = OP_WORD;
 1752|      0|	}
 1753|      0|	break;
 1754|      0|      default:
  ------------------
  |  Branch (1754:7): [True: 0, False: 0]
  ------------------
 1755|      0|	return ONIGERR_TYPE_BUG;
  ------------------
  |  |  633|      0|#define ONIGERR_TYPE_BUG                                       -6
  ------------------
 1756|      0|	break;
 1757|      0|      }
 1758|      0|      r = add_opcode(reg, op);
 1759|      0|    }
 1760|      0|    break;
 1761|       |
 1762|  2.89k|  case NT_CANY:
  ------------------
  |  |   41|  2.89k|#define NT_CANY        3
  ------------------
  |  Branch (1762:3): [True: 2.89k, False: 73.5k]
  ------------------
 1763|  2.89k|    if (IS_MULTILINE(reg->options))
  ------------------
  |  |  395|  2.89k|#define IS_MULTILINE(option)      ((option) & ONIG_OPTION_MULTILINE)
  |  |  ------------------
  |  |  |  |  456|  2.89k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  455|  2.89k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  454|  2.89k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (395:35): [True: 0, False: 2.89k]
  |  |  ------------------
  ------------------
 1764|      0|      r = add_opcode(reg, OP_ANYCHAR_ML);
 1765|  2.89k|    else
 1766|  2.89k|      r = add_opcode(reg, OP_ANYCHAR);
 1767|  2.89k|    break;
 1768|       |
 1769|      0|  case NT_BREF:
  ------------------
  |  |   42|      0|#define NT_BREF        4
  ------------------
  |  Branch (1769:3): [True: 0, False: 76.4k]
  ------------------
 1770|      0|    {
 1771|      0|      BRefNode* br = NBREF(node);
  ------------------
  |  |   79|      0|#define NBREF(node)        (&((node)->u.bref))
  ------------------
 1772|       |
 1773|      0|#ifdef USE_BACKREF_WITH_LEVEL
 1774|      0|      if (IS_BACKREF_NEST_LEVEL(br)) {
  ------------------
  |  |  164|      0|#define IS_BACKREF_NEST_LEVEL(bn)      (((bn)->state & NST_NEST_LEVEL) != 0)
  |  |  ------------------
  |  |  |  |  141|      0|#define NST_NEST_LEVEL            (1<<13)
  |  |  ------------------
  |  |  |  Branch (164:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1775|      0|	r = add_opcode(reg, OP_BACKREF_WITH_LEVEL);
 1776|      0|	if (r) return r;
  ------------------
  |  Branch (1776:6): [True: 0, False: 0]
  ------------------
 1777|      0|	r = add_option(reg, (reg->options & ONIG_OPTION_IGNORECASE));
  ------------------
  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  ------------------
 1778|      0|	if (r) return r;
  ------------------
  |  Branch (1778:6): [True: 0, False: 0]
  ------------------
 1779|      0|	r = add_length(reg, br->nest_level);
 1780|      0|	if (r) return r;
  ------------------
  |  Branch (1780:6): [True: 0, False: 0]
  ------------------
 1781|       |
 1782|      0|	goto add_bacref_mems;
 1783|      0|      }
 1784|      0|      else
 1785|      0|#endif
 1786|      0|      if (br->back_num == 1) {
  ------------------
  |  Branch (1786:11): [True: 0, False: 0]
  ------------------
 1787|      0|	n = br->back_static[0];
 1788|      0|	if (IS_IGNORECASE(reg->options)) {
  ------------------
  |  |  396|      0|#define IS_IGNORECASE(option)     ((option) & ONIG_OPTION_IGNORECASE)
  |  |  ------------------
  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  ------------------
  |  |  |  Branch (396:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1789|      0|	  r = add_opcode(reg, OP_BACKREFN_IC);
 1790|      0|	  if (r) return r;
  ------------------
  |  Branch (1790:8): [True: 0, False: 0]
  ------------------
 1791|      0|	  r = add_mem_num(reg, n);
 1792|      0|	}
 1793|      0|	else {
 1794|      0|	  switch (n) {
 1795|      0|	  case 1:  r = add_opcode(reg, OP_BACKREF1); break;
  ------------------
  |  Branch (1795:4): [True: 0, False: 0]
  ------------------
 1796|      0|	  case 2:  r = add_opcode(reg, OP_BACKREF2); break;
  ------------------
  |  Branch (1796:4): [True: 0, False: 0]
  ------------------
 1797|      0|	  default:
  ------------------
  |  Branch (1797:4): [True: 0, False: 0]
  ------------------
 1798|      0|	    r = add_opcode(reg, OP_BACKREFN);
 1799|      0|	    if (r) return r;
  ------------------
  |  Branch (1799:10): [True: 0, False: 0]
  ------------------
 1800|      0|	    r = add_mem_num(reg, n);
 1801|      0|	    break;
 1802|      0|	  }
 1803|      0|	}
 1804|      0|      }
 1805|      0|      else {
 1806|      0|	int i;
 1807|      0|	int* p;
 1808|       |
 1809|      0|	if (IS_IGNORECASE(reg->options)) {
  ------------------
  |  |  396|      0|#define IS_IGNORECASE(option)     ((option) & ONIG_OPTION_IGNORECASE)
  |  |  ------------------
  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  ------------------
  |  |  |  Branch (396:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1810|      0|	  r = add_opcode(reg, OP_BACKREF_MULTI_IC);
 1811|      0|	}
 1812|      0|	else {
 1813|      0|	  r = add_opcode(reg, OP_BACKREF_MULTI);
 1814|      0|	}
 1815|      0|	if (r) return r;
  ------------------
  |  Branch (1815:6): [True: 0, False: 0]
  ------------------
 1816|       |
 1817|      0|#ifdef USE_BACKREF_WITH_LEVEL
 1818|      0|      add_bacref_mems:
 1819|      0|#endif
 1820|      0|	r = add_length(reg, br->back_num);
 1821|      0|	if (r) return r;
  ------------------
  |  Branch (1821:6): [True: 0, False: 0]
  ------------------
 1822|      0|	p = BACKREFS_P(br);
  ------------------
  |  |  120|      0|  (IS_NOT_NULL((br)->back_dynamic) ? (br)->back_dynamic : (br)->back_static);
  |  |  ------------------
  |  |  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1823|      0|	for (i = br->back_num - 1; i >= 0; i--) {
  ------------------
  |  Branch (1823:29): [True: 0, False: 0]
  ------------------
 1824|      0|	  r = add_mem_num(reg, p[i]);
 1825|      0|	  if (r) return r;
  ------------------
  |  Branch (1825:8): [True: 0, False: 0]
  ------------------
 1826|      0|	}
 1827|      0|      }
 1828|      0|    }
 1829|      0|    break;
 1830|       |
 1831|      0|#ifdef USE_SUBEXP_CALL
 1832|      0|  case NT_CALL:
  ------------------
  |  |   48|      0|#define NT_CALL       10
  ------------------
  |  Branch (1832:3): [True: 0, False: 76.4k]
  ------------------
 1833|      0|    r = compile_call(NCALL(node), reg);
  ------------------
  |  |   84|      0|#define NCALL(node)        (&((node)->u.call))
  ------------------
 1834|      0|    break;
 1835|      0|#endif
 1836|       |
 1837|  7.02k|  case NT_QTFR:
  ------------------
  |  |   43|  7.02k|#define NT_QTFR        5
  ------------------
  |  Branch (1837:3): [True: 7.02k, False: 69.3k]
  ------------------
 1838|  7.02k|    r = compile_quantifier_node(NQTFR(node), reg);
  ------------------
  |  |   80|  7.02k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 1839|  7.02k|    break;
 1840|       |
 1841|  7.84k|  case NT_ENCLOSE:
  ------------------
  |  |   44|  7.84k|#define NT_ENCLOSE     6
  ------------------
  |  Branch (1841:3): [True: 7.84k, False: 68.5k]
  ------------------
 1842|  7.84k|    r = compile_enclose_node(NENCLOSE(node), reg);
  ------------------
  |  |   81|  7.84k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 1843|  7.84k|    break;
 1844|       |
 1845|  11.9k|  case NT_ANCHOR:
  ------------------
  |  |   45|  11.9k|#define NT_ANCHOR      7
  ------------------
  |  Branch (1845:3): [True: 11.9k, False: 64.4k]
  ------------------
 1846|  11.9k|    r = compile_anchor_node(NANCHOR(node), reg);
  ------------------
  |  |   82|  11.9k|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 1847|  11.9k|    break;
 1848|       |
 1849|      0|  default:
  ------------------
  |  Branch (1849:3): [True: 0, False: 76.4k]
  ------------------
 1850|       |#ifdef ONIG_DEBUG
 1851|       |    fprintf(stderr, "compile_tree: undefined node type %d\n", NTYPE(node));
 1852|       |#endif
 1853|      0|    break;
 1854|  76.4k|  }
 1855|       |
 1856|  76.4k|  return r;
 1857|  76.4k|}
regcomp.c:compile_length_tree:
 1593|  40.4k|{
 1594|  40.4k|  int len, type, r;
 1595|       |
 1596|  40.4k|  type = NTYPE(node);
  ------------------
  |  |   69|  40.4k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 1597|  40.4k|  switch (type) {
 1598|  3.30k|  case NT_LIST:
  ------------------
  |  |   46|  3.30k|#define NT_LIST        8
  ------------------
  |  Branch (1598:3): [True: 3.30k, False: 37.1k]
  ------------------
 1599|  3.30k|    len = 0;
 1600|  8.26k|    do {
 1601|  8.26k|      r = compile_length_tree(NCAR(node), reg);
  ------------------
  |  |   86|  8.26k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  8.26k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1602|  8.26k|      if (r < 0) return r;
  ------------------
  |  Branch (1602:11): [True: 0, False: 8.26k]
  ------------------
 1603|  8.26k|      len += r;
 1604|  8.26k|    } while (IS_NOT_NULL(node = NCDR(node)));
  ------------------
  |  |  312|  8.26k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 4.95k, False: 3.30k]
  |  |  ------------------
  ------------------
 1605|  3.30k|    r = len;
 1606|  3.30k|    break;
 1607|       |
 1608|      0|  case NT_ALT:
  ------------------
  |  |   47|      0|#define NT_ALT         9
  ------------------
  |  Branch (1608:3): [True: 0, False: 40.4k]
  ------------------
 1609|      0|    {
 1610|      0|      int n = 0;
 1611|      0|      len = 0;
 1612|      0|      do {
 1613|      0|	r = compile_length_tree(NCAR(node), reg);
  ------------------
  |  |   86|      0|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1614|      0|	if (r < 0) return r;
  ------------------
  |  Branch (1614:6): [True: 0, False: 0]
  ------------------
 1615|      0|	len += r;
 1616|      0|	n++;
 1617|      0|      } while (IS_NOT_NULL(node = NCDR(node)));
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1618|      0|      r = len;
 1619|      0|      r += (SIZE_OP_PUSH + SIZE_OP_JUMP) * (n - 1);
  ------------------
  |  |  721|      0|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
                    r += (SIZE_OP_PUSH + SIZE_OP_JUMP) * (n - 1);
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1620|      0|    }
 1621|      0|    break;
 1622|       |
 1623|  13.6k|  case NT_STR:
  ------------------
  |  |   38|  13.6k|#define NT_STR         0
  ------------------
  |  Branch (1623:3): [True: 13.6k, False: 26.8k]
  ------------------
 1624|  13.6k|    if (NSTRING_IS_RAW(node))
  ------------------
  |  |  114|  13.6k|#define NSTRING_IS_RAW(node)          (((node)->u.str.flag & NSTR_RAW)   != 0)
  |  |  ------------------
  |  |  |  |  104|  13.6k|#define NSTR_RAW                (1<<0) /* by backslashed number */
  |  |  ------------------
  |  |  |  Branch (114:39): [True: 0, False: 13.6k]
  |  |  ------------------
  ------------------
 1625|      0|      r = compile_length_string_raw_node(NSTR(node), reg);
  ------------------
  |  |   76|      0|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1626|  13.6k|    else
 1627|  13.6k|      r = compile_length_string_node(node, reg);
 1628|  13.6k|    break;
 1629|       |
 1630|  13.6k|  case NT_CCLASS:
  ------------------
  |  |   39|  13.6k|#define NT_CCLASS      1
  ------------------
  |  Branch (1630:3): [True: 13.6k, False: 26.8k]
  ------------------
 1631|  13.6k|    r = compile_length_cclass_node(NCCLASS(node), reg);
  ------------------
  |  |   77|  13.6k|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 1632|  13.6k|    break;
 1633|       |
 1634|      0|  case NT_CTYPE:
  ------------------
  |  |   40|      0|#define NT_CTYPE       2
  ------------------
  |  Branch (1634:3): [True: 0, False: 40.4k]
  ------------------
 1635|  2.47k|  case NT_CANY:
  ------------------
  |  |   41|  2.47k|#define NT_CANY        3
  ------------------
  |  Branch (1635:3): [True: 2.47k, False: 37.9k]
  ------------------
 1636|  2.47k|    r = SIZE_OPCODE;
  ------------------
  |  |  688|  2.47k|#define SIZE_OPCODE           1
  ------------------
 1637|  2.47k|    break;
 1638|       |
 1639|      0|  case NT_BREF:
  ------------------
  |  |   42|      0|#define NT_BREF        4
  ------------------
  |  Branch (1639:3): [True: 0, False: 40.4k]
  ------------------
 1640|      0|    {
 1641|      0|      BRefNode* br = NBREF(node);
  ------------------
  |  |   79|      0|#define NBREF(node)        (&((node)->u.bref))
  ------------------
 1642|       |
 1643|      0|#ifdef USE_BACKREF_WITH_LEVEL
 1644|      0|      if (IS_BACKREF_NEST_LEVEL(br)) {
  ------------------
  |  |  164|      0|#define IS_BACKREF_NEST_LEVEL(bn)      (((bn)->state & NST_NEST_LEVEL) != 0)
  |  |  ------------------
  |  |  |  |  141|      0|#define NST_NEST_LEVEL            (1<<13)
  |  |  ------------------
  |  |  |  Branch (164:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1645|      0|	r = SIZE_OPCODE + SIZE_OPTION + SIZE_LENGTH +
  ------------------
  |  |  688|      0|#define SIZE_OPCODE           1
  ------------------
              	r = SIZE_OPCODE + SIZE_OPTION + SIZE_LENGTH +
  ------------------
  |  |  695|      0|#define SIZE_OPTION           (int )sizeof(OnigOptionType)
  ------------------
              	r = SIZE_OPCODE + SIZE_OPTION + SIZE_LENGTH +
  ------------------
  |  |  691|      0|#define SIZE_LENGTH           (int )sizeof(LengthType)
  ------------------
 1646|      0|            SIZE_LENGTH + (SIZE_MEMNUM * br->back_num);
  ------------------
  |  |  691|      0|#define SIZE_LENGTH           (int )sizeof(LengthType)
  ------------------
                          SIZE_LENGTH + (SIZE_MEMNUM * br->back_num);
  ------------------
  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  ------------------
 1647|      0|      }
 1648|      0|      else
 1649|      0|#endif
 1650|      0|      if (br->back_num == 1) {
  ------------------
  |  Branch (1650:11): [True: 0, False: 0]
  ------------------
 1651|      0|	r = ((!IS_IGNORECASE(reg->options) && br->back_static[0] <= 2)
  ------------------
  |  |  396|      0|#define IS_IGNORECASE(option)     ((option) & ONIG_OPTION_IGNORECASE)
  |  |  ------------------
  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  ------------------
  ------------------
  |  Branch (1651:8): [True: 0, False: 0]
  |  Branch (1651:40): [True: 0, False: 0]
  ------------------
 1652|      0|	     ? SIZE_OPCODE : (SIZE_OPCODE + SIZE_MEMNUM));
  ------------------
  |  |  688|      0|#define SIZE_OPCODE           1
  ------------------
              	     ? SIZE_OPCODE : (SIZE_OPCODE + SIZE_MEMNUM));
  ------------------
  |  |  688|      0|#define SIZE_OPCODE           1
  ------------------
              	     ? SIZE_OPCODE : (SIZE_OPCODE + SIZE_MEMNUM));
  ------------------
  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  ------------------
 1653|      0|      }
 1654|      0|      else {
 1655|      0|	r = SIZE_OPCODE + SIZE_LENGTH + (SIZE_MEMNUM * br->back_num);
  ------------------
  |  |  688|      0|#define SIZE_OPCODE           1
  ------------------
              	r = SIZE_OPCODE + SIZE_LENGTH + (SIZE_MEMNUM * br->back_num);
  ------------------
  |  |  691|      0|#define SIZE_LENGTH           (int )sizeof(LengthType)
  ------------------
              	r = SIZE_OPCODE + SIZE_LENGTH + (SIZE_MEMNUM * br->back_num);
  ------------------
  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  ------------------
 1656|      0|      }
 1657|      0|    }
 1658|      0|    break;
 1659|       |
 1660|      0|#ifdef USE_SUBEXP_CALL
 1661|      0|  case NT_CALL:
  ------------------
  |  |   48|      0|#define NT_CALL       10
  ------------------
  |  Branch (1661:3): [True: 0, False: 40.4k]
  ------------------
 1662|      0|    r = SIZE_OP_CALL;
  ------------------
  |  |  747|      0|#define SIZE_OP_CALL                   (SIZE_OPCODE + SIZE_ABSADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_CALL                   (SIZE_OPCODE + SIZE_ABSADDR)
  |  |  ------------------
  |  |  |  |  690|      0|#define SIZE_ABSADDR          (int )sizeof(AbsAddrType)
  |  |  ------------------
  ------------------
 1663|      0|    break;
 1664|      0|#endif
 1665|       |
 1666|  3.30k|  case NT_QTFR:
  ------------------
  |  |   43|  3.30k|#define NT_QTFR        5
  ------------------
  |  Branch (1666:3): [True: 3.30k, False: 37.1k]
  ------------------
 1667|  3.30k|    r = compile_length_quantifier_node(NQTFR(node), reg);
  ------------------
  |  |   80|  3.30k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 1668|  3.30k|    break;
 1669|       |
 1670|  2.47k|  case NT_ENCLOSE:
  ------------------
  |  |   44|  2.47k|#define NT_ENCLOSE     6
  ------------------
  |  Branch (1670:3): [True: 2.47k, False: 37.9k]
  ------------------
 1671|  2.47k|    r = compile_length_enclose_node(NENCLOSE(node), reg);
  ------------------
  |  |   81|  2.47k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 1672|  2.47k|    break;
 1673|       |
 1674|  1.65k|  case NT_ANCHOR:
  ------------------
  |  |   45|  1.65k|#define NT_ANCHOR      7
  ------------------
  |  Branch (1674:3): [True: 1.65k, False: 38.8k]
  ------------------
 1675|  1.65k|    r = compile_length_anchor_node(NANCHOR(node), reg);
  ------------------
  |  |   82|  1.65k|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 1676|  1.65k|    break;
 1677|       |
 1678|      0|  default:
  ------------------
  |  Branch (1678:3): [True: 0, False: 40.4k]
  ------------------
 1679|      0|    return ONIGERR_TYPE_BUG;
  ------------------
  |  |  633|      0|#define ONIGERR_TYPE_BUG                                       -6
  ------------------
 1680|      0|    break;
 1681|  40.4k|  }
 1682|       |
 1683|  40.4k|  return r;
 1684|  40.4k|}
regcomp.c:add_compile_string_length:
  427|  13.6k|{
  428|  13.6k|  int len;
  429|  13.6k|  int op = select_str_opcode(mb_len, byte_len, ignore_case);
  430|       |
  431|  13.6k|  len = SIZE_OPCODE;
  ------------------
  |  |  688|  13.6k|#define SIZE_OPCODE           1
  ------------------
  432|       |
  433|  13.6k|  if (op == OP_EXACTMBN)  len += SIZE_LENGTH;
  ------------------
  |  |  691|      0|#define SIZE_LENGTH           (int )sizeof(LengthType)
  ------------------
  |  Branch (433:7): [True: 0, False: 13.6k]
  ------------------
  434|  13.6k|  if (IS_NEED_STR_LEN_OP_EXACT(op))
  ------------------
  |  |  316|  13.6k|   ((op) == OP_EXACTN    || (op) == OP_EXACTMB2N ||\
  |  |  ------------------
  |  |  |  Branch (316:5): [True: 7.43k, False: 6.19k]
  |  |  |  Branch (316:29): [True: 0, False: 6.19k]
  |  |  ------------------
  |  |  317|  13.6k|    (op) == OP_EXACTMB3N || (op) == OP_EXACTMBN  || (op) == OP_EXACTN_IC)
  |  |  ------------------
  |  |  |  Branch (317:5): [True: 0, False: 6.19k]
  |  |  |  Branch (317:29): [True: 0, False: 6.19k]
  |  |  |  Branch (317:53): [True: 0, False: 6.19k]
  |  |  ------------------
  ------------------
  435|  7.43k|    len += SIZE_LENGTH;
  ------------------
  |  |  691|  7.43k|#define SIZE_LENGTH           (int )sizeof(LengthType)
  ------------------
  436|       |
  437|  13.6k|  len += (int )byte_len;
  438|  13.6k|  return len;
  439|  13.6k|}
regcomp.c:select_str_opcode:
  321|  30.9k|{
  322|  30.9k|  int op;
  323|  30.9k|  OnigDistance str_len = (byte_len + mb_len - 1) / mb_len;
  324|       |
  325|  30.9k|  if (ignore_case) {
  ------------------
  |  Branch (325:7): [True: 0, False: 30.9k]
  ------------------
  326|      0|    switch (str_len) {
  327|      0|    case 1:  op = OP_EXACT1_IC; break;
  ------------------
  |  Branch (327:5): [True: 0, False: 0]
  ------------------
  328|      0|    default: op = OP_EXACTN_IC; break;
  ------------------
  |  Branch (328:5): [True: 0, False: 0]
  ------------------
  329|      0|    }
  330|      0|  }
  331|  30.9k|  else {
  332|  30.9k|    switch (mb_len) {
  333|  30.9k|    case 1:
  ------------------
  |  Branch (333:5): [True: 30.9k, False: 0]
  ------------------
  334|  30.9k|      switch (str_len) {
  335|  9.91k|      case 1:  op = OP_EXACT1; break;
  ------------------
  |  Branch (335:7): [True: 9.91k, False: 21.0k]
  ------------------
  336|    826|      case 2:  op = OP_EXACT2; break;
  ------------------
  |  Branch (336:7): [True: 826, False: 30.1k]
  ------------------
  337|  1.23k|      case 3:  op = OP_EXACT3; break;
  ------------------
  |  Branch (337:7): [True: 1.23k, False: 29.7k]
  ------------------
  338|  1.65k|      case 4:  op = OP_EXACT4; break;
  ------------------
  |  Branch (338:7): [True: 1.65k, False: 29.3k]
  ------------------
  339|  2.47k|      case 5:  op = OP_EXACT5; break;
  ------------------
  |  Branch (339:7): [True: 2.47k, False: 28.4k]
  ------------------
  340|  14.8k|      default: op = OP_EXACTN; break;
  ------------------
  |  Branch (340:7): [True: 14.8k, False: 16.1k]
  ------------------
  341|  30.9k|      }
  342|  30.9k|      break;
  343|       |
  344|  30.9k|    case 2:
  ------------------
  |  Branch (344:5): [True: 0, False: 30.9k]
  ------------------
  345|      0|      switch (str_len) {
  346|      0|      case 1:  op = OP_EXACTMB2N1; break;
  ------------------
  |  Branch (346:7): [True: 0, False: 0]
  ------------------
  347|      0|      case 2:  op = OP_EXACTMB2N2; break;
  ------------------
  |  Branch (347:7): [True: 0, False: 0]
  ------------------
  348|      0|      case 3:  op = OP_EXACTMB2N3; break;
  ------------------
  |  Branch (348:7): [True: 0, False: 0]
  ------------------
  349|      0|      default: op = OP_EXACTMB2N;  break;
  ------------------
  |  Branch (349:7): [True: 0, False: 0]
  ------------------
  350|      0|      }
  351|      0|      break;
  352|       |
  353|      0|    case 3:
  ------------------
  |  Branch (353:5): [True: 0, False: 30.9k]
  ------------------
  354|      0|      op = OP_EXACTMB3N;
  355|      0|      break;
  356|       |
  357|      0|    default:
  ------------------
  |  Branch (357:5): [True: 0, False: 30.9k]
  ------------------
  358|      0|      op = OP_EXACTMBN;
  359|      0|      break;
  360|  30.9k|    }
  361|  30.9k|  }
  362|  30.9k|  return op;
  363|  30.9k|}
regcomp.c:compile_length_string_node:
  465|  13.6k|{
  466|  13.6k|  int rlen, r, len, prev_len, blen, ambig;
  467|  13.6k|  OnigEncoding enc = reg->enc;
  468|  13.6k|  UChar *p, *prev;
  ------------------
  |  |   76|  13.6k|# define UChar OnigUChar
  ------------------
  469|  13.6k|  StrNode* sn;
  470|       |
  471|  13.6k|  sn = NSTR(node);
  ------------------
  |  |   76|  13.6k|#define NSTR(node)         (&((node)->u.str))
  ------------------
  472|  13.6k|  if (sn->end <= sn->s)
  ------------------
  |  Branch (472:7): [True: 0, False: 13.6k]
  ------------------
  473|      0|    return 0;
  474|       |
  475|  13.6k|  ambig = NSTRING_IS_AMBIG(node);
  ------------------
  |  |  115|  13.6k|#define NSTRING_IS_AMBIG(node)        (((node)->u.str.flag & NSTR_AMBIG) != 0)
  |  |  ------------------
  |  |  |  |  105|  13.6k|#define NSTR_AMBIG              (1<<1)
  |  |  ------------------
  ------------------
  476|       |
  477|  13.6k|  p = prev = sn->s;
  478|  13.6k|  prev_len = enclen(enc, p, sn->end);
  ------------------
  |  |   93|  13.6k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|  13.6k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 13.6k]
  |  |  ------------------
  ------------------
  479|  13.6k|  p += prev_len;
  480|  13.6k|  blen = prev_len;
  481|  13.6k|  rlen = 0;
  482|       |
  483|  97.8k|  for (; p < sn->end; ) {
  ------------------
  |  Branch (483:10): [True: 84.2k, False: 13.6k]
  ------------------
  484|  84.2k|    len = enclen(enc, p, sn->end);
  ------------------
  |  |   93|  84.2k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|  84.2k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 84.2k]
  |  |  ------------------
  ------------------
  485|  84.2k|    if (len == prev_len || ambig) {
  ------------------
  |  Branch (485:9): [True: 84.2k, False: 0]
  |  Branch (485:28): [True: 0, False: 0]
  ------------------
  486|  84.2k|      blen += len;
  487|  84.2k|    }
  488|      0|    else {
  489|      0|      r = add_compile_string_length(prev, prev_len, blen, reg, ambig);
  490|      0|      rlen += r;
  491|      0|      prev = p;
  492|      0|      blen = len;
  493|      0|      prev_len = len;
  494|      0|    }
  495|  84.2k|    p += len;
  496|  84.2k|  }
  497|  13.6k|  r = add_compile_string_length(prev, prev_len, blen, reg, ambig);
  498|  13.6k|  rlen += r;
  499|  13.6k|  return rlen;
  500|  13.6k|}
regcomp.c:compile_length_cclass_node:
  587|  13.6k|{
  588|  13.6k|  int len;
  589|       |
  590|  13.6k|  if (IS_NULL(cc->mbuf)) {
  ------------------
  |  |  311|  13.6k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 13.6k, False: 0]
  |  |  ------------------
  ------------------
  591|  13.6k|    len = SIZE_OPCODE + SIZE_BITSET;
  ------------------
  |  |  688|  13.6k|#define SIZE_OPCODE           1
  ------------------
                  len = SIZE_OPCODE + SIZE_BITSET;
  ------------------
  |  |  438|  13.6k|#define SIZE_BITSET        (int )sizeof(BitSet)
  ------------------
  592|  13.6k|  }
  593|      0|  else {
  594|      0|    if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) {
  ------------------
  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  ------------------
  |  Branch (594:9): [True: 0, False: 0]
  |  Branch (594:45): [True: 0, False: 0]
  ------------------
  595|      0|      len = SIZE_OPCODE;
  ------------------
  |  |  688|      0|#define SIZE_OPCODE           1
  ------------------
  596|      0|    }
  597|      0|    else {
  598|      0|      len = SIZE_OPCODE + SIZE_BITSET;
  ------------------
  |  |  688|      0|#define SIZE_OPCODE           1
  ------------------
                    len = SIZE_OPCODE + SIZE_BITSET;
  ------------------
  |  |  438|      0|#define SIZE_BITSET        (int )sizeof(BitSet)
  ------------------
  599|      0|    }
  600|      0|#ifdef PLATFORM_UNALIGNED_WORD_ACCESS
  601|      0|    len += SIZE_LENGTH + cc->mbuf->used;
  ------------------
  |  |  691|      0|#define SIZE_LENGTH           (int )sizeof(LengthType)
  ------------------
  602|       |#else
  603|       |    len += SIZE_LENGTH + cc->mbuf->used + (WORD_ALIGNMENT_SIZE - 1);
  604|       |#endif
  605|      0|  }
  606|       |
  607|  13.6k|  return len;
  608|  13.6k|}
regcomp.c:compile_length_quantifier_node:
  965|  3.30k|{
  966|  3.30k|  int len, mod_tlen;
  967|  3.30k|  int infinite = IS_REPEAT_INFINITE(qn->upper);
  ------------------
  |  |  422|  3.30k|#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
  |  |  ------------------
  |  |  |  |  421|  3.30k|#define REPEAT_INFINITE         -1
  |  |  ------------------
  ------------------
  968|  3.30k|  int empty_info = qn->target_empty_info;
  969|  3.30k|  int tlen = compile_length_tree(qn->target, reg);
  970|       |
  971|  3.30k|  if (tlen < 0) return tlen;
  ------------------
  |  Branch (971:7): [True: 0, False: 3.30k]
  ------------------
  972|       |
  973|       |  /* anychar repeat */
  974|  3.30k|  if (NTYPE(qn->target) == NT_CANY) {
  ------------------
  |  |   69|  3.30k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
                if (NTYPE(qn->target) == NT_CANY) {
  ------------------
  |  |   41|  3.30k|#define NT_CANY        3
  ------------------
  |  Branch (974:7): [True: 0, False: 3.30k]
  ------------------
  975|      0|    if (qn->greedy && infinite) {
  ------------------
  |  Branch (975:9): [True: 0, False: 0]
  |  Branch (975:23): [True: 0, False: 0]
  ------------------
  976|      0|      if (IS_NOT_NULL(qn->next_head_exact))
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  977|      0|	return SIZE_OP_ANYCHAR_STAR_PEEK_NEXT + tlen * qn->lower;
  ------------------
  |  |  719|      0|#define SIZE_OP_ANYCHAR_STAR_PEEK_NEXT (SIZE_OPCODE + 1)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
  978|      0|      else
  979|      0|	return SIZE_OP_ANYCHAR_STAR + tlen * qn->lower;
  ------------------
  |  |  718|      0|#define SIZE_OP_ANYCHAR_STAR            SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
  980|      0|    }
  981|      0|  }
  982|       |
  983|  3.30k|  if (empty_info != 0)
  ------------------
  |  Branch (983:7): [True: 0, False: 3.30k]
  ------------------
  984|      0|    mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END);
  ------------------
  |  |  742|      0|#define SIZE_OP_NULL_CHECK_START       (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_NULL_CHECK_START       (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
                  mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END);
  ------------------
  |  |  743|      0|#define SIZE_OP_NULL_CHECK_END         (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_NULL_CHECK_END         (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
  985|  3.30k|  else
  986|  3.30k|    mod_tlen = tlen;
  987|       |
  988|  3.30k|  if (infinite &&
  ------------------
  |  Branch (988:7): [True: 3.30k, False: 0]
  ------------------
  989|  3.30k|      (qn->lower <= 1 || tlen * qn->lower <= QUANTIFIER_EXPAND_LIMIT_SIZE)) {
  ------------------
  |  |  724|      0|#define QUANTIFIER_EXPAND_LIMIT_SIZE   50
  ------------------
  |  Branch (989:8): [True: 3.30k, False: 0]
  |  Branch (989:26): [True: 0, False: 0]
  ------------------
  990|  3.30k|    if (qn->lower == 1 && tlen > QUANTIFIER_EXPAND_LIMIT_SIZE) {
  ------------------
  |  |  724|  2.47k|#define QUANTIFIER_EXPAND_LIMIT_SIZE   50
  ------------------
  |  Branch (990:9): [True: 2.47k, False: 826]
  |  Branch (990:27): [True: 0, False: 2.47k]
  ------------------
  991|      0|      len = SIZE_OP_JUMP;
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
  992|      0|    }
  993|  3.30k|    else {
  994|  3.30k|      len = tlen * qn->lower;
  995|  3.30k|    }
  996|       |
  997|  3.30k|    if (qn->greedy) {
  ------------------
  |  Branch (997:9): [True: 3.30k, False: 0]
  ------------------
  998|       |#ifdef USE_OP_PUSH_OR_JUMP_EXACT
  999|       |      if (IS_NOT_NULL(qn->head_exact))
 1000|       |	len += SIZE_OP_PUSH_OR_JUMP_EXACT1 + mod_tlen + SIZE_OP_JUMP;
 1001|       |      else
 1002|       |#endif
 1003|  3.30k|      if (IS_NOT_NULL(qn->next_head_exact))
  ------------------
  |  |  312|  3.30k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 2.47k, False: 826]
  |  |  ------------------
  ------------------
 1004|  2.47k|	len += SIZE_OP_PUSH_IF_PEEK_NEXT + mod_tlen + SIZE_OP_JUMP;
  ------------------
  |  |  724|  2.47k|#define SIZE_OP_PUSH_IF_PEEK_NEXT      (SIZE_OPCODE + SIZE_RELADDR + 1)
  |  |  ------------------
  |  |  |  |  688|  2.47k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH_IF_PEEK_NEXT      (SIZE_OPCODE + SIZE_RELADDR + 1)
  |  |  ------------------
  |  |  |  |  689|  2.47k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
              	len += SIZE_OP_PUSH_IF_PEEK_NEXT + mod_tlen + SIZE_OP_JUMP;
  ------------------
  |  |  720|  2.47k|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  2.47k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  2.47k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1005|    826|      else
 1006|    826|	len += SIZE_OP_PUSH + mod_tlen + SIZE_OP_JUMP;
  ------------------
  |  |  721|    826|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|    826|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|    826|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
              	len += SIZE_OP_PUSH + mod_tlen + SIZE_OP_JUMP;
  ------------------
  |  |  720|    826|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|    826|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|    826|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1007|  3.30k|    }
 1008|      0|    else
 1009|      0|      len += SIZE_OP_JUMP + mod_tlen + SIZE_OP_PUSH;
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
                    len += SIZE_OP_JUMP + mod_tlen + SIZE_OP_PUSH;
  ------------------
  |  |  721|      0|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1010|  3.30k|  }
 1011|      0|  else if (qn->upper == 0 && qn->is_referred != 0) { /* /(?<n>..){0}/ */
  ------------------
  |  Branch (1011:12): [True: 0, False: 0]
  |  Branch (1011:30): [True: 0, False: 0]
  ------------------
 1012|      0|    len = SIZE_OP_JUMP + tlen;
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1013|      0|  }
 1014|      0|  else if (!infinite && qn->greedy &&
  ------------------
  |  Branch (1014:12): [True: 0, False: 0]
  |  Branch (1014:25): [True: 0, False: 0]
  ------------------
 1015|      0|           (qn->upper == 1 || (tlen + SIZE_OP_PUSH) * qn->upper
  ------------------
  |  |  721|      0|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
  |  Branch (1015:13): [True: 0, False: 0]
  |  Branch (1015:31): [True: 0, False: 0]
  ------------------
 1016|      0|                                      <= QUANTIFIER_EXPAND_LIMIT_SIZE)) {
  ------------------
  |  |  724|      0|#define QUANTIFIER_EXPAND_LIMIT_SIZE   50
  ------------------
 1017|      0|    len = tlen * qn->lower;
 1018|      0|    len += (SIZE_OP_PUSH + tlen) * (qn->upper - qn->lower);
  ------------------
  |  |  721|      0|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1019|      0|  }
 1020|      0|  else if (!qn->greedy && qn->upper == 1 && qn->lower == 0) { /* '??' */
  ------------------
  |  Branch (1020:12): [True: 0, False: 0]
  |  Branch (1020:27): [True: 0, False: 0]
  |  Branch (1020:45): [True: 0, False: 0]
  ------------------
 1021|      0|    len = SIZE_OP_PUSH + SIZE_OP_JUMP + tlen;
  ------------------
  |  |  721|      0|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
                  len = SIZE_OP_PUSH + SIZE_OP_JUMP + tlen;
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1022|      0|  }
 1023|      0|  else {
 1024|      0|    len = SIZE_OP_REPEAT_INC
  ------------------
  |  |  725|      0|#define SIZE_OP_REPEAT_INC             (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_REPEAT_INC             (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
 1025|      0|        + mod_tlen + SIZE_OPCODE + SIZE_RELADDR + SIZE_MEMNUM;
  ------------------
  |  |  688|      0|#define SIZE_OPCODE           1
  ------------------
                      + mod_tlen + SIZE_OPCODE + SIZE_RELADDR + SIZE_MEMNUM;
  ------------------
  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  ------------------
                      + mod_tlen + SIZE_OPCODE + SIZE_RELADDR + SIZE_MEMNUM;
  ------------------
  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  ------------------
 1026|      0|  }
 1027|       |
 1028|  3.30k|  return len;
 1029|  3.30k|}
regcomp.c:compile_length_enclose_node:
 1213|  2.47k|{
 1214|  2.47k|  int len;
 1215|  2.47k|  int tlen;
 1216|       |
 1217|  2.47k|  if (node->type == ENCLOSE_OPTION)
  ------------------
  |  |   95|  2.47k|#define ENCLOSE_OPTION           (1<<1)
  ------------------
  |  Branch (1217:7): [True: 0, False: 2.47k]
  ------------------
 1218|      0|    return compile_length_option_node(node, reg);
 1219|       |
 1220|  2.47k|  if (node->target) {
  ------------------
  |  Branch (1220:7): [True: 2.47k, False: 0]
  ------------------
 1221|  2.47k|    tlen = compile_length_tree(node->target, reg);
 1222|  2.47k|    if (tlen < 0) return tlen;
  ------------------
  |  Branch (1222:9): [True: 0, False: 2.47k]
  ------------------
 1223|  2.47k|  }
 1224|      0|  else
 1225|      0|    tlen = 0;
 1226|       |
 1227|  2.47k|  switch (node->type) {
 1228|      0|  case ENCLOSE_MEMORY:
  ------------------
  |  |   94|      0|#define ENCLOSE_MEMORY           (1<<0)
  ------------------
  |  Branch (1228:3): [True: 0, False: 2.47k]
  ------------------
 1229|      0|#ifdef USE_SUBEXP_CALL
 1230|      0|    if (IS_ENCLOSE_CALLED(node)) {
  ------------------
  |  |  147|      0|#define IS_ENCLOSE_CALLED(en)          (((en)->state & NST_CALLED)        != 0)
  |  |  ------------------
  |  |  |  |  136|      0|#define NST_CALLED                (1<<8)
  |  |  ------------------
  |  |  |  Branch (147:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1231|      0|      len = SIZE_OP_MEMORY_START_PUSH + tlen
  ------------------
  |  |  735|      0|#define SIZE_OP_MEMORY_START_PUSH      (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_START_PUSH      (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
 1232|      0|	  + SIZE_OP_CALL + SIZE_OP_JUMP + SIZE_OP_RETURN;
  ------------------
  |  |  747|      0|#define SIZE_OP_CALL                   (SIZE_OPCODE + SIZE_ABSADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_CALL                   (SIZE_OPCODE + SIZE_ABSADDR)
  |  |  ------------------
  |  |  |  |  690|      0|#define SIZE_ABSADDR          (int )sizeof(AbsAddrType)
  |  |  ------------------
  ------------------
              	  + SIZE_OP_CALL + SIZE_OP_JUMP + SIZE_OP_RETURN;
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
              	  + SIZE_OP_CALL + SIZE_OP_JUMP + SIZE_OP_RETURN;
  ------------------
  |  |  748|      0|#define SIZE_OP_RETURN                  SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
 1233|      0|      if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
  ------------------
  |  |  371|      0|  ((n) < (int )BIT_STATUS_BITS_NUM  ?  ((stats) & ((BitStatusType )1 << n)) : ((stats) & 1))
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (371:3): [True: 0, False: 0]
  |  |  |  Branch (371:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1234|      0|	len += (IS_ENCLOSE_RECURSION(node)
  ------------------
  |  |  149|      0|#define IS_ENCLOSE_RECURSION(en)       (((en)->state & NST_RECURSION)     != 0)
  |  |  ------------------
  |  |  |  |  135|      0|#define NST_RECURSION             (1<<7)
  |  |  ------------------
  |  |  |  Branch (149:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1235|      0|		? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH);
  ------------------
  |  |  737|      0|#define SIZE_OP_MEMORY_END_PUSH_REC    (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_END_PUSH_REC    (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
              		? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH);
  ------------------
  |  |  736|      0|#define SIZE_OP_MEMORY_END_PUSH        (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_END_PUSH        (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
 1236|      0|      else
 1237|      0|	len += (IS_ENCLOSE_RECURSION(node)
  ------------------
  |  |  149|      0|#define IS_ENCLOSE_RECURSION(en)       (((en)->state & NST_RECURSION)     != 0)
  |  |  ------------------
  |  |  |  |  135|      0|#define NST_RECURSION             (1<<7)
  |  |  ------------------
  |  |  |  Branch (149:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1238|      0|		? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END);
  ------------------
  |  |  739|      0|#define SIZE_OP_MEMORY_END_REC         (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_END_REC         (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
              		? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END);
  ------------------
  |  |  738|      0|#define SIZE_OP_MEMORY_END             (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_END             (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
 1239|      0|    }
 1240|      0|    else if (IS_ENCLOSE_RECURSION(node)) {
  ------------------
  |  |  149|      0|#define IS_ENCLOSE_RECURSION(en)       (((en)->state & NST_RECURSION)     != 0)
  |  |  ------------------
  |  |  |  |  135|      0|#define NST_RECURSION             (1<<7)
  |  |  ------------------
  |  |  |  Branch (149:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1241|      0|      len = SIZE_OP_MEMORY_START_PUSH;
  ------------------
  |  |  735|      0|#define SIZE_OP_MEMORY_START_PUSH      (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_START_PUSH      (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
 1242|      0|      len += tlen + (BIT_STATUS_AT(reg->bt_mem_end, node->regnum)
  ------------------
  |  |  371|      0|  ((n) < (int )BIT_STATUS_BITS_NUM  ?  ((stats) & ((BitStatusType )1 << n)) : ((stats) & 1))
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (371:3): [True: 0, False: 0]
  |  |  |  Branch (371:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1243|      0|		     ? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_REC);
  ------------------
  |  |  737|      0|#define SIZE_OP_MEMORY_END_PUSH_REC    (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_END_PUSH_REC    (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
              		     ? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_REC);
  ------------------
  |  |  739|      0|#define SIZE_OP_MEMORY_END_REC         (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_END_REC         (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
 1244|      0|    }
 1245|      0|    else
 1246|      0|#endif
 1247|      0|    {
 1248|      0|      if (BIT_STATUS_AT(reg->bt_mem_start, node->regnum))
  ------------------
  |  |  371|      0|  ((n) < (int )BIT_STATUS_BITS_NUM  ?  ((stats) & ((BitStatusType )1 << n)) : ((stats) & 1))
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (371:3): [True: 0, False: 0]
  |  |  |  Branch (371:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1249|      0|	len = SIZE_OP_MEMORY_START_PUSH;
  ------------------
  |  |  735|      0|#define SIZE_OP_MEMORY_START_PUSH      (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_START_PUSH      (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
 1250|      0|      else
 1251|      0|	len = SIZE_OP_MEMORY_START;
  ------------------
  |  |  734|      0|#define SIZE_OP_MEMORY_START           (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_START           (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
 1252|       |
 1253|      0|      len += tlen + (BIT_STATUS_AT(reg->bt_mem_end, node->regnum)
  ------------------
  |  |  371|      0|  ((n) < (int )BIT_STATUS_BITS_NUM  ?  ((stats) & ((BitStatusType )1 << n)) : ((stats) & 1))
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (371:3): [True: 0, False: 0]
  |  |  |  Branch (371:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1254|      0|		     ? SIZE_OP_MEMORY_END_PUSH : SIZE_OP_MEMORY_END);
  ------------------
  |  |  736|      0|#define SIZE_OP_MEMORY_END_PUSH        (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_END_PUSH        (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
              		     ? SIZE_OP_MEMORY_END_PUSH : SIZE_OP_MEMORY_END);
  ------------------
  |  |  738|      0|#define SIZE_OP_MEMORY_END             (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_END             (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
 1255|      0|    }
 1256|      0|    break;
 1257|       |
 1258|  2.47k|  case ENCLOSE_STOP_BACKTRACK:
  ------------------
  |  |   96|  2.47k|#define ENCLOSE_STOP_BACKTRACK   (1<<2)
  ------------------
  |  Branch (1258:3): [True: 2.47k, False: 0]
  ------------------
 1259|  2.47k|    if (IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT(node)) {
  ------------------
  |  |  156|  2.47k|    (((en)->state & NST_STOP_BT_SIMPLE_REPEAT) != 0)
  |  |  ------------------
  |  |  |  |  134|  2.47k|#define NST_STOP_BT_SIMPLE_REPEAT (1<<6)
  |  |  ------------------
  |  |  |  Branch (156:5): [True: 2.47k, False: 0]
  |  |  ------------------
  ------------------
 1260|  2.47k|      QtfrNode* qn = NQTFR(node->target);
  ------------------
  |  |   80|  2.47k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 1261|  2.47k|      tlen = compile_length_tree(qn->target, reg);
 1262|  2.47k|      if (tlen < 0) return tlen;
  ------------------
  |  Branch (1262:11): [True: 0, False: 2.47k]
  ------------------
 1263|       |
 1264|  2.47k|      len = tlen * qn->lower
 1265|  2.47k|	  + SIZE_OP_PUSH + tlen + SIZE_OP_POP + SIZE_OP_JUMP;
  ------------------
  |  |  721|  2.47k|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  2.47k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  2.47k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
              	  + SIZE_OP_PUSH + tlen + SIZE_OP_POP + SIZE_OP_JUMP;
  ------------------
  |  |  722|  2.47k|#define SIZE_OP_POP                     SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|  2.47k|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
              	  + SIZE_OP_PUSH + tlen + SIZE_OP_POP + SIZE_OP_JUMP;
  ------------------
  |  |  720|  2.47k|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  2.47k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  2.47k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1266|  2.47k|    }
 1267|      0|    else {
 1268|      0|      len = SIZE_OP_PUSH_STOP_BT + tlen + SIZE_OP_POP_STOP_BT;
  ------------------
  |  |  740|      0|#define SIZE_OP_PUSH_STOP_BT            SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
                    len = SIZE_OP_PUSH_STOP_BT + tlen + SIZE_OP_POP_STOP_BT;
  ------------------
  |  |  741|      0|#define SIZE_OP_POP_STOP_BT             SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
 1269|      0|    }
 1270|  2.47k|    break;
 1271|       |
 1272|  2.47k|  case ENCLOSE_CONDITION:
  ------------------
  |  |   97|      0|#define ENCLOSE_CONDITION        (1<<3)
  ------------------
  |  Branch (1272:3): [True: 0, False: 2.47k]
  ------------------
 1273|      0|    len = SIZE_OP_CONDITION;
  ------------------
  |  |  749|      0|#define SIZE_OP_CONDITION              (SIZE_OPCODE + SIZE_MEMNUM + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_CONDITION              (SIZE_OPCODE + SIZE_MEMNUM + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  |  |               #define SIZE_OP_CONDITION              (SIZE_OPCODE + SIZE_MEMNUM + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1274|      0|    if (NTYPE(node->target) == NT_ALT) {
  ------------------
  |  |   69|      0|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
                  if (NTYPE(node->target) == NT_ALT) {
  ------------------
  |  |   47|      0|#define NT_ALT         9
  ------------------
  |  Branch (1274:9): [True: 0, False: 0]
  ------------------
 1275|      0|      Node* x = node->target;
 1276|       |
 1277|      0|      tlen = compile_length_tree(NCAR(x), reg); /* yes-node */
  ------------------
  |  |   86|      0|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1278|      0|      if (tlen < 0) return tlen;
  ------------------
  |  Branch (1278:11): [True: 0, False: 0]
  ------------------
 1279|      0|      len += tlen + SIZE_OP_JUMP;
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1280|      0|      if (NCDR(x) == NULL) return ONIGERR_PARSER_BUG;
  ------------------
  |  |   87|      0|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
                    if (NCDR(x) == NULL) return ONIGERR_PARSER_BUG;
  ------------------
  |  |  634|      0|#define ONIGERR_PARSER_BUG                                    -11
  ------------------
  |  Branch (1280:11): [True: 0, False: 0]
  ------------------
 1281|      0|      x = NCDR(x);
  ------------------
  |  |   87|      0|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1282|      0|      tlen = compile_length_tree(NCAR(x), reg); /* no-node */
  ------------------
  |  |   86|      0|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1283|      0|      if (tlen < 0) return tlen;
  ------------------
  |  Branch (1283:11): [True: 0, False: 0]
  ------------------
 1284|      0|      len += tlen;
 1285|      0|      if (NCDR(x) != NULL) return ONIGERR_INVALID_CONDITION_PATTERN;
  ------------------
  |  |   87|      0|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
                    if (NCDR(x) != NULL) return ONIGERR_INVALID_CONDITION_PATTERN;
  ------------------
  |  |  667|      0|#define ONIGERR_INVALID_CONDITION_PATTERN                    -124
  ------------------
  |  Branch (1285:11): [True: 0, False: 0]
  ------------------
 1286|      0|    }
 1287|      0|    else {
 1288|      0|      return ONIGERR_PARSER_BUG;
  ------------------
  |  |  634|      0|#define ONIGERR_PARSER_BUG                                    -11
  ------------------
 1289|      0|    }
 1290|      0|    break;
 1291|       |
 1292|      0|  case ENCLOSE_ABSENT:
  ------------------
  |  |   98|      0|#define ENCLOSE_ABSENT           (1<<4)
  ------------------
  |  Branch (1292:3): [True: 0, False: 2.47k]
  ------------------
 1293|      0|    len = SIZE_OP_PUSH_ABSENT_POS + SIZE_OP_ABSENT + tlen + SIZE_OP_ABSENT_END;
  ------------------
  |  |  750|      0|#define SIZE_OP_PUSH_ABSENT_POS         SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
                  len = SIZE_OP_PUSH_ABSENT_POS + SIZE_OP_ABSENT + tlen + SIZE_OP_ABSENT_END;
  ------------------
  |  |  751|      0|#define SIZE_OP_ABSENT                 (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_ABSENT                 (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
                  len = SIZE_OP_PUSH_ABSENT_POS + SIZE_OP_ABSENT + tlen + SIZE_OP_ABSENT_END;
  ------------------
  |  |  752|      0|#define SIZE_OP_ABSENT_END              SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
 1294|      0|    break;
 1295|       |
 1296|      0|  default:
  ------------------
  |  Branch (1296:3): [True: 0, False: 2.47k]
  ------------------
 1297|      0|    return ONIGERR_TYPE_BUG;
  ------------------
  |  |  633|      0|#define ONIGERR_TYPE_BUG                                       -6
  ------------------
 1298|      0|    break;
 1299|  2.47k|  }
 1300|       |
 1301|  2.47k|  return len;
 1302|  2.47k|}
regcomp.c:compile_length_anchor_node:
 1463|  1.65k|{
 1464|  1.65k|  int len;
 1465|  1.65k|  int tlen = 0;
 1466|       |
 1467|  1.65k|  if (node->target) {
  ------------------
  |  Branch (1467:7): [True: 0, False: 1.65k]
  ------------------
 1468|      0|    tlen = compile_length_tree(node->target, reg);
 1469|      0|    if (tlen < 0) return tlen;
  ------------------
  |  Branch (1469:9): [True: 0, False: 0]
  ------------------
 1470|      0|  }
 1471|       |
 1472|  1.65k|  switch (node->type) {
 1473|      0|  case ANCHOR_PREC_READ:
  ------------------
  |  |  551|      0|#define ANCHOR_PREC_READ        (1<<10)
  ------------------
  |  Branch (1473:3): [True: 0, False: 1.65k]
  ------------------
 1474|      0|    len = SIZE_OP_PUSH_POS + tlen + SIZE_OP_POP_POS;
  ------------------
  |  |  727|      0|#define SIZE_OP_PUSH_POS                SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
                  len = SIZE_OP_PUSH_POS + tlen + SIZE_OP_POP_POS;
  ------------------
  |  |  729|      0|#define SIZE_OP_POP_POS                 SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
 1475|      0|    break;
 1476|      0|  case ANCHOR_PREC_READ_NOT:
  ------------------
  |  |  552|      0|#define ANCHOR_PREC_READ_NOT    (1<<11)
  ------------------
  |  Branch (1476:3): [True: 0, False: 1.65k]
  ------------------
 1477|      0|    len = SIZE_OP_PUSH_POS_NOT + tlen + SIZE_OP_FAIL_POS;
  ------------------
  |  |  728|      0|#define SIZE_OP_PUSH_POS_NOT           (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH_POS_NOT           (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
                  len = SIZE_OP_PUSH_POS_NOT + tlen + SIZE_OP_FAIL_POS;
  ------------------
  |  |  730|      0|#define SIZE_OP_FAIL_POS                SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
 1478|      0|    break;
 1479|      0|  case ANCHOR_LOOK_BEHIND:
  ------------------
  |  |  553|      0|#define ANCHOR_LOOK_BEHIND      (1<<12)
  ------------------
  |  Branch (1479:3): [True: 0, False: 1.65k]
  ------------------
 1480|      0|    len = SIZE_OP_LOOK_BEHIND + tlen;
  ------------------
  |  |  744|      0|#define SIZE_OP_LOOK_BEHIND            (SIZE_OPCODE + SIZE_LENGTH)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_LOOK_BEHIND            (SIZE_OPCODE + SIZE_LENGTH)
  |  |  ------------------
  |  |  |  |  691|      0|#define SIZE_LENGTH           (int )sizeof(LengthType)
  |  |  ------------------
  ------------------
 1481|      0|    break;
 1482|      0|  case ANCHOR_LOOK_BEHIND_NOT:
  ------------------
  |  |  554|      0|#define ANCHOR_LOOK_BEHIND_NOT  (1<<13)
  ------------------
  |  Branch (1482:3): [True: 0, False: 1.65k]
  ------------------
 1483|      0|    len = SIZE_OP_PUSH_LOOK_BEHIND_NOT + tlen + SIZE_OP_FAIL_LOOK_BEHIND_NOT;
  ------------------
  |  |  745|      0|#define SIZE_OP_PUSH_LOOK_BEHIND_NOT   (SIZE_OPCODE + SIZE_RELADDR + SIZE_LENGTH)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH_LOOK_BEHIND_NOT   (SIZE_OPCODE + SIZE_RELADDR + SIZE_LENGTH)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH_LOOK_BEHIND_NOT   (SIZE_OPCODE + SIZE_RELADDR + SIZE_LENGTH)
  |  |  ------------------
  |  |  |  |  691|      0|#define SIZE_LENGTH           (int )sizeof(LengthType)
  |  |  ------------------
  ------------------
                  len = SIZE_OP_PUSH_LOOK_BEHIND_NOT + tlen + SIZE_OP_FAIL_LOOK_BEHIND_NOT;
  ------------------
  |  |  746|      0|#define SIZE_OP_FAIL_LOOK_BEHIND_NOT    SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
 1484|      0|    break;
 1485|       |
 1486|  1.65k|  default:
  ------------------
  |  Branch (1486:3): [True: 1.65k, False: 0]
  ------------------
 1487|  1.65k|    len = SIZE_OPCODE;
  ------------------
  |  |  688|  1.65k|#define SIZE_OPCODE           1
  ------------------
 1488|  1.65k|    break;
 1489|  1.65k|  }
 1490|       |
 1491|  1.65k|  return len;
 1492|  1.65k|}
regcomp.c:add_opcode_rel_addr:
  277|  26.8k|{
  278|  26.8k|  int r;
  279|       |
  280|  26.8k|  r = add_opcode(reg, opcode);
  281|  26.8k|  if (r) return r;
  ------------------
  |  Branch (281:7): [True: 0, False: 26.8k]
  ------------------
  282|  26.8k|  r = add_rel_addr(reg, addr);
  283|  26.8k|  return r;
  284|  26.8k|}
regcomp.c:add_rel_addr:
  223|  26.8k|{
  224|  26.8k|  RelAddrType ra = (RelAddrType )addr;
  225|       |
  226|  26.8k|  BBUF_ADD(reg, &ra, SIZE_RELADDR);
  ------------------
  |  |  504|  26.8k|#define BBUF_ADD(buf,bytes,n)       BBUF_WRITE((buf),(buf)->used,(bytes),(n))
  |  |  ------------------
  |  |  |  |  490|  26.8k|#define BBUF_WRITE(buf,pos,bytes,n) do{\
  |  |  |  |  491|  26.8k|  int used = (pos) + (int )(n);\
  |  |  |  |  492|  26.8k|  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  470|  1.23k|#define BBUF_EXPAND(buf,low) do{\
  |  |  |  |  |  |  471|  1.23k|  UChar *tmp;\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   76|  1.23k|# define UChar OnigUChar
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  472|  1.23k|  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (472:36): [True: 0, False: 1.23k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  473|  1.23k|  tmp = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  1.23k|# define xrealloc    realloc
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  474|  1.23k|  if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  311|  1.23k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (311:39): [True: 0, False: 1.23k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  475|  1.23k|  (buf)->p = tmp;\
  |  |  |  |  |  |  476|  1.23k|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (476:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (492:7): [True: 1.23k, False: 25.6k]
  |  |  |  |  ------------------
  |  |  |  |  493|  26.8k|  xmemcpy((buf)->p + (pos), (bytes), (n));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  215|  26.8k|#define xmemcpy     memcpy
  |  |  |  |  ------------------
  |  |  |  |  494|  26.8k|  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (494:7): [True: 26.8k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  495|  26.8k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (495:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  227|  26.8k|  return 0;
  228|  26.8k|}
regcomp.c:add_compile_string:
  444|  17.3k|{
  445|  17.3k|  int op = select_str_opcode(mb_len, byte_len, ignore_case);
  446|  17.3k|  add_opcode(reg, op);
  447|       |
  448|  17.3k|  if (op == OP_EXACTMBN)
  ------------------
  |  Branch (448:7): [True: 0, False: 17.3k]
  ------------------
  449|      0|    add_length(reg, mb_len);
  450|       |
  451|  17.3k|  if (IS_NEED_STR_LEN_OP_EXACT(op)) {
  ------------------
  |  |  316|  17.3k|   ((op) == OP_EXACTN    || (op) == OP_EXACTMB2N ||\
  |  |  ------------------
  |  |  |  Branch (316:5): [True: 7.43k, False: 9.91k]
  |  |  |  Branch (316:29): [True: 0, False: 9.91k]
  |  |  ------------------
  |  |  317|  17.3k|    (op) == OP_EXACTMB3N || (op) == OP_EXACTMBN  || (op) == OP_EXACTN_IC)
  |  |  ------------------
  |  |  |  Branch (317:5): [True: 0, False: 9.91k]
  |  |  |  Branch (317:29): [True: 0, False: 9.91k]
  |  |  |  Branch (317:53): [True: 0, False: 9.91k]
  |  |  ------------------
  ------------------
  452|  7.43k|    if (op == OP_EXACTN_IC)
  ------------------
  |  Branch (452:9): [True: 0, False: 7.43k]
  ------------------
  453|      0|      add_length(reg, byte_len);
  454|  7.43k|    else
  455|  7.43k|      add_length(reg, byte_len / mb_len);
  456|  7.43k|  }
  457|       |
  458|  17.3k|  add_bytes(reg, s, byte_len);
  459|  17.3k|  return 0;
  460|  17.3k|}
regcomp.c:add_bytes:
  288|  18.1k|{
  289|  18.1k|  BBUF_ADD(reg, bytes, len);
  ------------------
  |  |  504|  18.1k|#define BBUF_ADD(buf,bytes,n)       BBUF_WRITE((buf),(buf)->used,(bytes),(n))
  |  |  ------------------
  |  |  |  |  490|  18.1k|#define BBUF_WRITE(buf,pos,bytes,n) do{\
  |  |  |  |  491|  18.1k|  int used = (pos) + (int )(n);\
  |  |  |  |  492|  18.1k|  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  470|    826|#define BBUF_EXPAND(buf,low) do{\
  |  |  |  |  |  |  471|    826|  UChar *tmp;\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   76|    826|# define UChar OnigUChar
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  472|    826|  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (472:36): [True: 0, False: 826]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  473|    826|  tmp = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|    826|# define xrealloc    realloc
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  474|    826|  if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  311|    826|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (311:39): [True: 0, False: 826]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  475|    826|  (buf)->p = tmp;\
  |  |  |  |  |  |  476|    826|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (476:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (492:7): [True: 826, False: 17.3k]
  |  |  |  |  ------------------
  |  |  |  |  493|  18.1k|  xmemcpy((buf)->p + (pos), (bytes), (n));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  215|  18.1k|#define xmemcpy     memcpy
  |  |  |  |  ------------------
  |  |  |  |  494|  18.1k|  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (494:7): [True: 18.1k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  495|  18.1k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (495:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  290|  18.1k|  return 0;
  291|  18.1k|}
regcomp.c:compile_string_node:
  513|  17.7k|{
  514|  17.7k|  int r, len, prev_len, blen, ambig;
  515|  17.7k|  OnigEncoding enc = reg->enc;
  516|  17.7k|  UChar *p, *prev, *end;
  ------------------
  |  |   76|  17.7k|# define UChar OnigUChar
  ------------------
  517|  17.7k|  StrNode* sn;
  518|       |
  519|  17.7k|  sn = NSTR(node);
  ------------------
  |  |   76|  17.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
  520|  17.7k|  if (sn->end <= sn->s)
  ------------------
  |  Branch (520:7): [True: 413, False: 17.3k]
  ------------------
  521|    413|    return 0;
  522|       |
  523|  17.3k|  end = sn->end;
  524|  17.3k|  ambig = NSTRING_IS_AMBIG(node);
  ------------------
  |  |  115|  17.3k|#define NSTRING_IS_AMBIG(node)        (((node)->u.str.flag & NSTR_AMBIG) != 0)
  |  |  ------------------
  |  |  |  |  105|  17.3k|#define NSTR_AMBIG              (1<<1)
  |  |  ------------------
  ------------------
  525|       |
  526|  17.3k|  p = prev = sn->s;
  527|  17.3k|  prev_len = enclen(enc, p, end);
  ------------------
  |  |   93|  17.3k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|  17.3k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 17.3k]
  |  |  ------------------
  ------------------
  528|  17.3k|  p += prev_len;
  529|  17.3k|  blen = prev_len;
  530|       |
  531|   151k|  for (; p < end; ) {
  ------------------
  |  Branch (531:10): [True: 134k, False: 17.3k]
  ------------------
  532|   134k|    len = enclen(enc, p, end);
  ------------------
  |  |   93|   134k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|   134k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 134k]
  |  |  ------------------
  ------------------
  533|   134k|    if (len == prev_len || ambig) {
  ------------------
  |  Branch (533:9): [True: 134k, False: 0]
  |  Branch (533:28): [True: 0, False: 0]
  ------------------
  534|   134k|      blen += len;
  535|   134k|    }
  536|      0|    else {
  537|      0|      r = add_compile_string(prev, prev_len, blen, reg, ambig);
  538|      0|      if (p + len > end) {
  ------------------
  |  Branch (538:11): [True: 0, False: 0]
  ------------------
  539|      0|        return 0;
  540|      0|      }
  541|      0|      if (r) return r;
  ------------------
  |  Branch (541:11): [True: 0, False: 0]
  ------------------
  542|       |
  543|      0|      prev  = p;
  544|      0|      blen  = len;
  545|      0|      prev_len = len;
  546|      0|    }
  547|       |
  548|   134k|    p += len;
  549|   134k|  }
  550|  17.3k|  return add_compile_string(prev, prev_len, blen, reg, ambig);
  551|  17.3k|}
regcomp.c:compile_cclass_node:
  612|  16.5k|{
  613|  16.5k|  int r;
  614|       |
  615|  16.5k|  if (IS_NULL(cc->mbuf)) {
  ------------------
  |  |  311|  16.5k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 16.5k, False: 0]
  |  |  ------------------
  ------------------
  616|  16.5k|    if (IS_NCCLASS_NOT(cc))
  ------------------
  |  |  809|  16.5k|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|  16.5k|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  16.5k|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (802:37): [True: 4.54k, False: 11.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  617|  4.54k|      add_opcode(reg, OP_CCLASS_NOT);
  618|  11.9k|    else
  619|  11.9k|      add_opcode(reg, OP_CCLASS);
  620|       |
  621|  16.5k|    r = add_bitset(reg, cc->bs);
  622|  16.5k|  }
  623|      0|  else {
  624|      0|    if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) {
  ------------------
  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  ------------------
  |  Branch (624:9): [True: 0, False: 0]
  |  Branch (624:45): [True: 0, False: 0]
  ------------------
  625|      0|      if (IS_NCCLASS_NOT(cc))
  ------------------
  |  |  809|      0|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|      0|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (802:37): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  626|      0|	add_opcode(reg, OP_CCLASS_MB_NOT);
  627|      0|      else
  628|      0|	add_opcode(reg, OP_CCLASS_MB);
  629|       |
  630|      0|      r = add_multi_byte_cclass(cc->mbuf, reg);
  631|      0|    }
  632|      0|    else {
  633|      0|      if (IS_NCCLASS_NOT(cc))
  ------------------
  |  |  809|      0|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|      0|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (802:37): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  634|      0|	add_opcode(reg, OP_CCLASS_MIX_NOT);
  635|      0|      else
  636|      0|	add_opcode(reg, OP_CCLASS_MIX);
  637|       |
  638|      0|      r = add_bitset(reg, cc->bs);
  639|      0|      if (r) return r;
  ------------------
  |  Branch (639:11): [True: 0, False: 0]
  ------------------
  640|      0|      r = add_multi_byte_cclass(cc->mbuf, reg);
  641|      0|    }
  642|      0|  }
  643|       |
  644|  16.5k|  return r;
  645|  16.5k|}
regcomp.c:add_bitset:
  295|  16.5k|{
  296|  16.5k|  BBUF_ADD(reg, bs, SIZE_BITSET);
  ------------------
  |  |  504|  16.5k|#define BBUF_ADD(buf,bytes,n)       BBUF_WRITE((buf),(buf)->used,(bytes),(n))
  |  |  ------------------
  |  |  |  |  490|  16.5k|#define BBUF_WRITE(buf,pos,bytes,n) do{\
  |  |  |  |  491|  16.5k|  int used = (pos) + (int )(n);\
  |  |  |  |  492|  16.5k|  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  470|  6.60k|#define BBUF_EXPAND(buf,low) do{\
  |  |  |  |  |  |  471|  6.60k|  UChar *tmp;\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   76|  6.60k|# define UChar OnigUChar
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  472|  8.26k|  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (472:36): [True: 1.65k, False: 6.60k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  473|  6.60k|  tmp = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  6.60k|# define xrealloc    realloc
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  474|  6.60k|  if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  311|  6.60k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (311:39): [True: 0, False: 6.60k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  475|  6.60k|  (buf)->p = tmp;\
  |  |  |  |  |  |  476|  6.60k|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (476:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (492:7): [True: 6.60k, False: 9.91k]
  |  |  |  |  ------------------
  |  |  |  |  493|  16.5k|  xmemcpy((buf)->p + (pos), (bytes), (n));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  215|  16.5k|#define xmemcpy     memcpy
  |  |  |  |  ------------------
  |  |  |  |  494|  16.5k|  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (494:7): [True: 16.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  495|  16.5k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (495:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  297|  16.5k|  return 0;
  298|  16.5k|}
regcomp.c:add_length:
  241|  7.43k|{
  242|  7.43k|  LengthType l = (LengthType )len;
  243|       |
  244|  7.43k|  BBUF_ADD(reg, &l, SIZE_LENGTH);
  ------------------
  |  |  504|  7.43k|#define BBUF_ADD(buf,bytes,n)       BBUF_WRITE((buf),(buf)->used,(bytes),(n))
  |  |  ------------------
  |  |  |  |  490|  7.43k|#define BBUF_WRITE(buf,pos,bytes,n) do{\
  |  |  |  |  491|  7.43k|  int used = (pos) + (int )(n);\
  |  |  |  |  492|  7.43k|  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  470|      0|#define BBUF_EXPAND(buf,low) do{\
  |  |  |  |  |  |  471|      0|  UChar *tmp;\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   76|      0|# define UChar OnigUChar
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (472:36): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  473|      0|  tmp = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|# define xrealloc    realloc
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  474|      0|  if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  475|      0|  (buf)->p = tmp;\
  |  |  |  |  |  |  476|      0|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (476:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (492:7): [True: 0, False: 7.43k]
  |  |  |  |  ------------------
  |  |  |  |  493|  7.43k|  xmemcpy((buf)->p + (pos), (bytes), (n));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  215|  7.43k|#define xmemcpy     memcpy
  |  |  |  |  ------------------
  |  |  |  |  494|  7.43k|  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (494:7): [True: 7.43k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  495|  7.43k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (495:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  245|  7.43k|  return 0;
  246|  7.43k|}
regcomp.c:add_mem_num:
  250|  4.13k|{
  251|  4.13k|  MemNumType n = (MemNumType )num;
  252|       |
  253|  4.13k|  BBUF_ADD(reg, &n, SIZE_MEMNUM);
  ------------------
  |  |  504|  4.13k|#define BBUF_ADD(buf,bytes,n)       BBUF_WRITE((buf),(buf)->used,(bytes),(n))
  |  |  ------------------
  |  |  |  |  490|  4.13k|#define BBUF_WRITE(buf,pos,bytes,n) do{\
  |  |  |  |  491|  4.13k|  int used = (pos) + (int )(n);\
  |  |  |  |  492|  4.13k|  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  470|      0|#define BBUF_EXPAND(buf,low) do{\
  |  |  |  |  |  |  471|      0|  UChar *tmp;\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   76|      0|# define UChar OnigUChar
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (472:36): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  473|      0|  tmp = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|# define xrealloc    realloc
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  474|      0|  if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  475|      0|  (buf)->p = tmp;\
  |  |  |  |  |  |  476|      0|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (476:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (492:7): [True: 0, False: 4.13k]
  |  |  |  |  ------------------
  |  |  |  |  493|  4.13k|  xmemcpy((buf)->p + (pos), (bytes), (n));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  215|  4.13k|#define xmemcpy     memcpy
  |  |  |  |  ------------------
  |  |  |  |  494|  4.13k|  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (494:7): [True: 4.13k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  495|  4.13k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (495:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|  4.13k|  return 0;
  255|  4.13k|}
regcomp.c:compile_quantifier_node:
 1033|  7.02k|{
 1034|  7.02k|  int i, r, mod_tlen;
 1035|  7.02k|  int infinite = IS_REPEAT_INFINITE(qn->upper);
  ------------------
  |  |  422|  7.02k|#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
  |  |  ------------------
  |  |  |  |  421|  7.02k|#define REPEAT_INFINITE         -1
  |  |  ------------------
  ------------------
 1036|  7.02k|  int empty_info = qn->target_empty_info;
 1037|  7.02k|  int tlen = compile_length_tree(qn->target, reg);
 1038|       |
 1039|  7.02k|  if (tlen < 0) return tlen;
  ------------------
  |  Branch (1039:7): [True: 0, False: 7.02k]
  ------------------
 1040|       |
 1041|  7.02k|  if (is_anychar_star_quantifier(qn)) {
  ------------------
  |  Branch (1041:7): [True: 2.06k, False: 4.95k]
  ------------------
 1042|  2.06k|    r = compile_tree_n_times(qn->target, qn->lower, reg);
 1043|  2.06k|    if (r) return r;
  ------------------
  |  Branch (1043:9): [True: 0, False: 2.06k]
  ------------------
 1044|  2.06k|    if (IS_NOT_NULL(qn->next_head_exact)) {
  ------------------
  |  |  312|  2.06k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 826, False: 1.23k]
  |  |  ------------------
  ------------------
 1045|    826|      if (IS_MULTILINE(reg->options))
  ------------------
  |  |  395|    826|#define IS_MULTILINE(option)      ((option) & ONIG_OPTION_MULTILINE)
  |  |  ------------------
  |  |  |  |  456|    826|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  455|    826|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  454|    826|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (395:35): [True: 0, False: 826]
  |  |  ------------------
  ------------------
 1046|      0|	r = add_opcode(reg, OP_ANYCHAR_ML_STAR_PEEK_NEXT);
 1047|    826|      else
 1048|    826|	r = add_opcode(reg, OP_ANYCHAR_STAR_PEEK_NEXT);
 1049|    826|      if (r) return r;
  ------------------
  |  Branch (1049:11): [True: 0, False: 826]
  ------------------
 1050|    826|      return add_bytes(reg, NSTR(qn->next_head_exact)->s, 1);
  ------------------
  |  |   76|    826|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1051|    826|    }
 1052|  1.23k|    else {
 1053|  1.23k|      if (IS_MULTILINE(reg->options))
  ------------------
  |  |  395|  1.23k|#define IS_MULTILINE(option)      ((option) & ONIG_OPTION_MULTILINE)
  |  |  ------------------
  |  |  |  |  456|  1.23k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  455|  1.23k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  454|  1.23k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (395:35): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
 1054|      0|	return add_opcode(reg, OP_ANYCHAR_ML_STAR);
 1055|  1.23k|      else
 1056|  1.23k|	return add_opcode(reg, OP_ANYCHAR_STAR);
 1057|  1.23k|    }
 1058|  2.06k|  }
 1059|       |
 1060|  4.95k|  if (empty_info != 0)
  ------------------
  |  Branch (1060:7): [True: 0, False: 4.95k]
  ------------------
 1061|      0|    mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END);
  ------------------
  |  |  742|      0|#define SIZE_OP_NULL_CHECK_START       (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_NULL_CHECK_START       (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
                  mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END);
  ------------------
  |  |  743|      0|#define SIZE_OP_NULL_CHECK_END         (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_NULL_CHECK_END         (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
 1062|  4.95k|  else
 1063|  4.95k|    mod_tlen = tlen;
 1064|       |
 1065|  4.95k|  if (infinite &&
  ------------------
  |  Branch (1065:7): [True: 4.54k, False: 413]
  ------------------
 1066|  4.95k|      (qn->lower <= 1 || tlen * qn->lower <= QUANTIFIER_EXPAND_LIMIT_SIZE)) {
  ------------------
  |  |  724|      0|#define QUANTIFIER_EXPAND_LIMIT_SIZE   50
  ------------------
  |  Branch (1066:8): [True: 4.54k, False: 0]
  |  Branch (1066:26): [True: 0, False: 0]
  ------------------
 1067|  4.54k|    if (qn->lower == 1 && tlen > QUANTIFIER_EXPAND_LIMIT_SIZE) {
  ------------------
  |  |  724|  2.06k|#define QUANTIFIER_EXPAND_LIMIT_SIZE   50
  ------------------
  |  Branch (1067:9): [True: 2.06k, False: 2.47k]
  |  Branch (1067:27): [True: 0, False: 2.06k]
  ------------------
 1068|      0|      if (qn->greedy) {
  ------------------
  |  Branch (1068:11): [True: 0, False: 0]
  ------------------
 1069|       |#ifdef USE_OP_PUSH_OR_JUMP_EXACT
 1070|       |	if (IS_NOT_NULL(qn->head_exact))
 1071|       |	  r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH_OR_JUMP_EXACT1);
 1072|       |	else
 1073|       |#endif
 1074|      0|	if (IS_NOT_NULL(qn->next_head_exact))
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1075|      0|	  r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH_IF_PEEK_NEXT);
  ------------------
  |  |  724|      0|#define SIZE_OP_PUSH_IF_PEEK_NEXT      (SIZE_OPCODE + SIZE_RELADDR + 1)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH_IF_PEEK_NEXT      (SIZE_OPCODE + SIZE_RELADDR + 1)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1076|      0|	else
 1077|      0|	  r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH);
  ------------------
  |  |  721|      0|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1078|      0|      }
 1079|      0|      else {
 1080|      0|	r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_JUMP);
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1081|      0|      }
 1082|      0|      if (r) return r;
  ------------------
  |  Branch (1082:11): [True: 0, False: 0]
  ------------------
 1083|      0|    }
 1084|  4.54k|    else {
 1085|  4.54k|      r = compile_tree_n_times(qn->target, qn->lower, reg);
 1086|  4.54k|      if (r) return r;
  ------------------
  |  Branch (1086:11): [True: 0, False: 4.54k]
  ------------------
 1087|  4.54k|    }
 1088|       |
 1089|  4.54k|    if (qn->greedy) {
  ------------------
  |  Branch (1089:9): [True: 4.13k, False: 413]
  ------------------
 1090|       |#ifdef USE_OP_PUSH_OR_JUMP_EXACT
 1091|       |      if (IS_NOT_NULL(qn->head_exact)) {
 1092|       |	r = add_opcode_rel_addr(reg, OP_PUSH_OR_JUMP_EXACT1,
 1093|       |			     mod_tlen + SIZE_OP_JUMP);
 1094|       |	if (r) return r;
 1095|       |	add_bytes(reg, NSTR(qn->head_exact)->s, 1);
 1096|       |	r = compile_tree_empty_check(qn->target, reg, empty_info);
 1097|       |	if (r) return r;
 1098|       |	r = add_opcode_rel_addr(reg, OP_JUMP,
 1099|       |	-(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH_OR_JUMP_EXACT1));
 1100|       |      }
 1101|       |      else
 1102|       |#endif
 1103|  4.13k|      if (IS_NOT_NULL(qn->next_head_exact)) {
  ------------------
  |  |  312|  4.13k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 4.13k]
  |  |  ------------------
  ------------------
 1104|      0|	r = add_opcode_rel_addr(reg, OP_PUSH_IF_PEEK_NEXT,
 1105|      0|				mod_tlen + SIZE_OP_JUMP);
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1106|      0|	if (r) return r;
  ------------------
  |  Branch (1106:6): [True: 0, False: 0]
  ------------------
 1107|      0|	add_bytes(reg, NSTR(qn->next_head_exact)->s, 1);
  ------------------
  |  |   76|      0|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1108|      0|	r = compile_tree_empty_check(qn->target, reg, empty_info);
 1109|      0|	if (r) return r;
  ------------------
  |  Branch (1109:6): [True: 0, False: 0]
  ------------------
 1110|      0|	r = add_opcode_rel_addr(reg, OP_JUMP,
 1111|      0|          -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH_IF_PEEK_NEXT));
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
                        -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH_IF_PEEK_NEXT));
  ------------------
  |  |  724|      0|#define SIZE_OP_PUSH_IF_PEEK_NEXT      (SIZE_OPCODE + SIZE_RELADDR + 1)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH_IF_PEEK_NEXT      (SIZE_OPCODE + SIZE_RELADDR + 1)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1112|      0|      }
 1113|  4.13k|      else {
 1114|  4.13k|	r = add_opcode_rel_addr(reg, OP_PUSH, mod_tlen + SIZE_OP_JUMP);
  ------------------
  |  |  720|  4.13k|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  4.13k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  4.13k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1115|  4.13k|	if (r) return r;
  ------------------
  |  Branch (1115:6): [True: 0, False: 4.13k]
  ------------------
 1116|  4.13k|	r = compile_tree_empty_check(qn->target, reg, empty_info);
 1117|  4.13k|	if (r) return r;
  ------------------
  |  Branch (1117:6): [True: 0, False: 4.13k]
  ------------------
 1118|  4.13k|	r = add_opcode_rel_addr(reg, OP_JUMP,
 1119|  4.13k|		     -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH));
  ------------------
  |  |  720|  4.13k|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  4.13k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  4.13k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
              		     -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH));
  ------------------
  |  |  721|  4.13k|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  4.13k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  4.13k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1120|  4.13k|      }
 1121|  4.13k|    }
 1122|    413|    else {
 1123|    413|      r = add_opcode_rel_addr(reg, OP_JUMP, mod_tlen);
 1124|    413|      if (r) return r;
  ------------------
  |  Branch (1124:11): [True: 0, False: 413]
  ------------------
 1125|    413|      r = compile_tree_empty_check(qn->target, reg, empty_info);
 1126|    413|      if (r) return r;
  ------------------
  |  Branch (1126:11): [True: 0, False: 413]
  ------------------
 1127|    413|      r = add_opcode_rel_addr(reg, OP_PUSH, -(mod_tlen + (int )SIZE_OP_PUSH));
  ------------------
  |  |  721|    413|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|    413|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|    413|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1128|    413|    }
 1129|  4.54k|  }
 1130|    413|  else if (qn->upper == 0 && qn->is_referred != 0) { /* /(?<n>..){0}/ */
  ------------------
  |  Branch (1130:12): [True: 0, False: 413]
  |  Branch (1130:30): [True: 0, False: 0]
  ------------------
 1131|      0|    r = add_opcode_rel_addr(reg, OP_JUMP, tlen);
 1132|      0|    if (r) return r;
  ------------------
  |  Branch (1132:9): [True: 0, False: 0]
  ------------------
 1133|      0|    r = compile_tree(qn->target, reg);
 1134|      0|  }
 1135|    413|  else if (!infinite && qn->greedy &&
  ------------------
  |  Branch (1135:12): [True: 413, False: 0]
  |  Branch (1135:25): [True: 413, False: 0]
  ------------------
 1136|    413|           (qn->upper == 1 || (tlen + SIZE_OP_PUSH) * qn->upper
  ------------------
  |  |  721|      0|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
  |  Branch (1136:13): [True: 413, False: 0]
  |  Branch (1136:31): [True: 0, False: 0]
  ------------------
 1137|    413|                                  <= QUANTIFIER_EXPAND_LIMIT_SIZE)) {
  ------------------
  |  |  724|      0|#define QUANTIFIER_EXPAND_LIMIT_SIZE   50
  ------------------
 1138|    413|    int n = qn->upper - qn->lower;
 1139|       |
 1140|    413|    r = compile_tree_n_times(qn->target, qn->lower, reg);
 1141|    413|    if (r) return r;
  ------------------
  |  Branch (1141:9): [True: 0, False: 413]
  ------------------
 1142|       |
 1143|    826|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1143:17): [True: 413, False: 413]
  ------------------
 1144|    413|      r = add_opcode_rel_addr(reg, OP_PUSH,
 1145|    413|			   (n - i) * tlen + (n - i - 1) * SIZE_OP_PUSH);
  ------------------
  |  |  721|    413|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|    413|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|    413|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1146|    413|      if (r) return r;
  ------------------
  |  Branch (1146:11): [True: 0, False: 413]
  ------------------
 1147|    413|      r = compile_tree(qn->target, reg);
 1148|    413|      if (r) return r;
  ------------------
  |  Branch (1148:11): [True: 0, False: 413]
  ------------------
 1149|    413|    }
 1150|    413|  }
 1151|      0|  else if (!qn->greedy && qn->upper == 1 && qn->lower == 0) { /* '??' */
  ------------------
  |  Branch (1151:12): [True: 0, False: 0]
  |  Branch (1151:27): [True: 0, False: 0]
  |  Branch (1151:45): [True: 0, False: 0]
  ------------------
 1152|      0|    r = add_opcode_rel_addr(reg, OP_PUSH, SIZE_OP_JUMP);
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1153|      0|    if (r) return r;
  ------------------
  |  Branch (1153:9): [True: 0, False: 0]
  ------------------
 1154|      0|    r = add_opcode_rel_addr(reg, OP_JUMP, tlen);
 1155|      0|    if (r) return r;
  ------------------
  |  Branch (1155:9): [True: 0, False: 0]
  ------------------
 1156|      0|    r = compile_tree(qn->target, reg);
 1157|      0|  }
 1158|      0|  else {
 1159|      0|    r = compile_range_repeat_node(qn, mod_tlen, empty_info, reg);
 1160|      0|  }
 1161|  4.95k|  return r;
 1162|  4.95k|}
regcomp.c:is_anychar_star_quantifier:
  716|  7.02k|{
  717|  7.02k|  if (qn->greedy && IS_REPEAT_INFINITE(qn->upper) &&
  ------------------
  |  |  422|  13.6k|#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
  |  |  ------------------
  |  |  |  |  421|  6.60k|#define REPEAT_INFINITE         -1
  |  |  ------------------
  |  |  |  Branch (422:33): [True: 6.19k, False: 413]
  |  |  ------------------
  ------------------
  |  Branch (717:7): [True: 6.60k, False: 413]
  ------------------
  718|  7.02k|      NTYPE(qn->target) == NT_CANY)
  ------------------
  |  |   69|  6.19k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
                    NTYPE(qn->target) == NT_CANY)
  ------------------
  |  |   41|  6.19k|#define NT_CANY        3
  ------------------
  |  Branch (718:7): [True: 2.06k, False: 4.13k]
  ------------------
  719|  2.06k|    return 1;
  720|  4.95k|  else
  721|  4.95k|    return 0;
  722|  7.02k|}
regcomp.c:compile_tree_n_times:
  414|  12.3k|{
  415|  12.3k|  int i, r;
  416|       |
  417|  19.8k|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (417:15): [True: 7.43k, False: 12.3k]
  ------------------
  418|  7.43k|    r = compile_tree(node, reg);
  419|  7.43k|    if (r) return r;
  ------------------
  |  Branch (419:9): [True: 0, False: 7.43k]
  ------------------
  420|  7.43k|  }
  421|  12.3k|  return 0;
  422|  12.3k|}
regcomp.c:compile_tree_empty_check:
  367|  4.54k|{
  368|  4.54k|  int r;
  369|  4.54k|  int saved_num_null_check = reg->num_null_check;
  370|       |
  371|  4.54k|  if (empty_info != 0) {
  ------------------
  |  Branch (371:7): [True: 0, False: 4.54k]
  ------------------
  372|      0|    r = add_opcode(reg, OP_NULL_CHECK_START);
  373|      0|    if (r) return r;
  ------------------
  |  Branch (373:9): [True: 0, False: 0]
  ------------------
  374|      0|    r = add_mem_num(reg, reg->num_null_check); /* NULL CHECK ID */
  375|      0|    if (r) return r;
  ------------------
  |  Branch (375:9): [True: 0, False: 0]
  ------------------
  376|      0|    reg->num_null_check++;
  377|      0|  }
  378|       |
  379|  4.54k|  r = compile_tree(node, reg);
  380|  4.54k|  if (r) return r;
  ------------------
  |  Branch (380:7): [True: 0, False: 4.54k]
  ------------------
  381|       |
  382|  4.54k|  if (empty_info != 0) {
  ------------------
  |  Branch (382:7): [True: 0, False: 4.54k]
  ------------------
  383|      0|    if (empty_info == NQ_TARGET_IS_EMPTY)
  ------------------
  |  |  123|      0|#define NQ_TARGET_IS_EMPTY        1
  ------------------
  |  Branch (383:9): [True: 0, False: 0]
  ------------------
  384|      0|      r = add_opcode(reg, OP_NULL_CHECK_END);
  385|      0|    else if (empty_info == NQ_TARGET_IS_EMPTY_MEM)
  ------------------
  |  |  124|      0|#define NQ_TARGET_IS_EMPTY_MEM    2
  ------------------
  |  Branch (385:14): [True: 0, False: 0]
  ------------------
  386|      0|      r = add_opcode(reg, OP_NULL_CHECK_END_MEMST);
  387|      0|    else if (empty_info == NQ_TARGET_IS_EMPTY_REC)
  ------------------
  |  |  125|      0|#define NQ_TARGET_IS_EMPTY_REC    3
  ------------------
  |  Branch (387:14): [True: 0, False: 0]
  ------------------
  388|      0|      r = add_opcode(reg, OP_NULL_CHECK_END_MEMST_PUSH);
  389|       |
  390|      0|    if (r) return r;
  ------------------
  |  Branch (390:9): [True: 0, False: 0]
  ------------------
  391|      0|    r = add_mem_num(reg, saved_num_null_check); /* NULL CHECK ID */
  392|      0|  }
  393|  4.54k|  return r;
  394|  4.54k|}
regcomp.c:compile_enclose_node:
 1308|  7.84k|{
 1309|  7.84k|  int r, len;
 1310|       |
 1311|  7.84k|  if (node->type == ENCLOSE_OPTION)
  ------------------
  |  |   95|  7.84k|#define ENCLOSE_OPTION           (1<<1)
  ------------------
  |  Branch (1311:7): [True: 413, False: 7.43k]
  ------------------
 1312|    413|    return compile_option_node(node, reg);
 1313|       |
 1314|  7.43k|  switch (node->type) {
 1315|  2.06k|  case ENCLOSE_MEMORY:
  ------------------
  |  |   94|  2.06k|#define ENCLOSE_MEMORY           (1<<0)
  ------------------
  |  Branch (1315:3): [True: 2.06k, False: 5.36k]
  ------------------
 1316|  2.06k|#ifdef USE_SUBEXP_CALL
 1317|  2.06k|    if (IS_ENCLOSE_CALLED(node)) {
  ------------------
  |  |  147|  2.06k|#define IS_ENCLOSE_CALLED(en)          (((en)->state & NST_CALLED)        != 0)
  |  |  ------------------
  |  |  |  |  136|  2.06k|#define NST_CALLED                (1<<8)
  |  |  ------------------
  |  |  |  Branch (147:40): [True: 0, False: 2.06k]
  |  |  ------------------
  ------------------
 1318|      0|      r = add_opcode(reg, OP_CALL);
 1319|      0|      if (r) return r;
  ------------------
  |  Branch (1319:11): [True: 0, False: 0]
  ------------------
 1320|      0|      node->call_addr = BBUF_GET_OFFSET_POS(reg) + SIZE_ABSADDR + SIZE_OP_JUMP;
  ------------------
  |  |  507|      0|#define BBUF_GET_OFFSET_POS(buf)    ((buf)->used)
  ------------------
                    node->call_addr = BBUF_GET_OFFSET_POS(reg) + SIZE_ABSADDR + SIZE_OP_JUMP;
  ------------------
  |  |  690|      0|#define SIZE_ABSADDR          (int )sizeof(AbsAddrType)
  ------------------
                    node->call_addr = BBUF_GET_OFFSET_POS(reg) + SIZE_ABSADDR + SIZE_OP_JUMP;
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1321|      0|      node->state |= NST_ADDR_FIXED;
  ------------------
  |  |  137|      0|#define NST_ADDR_FIXED            (1<<9)
  ------------------
 1322|      0|      r = add_abs_addr(reg, (int )node->call_addr);
 1323|      0|      if (r) return r;
  ------------------
  |  Branch (1323:11): [True: 0, False: 0]
  ------------------
 1324|      0|      len = compile_length_tree(node->target, reg);
 1325|      0|      len += (SIZE_OP_MEMORY_START_PUSH + SIZE_OP_RETURN);
  ------------------
  |  |  735|      0|#define SIZE_OP_MEMORY_START_PUSH      (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_START_PUSH      (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
                    len += (SIZE_OP_MEMORY_START_PUSH + SIZE_OP_RETURN);
  ------------------
  |  |  748|      0|#define SIZE_OP_RETURN                  SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
 1326|      0|      if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
  ------------------
  |  |  371|      0|  ((n) < (int )BIT_STATUS_BITS_NUM  ?  ((stats) & ((BitStatusType )1 << n)) : ((stats) & 1))
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (371:3): [True: 0, False: 0]
  |  |  |  Branch (371:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1327|      0|	len += (IS_ENCLOSE_RECURSION(node)
  ------------------
  |  |  149|      0|#define IS_ENCLOSE_RECURSION(en)       (((en)->state & NST_RECURSION)     != 0)
  |  |  ------------------
  |  |  |  |  135|      0|#define NST_RECURSION             (1<<7)
  |  |  ------------------
  |  |  |  Branch (149:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1328|      0|		? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH);
  ------------------
  |  |  737|      0|#define SIZE_OP_MEMORY_END_PUSH_REC    (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_END_PUSH_REC    (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
              		? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH);
  ------------------
  |  |  736|      0|#define SIZE_OP_MEMORY_END_PUSH        (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_END_PUSH        (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
 1329|      0|      else
 1330|      0|	len += (IS_ENCLOSE_RECURSION(node)
  ------------------
  |  |  149|      0|#define IS_ENCLOSE_RECURSION(en)       (((en)->state & NST_RECURSION)     != 0)
  |  |  ------------------
  |  |  |  |  135|      0|#define NST_RECURSION             (1<<7)
  |  |  ------------------
  |  |  |  Branch (149:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1331|      0|		? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END);
  ------------------
  |  |  739|      0|#define SIZE_OP_MEMORY_END_REC         (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_END_REC         (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
              		? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END);
  ------------------
  |  |  738|      0|#define SIZE_OP_MEMORY_END             (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_MEMORY_END             (SIZE_OPCODE + SIZE_MEMNUM)
  |  |  ------------------
  |  |  |  |  692|      0|#define SIZE_MEMNUM           (int )sizeof(MemNumType)
  |  |  ------------------
  ------------------
 1332|       |
 1333|      0|      r = add_opcode_rel_addr(reg, OP_JUMP, len);
 1334|      0|      if (r) return r;
  ------------------
  |  Branch (1334:11): [True: 0, False: 0]
  ------------------
 1335|      0|    }
 1336|  2.06k|#endif
 1337|  2.06k|    if (BIT_STATUS_AT(reg->bt_mem_start, node->regnum))
  ------------------
  |  |  371|  2.06k|  ((n) < (int )BIT_STATUS_BITS_NUM  ?  ((stats) & ((BitStatusType )1 << n)) : ((stats) & 1))
  |  |  ------------------
  |  |  |  |  367|  2.06k|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (371:3): [True: 0, False: 2.06k]
  |  |  |  Branch (371:4): [True: 2.06k, False: 0]
  |  |  ------------------
  ------------------
 1338|      0|      r = add_opcode(reg, OP_MEMORY_START_PUSH);
 1339|  2.06k|    else
 1340|  2.06k|      r = add_opcode(reg, OP_MEMORY_START);
 1341|  2.06k|    if (r) return r;
  ------------------
  |  Branch (1341:9): [True: 0, False: 2.06k]
  ------------------
 1342|  2.06k|    r = add_mem_num(reg, node->regnum);
 1343|  2.06k|    if (r) return r;
  ------------------
  |  Branch (1343:9): [True: 0, False: 2.06k]
  ------------------
 1344|  2.06k|    r = compile_tree(node->target, reg);
 1345|  2.06k|    if (r) return r;
  ------------------
  |  Branch (1345:9): [True: 0, False: 2.06k]
  ------------------
 1346|  2.06k|#ifdef USE_SUBEXP_CALL
 1347|  2.06k|    if (IS_ENCLOSE_CALLED(node)) {
  ------------------
  |  |  147|  2.06k|#define IS_ENCLOSE_CALLED(en)          (((en)->state & NST_CALLED)        != 0)
  |  |  ------------------
  |  |  |  |  136|  2.06k|#define NST_CALLED                (1<<8)
  |  |  ------------------
  |  |  |  Branch (147:40): [True: 0, False: 2.06k]
  |  |  ------------------
  ------------------
 1348|      0|      if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
  ------------------
  |  |  371|      0|  ((n) < (int )BIT_STATUS_BITS_NUM  ?  ((stats) & ((BitStatusType )1 << n)) : ((stats) & 1))
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (371:3): [True: 0, False: 0]
  |  |  |  Branch (371:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1349|      0|	r = add_opcode(reg, (IS_ENCLOSE_RECURSION(node)
  ------------------
  |  |  149|      0|#define IS_ENCLOSE_RECURSION(en)       (((en)->state & NST_RECURSION)     != 0)
  |  |  ------------------
  |  |  |  |  135|      0|#define NST_RECURSION             (1<<7)
  |  |  ------------------
  |  |  |  Branch (149:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1350|      0|			     ? OP_MEMORY_END_PUSH_REC : OP_MEMORY_END_PUSH));
 1351|      0|      else
 1352|      0|	r = add_opcode(reg, (IS_ENCLOSE_RECURSION(node)
  ------------------
  |  |  149|      0|#define IS_ENCLOSE_RECURSION(en)       (((en)->state & NST_RECURSION)     != 0)
  |  |  ------------------
  |  |  |  |  135|      0|#define NST_RECURSION             (1<<7)
  |  |  ------------------
  |  |  |  Branch (149:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1353|      0|			     ? OP_MEMORY_END_REC : OP_MEMORY_END));
 1354|       |
 1355|      0|      if (r) return r;
  ------------------
  |  Branch (1355:11): [True: 0, False: 0]
  ------------------
 1356|      0|      r = add_mem_num(reg, node->regnum);
 1357|      0|      if (r) return r;
  ------------------
  |  Branch (1357:11): [True: 0, False: 0]
  ------------------
 1358|      0|      r = add_opcode(reg, OP_RETURN);
 1359|      0|    }
 1360|  2.06k|    else if (IS_ENCLOSE_RECURSION(node)) {
  ------------------
  |  |  149|  2.06k|#define IS_ENCLOSE_RECURSION(en)       (((en)->state & NST_RECURSION)     != 0)
  |  |  ------------------
  |  |  |  |  135|  2.06k|#define NST_RECURSION             (1<<7)
  |  |  ------------------
  |  |  |  Branch (149:40): [True: 0, False: 2.06k]
  |  |  ------------------
  ------------------
 1361|      0|      if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
  ------------------
  |  |  371|      0|  ((n) < (int )BIT_STATUS_BITS_NUM  ?  ((stats) & ((BitStatusType )1 << n)) : ((stats) & 1))
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (371:3): [True: 0, False: 0]
  |  |  |  Branch (371:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1362|      0|	r = add_opcode(reg, OP_MEMORY_END_PUSH_REC);
 1363|      0|      else
 1364|      0|	r = add_opcode(reg, OP_MEMORY_END_REC);
 1365|      0|      if (r) return r;
  ------------------
  |  Branch (1365:11): [True: 0, False: 0]
  ------------------
 1366|      0|      r = add_mem_num(reg, node->regnum);
 1367|      0|    }
 1368|  2.06k|    else
 1369|  2.06k|#endif
 1370|  2.06k|    {
 1371|  2.06k|      if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
  ------------------
  |  |  371|  2.06k|  ((n) < (int )BIT_STATUS_BITS_NUM  ?  ((stats) & ((BitStatusType )1 << n)) : ((stats) & 1))
  |  |  ------------------
  |  |  |  |  367|  2.06k|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (371:3): [True: 0, False: 2.06k]
  |  |  |  Branch (371:4): [True: 2.06k, False: 0]
  |  |  ------------------
  ------------------
 1372|      0|	r = add_opcode(reg, OP_MEMORY_END_PUSH);
 1373|  2.06k|      else
 1374|  2.06k|	r = add_opcode(reg, OP_MEMORY_END);
 1375|  2.06k|      if (r) return r;
  ------------------
  |  Branch (1375:11): [True: 0, False: 2.06k]
  ------------------
 1376|  2.06k|      r = add_mem_num(reg, node->regnum);
 1377|  2.06k|    }
 1378|  2.06k|    break;
 1379|       |
 1380|  5.36k|  case ENCLOSE_STOP_BACKTRACK:
  ------------------
  |  |   96|  5.36k|#define ENCLOSE_STOP_BACKTRACK   (1<<2)
  ------------------
  |  Branch (1380:3): [True: 5.36k, False: 2.06k]
  ------------------
 1381|  5.36k|    if (IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT(node)) {
  ------------------
  |  |  156|  5.36k|    (((en)->state & NST_STOP_BT_SIMPLE_REPEAT) != 0)
  |  |  ------------------
  |  |  |  |  134|  5.36k|#define NST_STOP_BT_SIMPLE_REPEAT (1<<6)
  |  |  ------------------
  |  |  |  Branch (156:5): [True: 5.36k, False: 0]
  |  |  ------------------
  ------------------
 1382|  5.36k|      QtfrNode* qn = NQTFR(node->target);
  ------------------
  |  |   80|  5.36k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 1383|  5.36k|      r = compile_tree_n_times(qn->target, qn->lower, reg);
 1384|  5.36k|      if (r) return r;
  ------------------
  |  Branch (1384:11): [True: 0, False: 5.36k]
  ------------------
 1385|       |
 1386|  5.36k|      len = compile_length_tree(qn->target, reg);
 1387|  5.36k|      if (len < 0) return len;
  ------------------
  |  Branch (1387:11): [True: 0, False: 5.36k]
  ------------------
 1388|       |
 1389|  5.36k|      r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_POP + SIZE_OP_JUMP);
  ------------------
  |  |  722|  5.36k|#define SIZE_OP_POP                     SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|  5.36k|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
                    r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_POP + SIZE_OP_JUMP);
  ------------------
  |  |  720|  5.36k|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  5.36k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  5.36k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1390|  5.36k|      if (r) return r;
  ------------------
  |  Branch (1390:11): [True: 0, False: 5.36k]
  ------------------
 1391|  5.36k|      r = compile_tree(qn->target, reg);
 1392|  5.36k|      if (r) return r;
  ------------------
  |  Branch (1392:11): [True: 0, False: 5.36k]
  ------------------
 1393|  5.36k|      r = add_opcode(reg, OP_POP);
 1394|  5.36k|      if (r) return r;
  ------------------
  |  Branch (1394:11): [True: 0, False: 5.36k]
  ------------------
 1395|  5.36k|      r = add_opcode_rel_addr(reg, OP_JUMP,
 1396|  5.36k|	 -((int )SIZE_OP_PUSH + len + (int )SIZE_OP_POP + (int )SIZE_OP_JUMP));
  ------------------
  |  |  721|  5.36k|#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  5.36k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  5.36k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
              	 -((int )SIZE_OP_PUSH + len + (int )SIZE_OP_POP + (int )SIZE_OP_JUMP));
  ------------------
  |  |  722|  5.36k|#define SIZE_OP_POP                     SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|  5.36k|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
              	 -((int )SIZE_OP_PUSH + len + (int )SIZE_OP_POP + (int )SIZE_OP_JUMP));
  ------------------
  |  |  720|  5.36k|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|  5.36k|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|  5.36k|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1397|  5.36k|    }
 1398|      0|    else {
 1399|      0|      r = add_opcode(reg, OP_PUSH_STOP_BT);
 1400|      0|      if (r) return r;
  ------------------
  |  Branch (1400:11): [True: 0, False: 0]
  ------------------
 1401|      0|      r = compile_tree(node->target, reg);
 1402|      0|      if (r) return r;
  ------------------
  |  Branch (1402:11): [True: 0, False: 0]
  ------------------
 1403|      0|      r = add_opcode(reg, OP_POP_STOP_BT);
 1404|      0|    }
 1405|  5.36k|    break;
 1406|       |
 1407|  5.36k|  case ENCLOSE_CONDITION:
  ------------------
  |  |   97|      0|#define ENCLOSE_CONDITION        (1<<3)
  ------------------
  |  Branch (1407:3): [True: 0, False: 7.43k]
  ------------------
 1408|      0|    r = add_opcode(reg, OP_CONDITION);
 1409|      0|    if (r) return r;
  ------------------
  |  Branch (1409:9): [True: 0, False: 0]
  ------------------
 1410|      0|    r = add_mem_num(reg, node->regnum);
 1411|      0|    if (r) return r;
  ------------------
  |  Branch (1411:9): [True: 0, False: 0]
  ------------------
 1412|       |
 1413|      0|    if (NTYPE(node->target) == NT_ALT) {
  ------------------
  |  |   69|      0|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
                  if (NTYPE(node->target) == NT_ALT) {
  ------------------
  |  |   47|      0|#define NT_ALT         9
  ------------------
  |  Branch (1413:9): [True: 0, False: 0]
  ------------------
 1414|      0|      Node* x = node->target;
 1415|      0|      int len2;
 1416|       |
 1417|      0|      len = compile_length_tree(NCAR(x), reg);  /* yes-node */
  ------------------
  |  |   86|      0|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1418|      0|      if (len < 0) return len;
  ------------------
  |  Branch (1418:11): [True: 0, False: 0]
  ------------------
 1419|      0|      if (NCDR(x) == NULL) return ONIGERR_PARSER_BUG;
  ------------------
  |  |   87|      0|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
                    if (NCDR(x) == NULL) return ONIGERR_PARSER_BUG;
  ------------------
  |  |  634|      0|#define ONIGERR_PARSER_BUG                                    -11
  ------------------
  |  Branch (1419:11): [True: 0, False: 0]
  ------------------
 1420|      0|      x = NCDR(x);
  ------------------
  |  |   87|      0|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1421|      0|      len2 = compile_length_tree(NCAR(x), reg); /* no-node */
  ------------------
  |  |   86|      0|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1422|      0|      if (len2 < 0) return len2;
  ------------------
  |  Branch (1422:11): [True: 0, False: 0]
  ------------------
 1423|      0|      if (NCDR(x) != NULL) return ONIGERR_INVALID_CONDITION_PATTERN;
  ------------------
  |  |   87|      0|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
                    if (NCDR(x) != NULL) return ONIGERR_INVALID_CONDITION_PATTERN;
  ------------------
  |  |  667|      0|#define ONIGERR_INVALID_CONDITION_PATTERN                    -124
  ------------------
  |  Branch (1423:11): [True: 0, False: 0]
  ------------------
 1424|       |
 1425|      0|      x = node->target;
 1426|      0|      r = add_rel_addr(reg, len + SIZE_OP_JUMP);
  ------------------
  |  |  720|      0|#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  |  |               #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
  |  |  ------------------
  |  |  |  |  689|      0|#define SIZE_RELADDR          (int )sizeof(RelAddrType)
  |  |  ------------------
  ------------------
 1427|      0|      if (r) return r;
  ------------------
  |  Branch (1427:11): [True: 0, False: 0]
  ------------------
 1428|      0|      r = compile_tree(NCAR(x), reg);   /* yes-node */
  ------------------
  |  |   86|      0|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1429|      0|      if (r) return r;
  ------------------
  |  Branch (1429:11): [True: 0, False: 0]
  ------------------
 1430|      0|      r = add_opcode_rel_addr(reg, OP_JUMP, len2);
 1431|      0|      if (r) return r;
  ------------------
  |  Branch (1431:11): [True: 0, False: 0]
  ------------------
 1432|      0|      x = NCDR(x);
  ------------------
  |  |   87|      0|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1433|      0|      r = compile_tree(NCAR(x), reg);   /* no-node */
  ------------------
  |  |   86|      0|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1434|      0|    }
 1435|      0|    else {
 1436|      0|      return ONIGERR_PARSER_BUG;
  ------------------
  |  |  634|      0|#define ONIGERR_PARSER_BUG                                    -11
  ------------------
 1437|      0|    }
 1438|      0|    break;
 1439|       |
 1440|      0|  case ENCLOSE_ABSENT:
  ------------------
  |  |   98|      0|#define ENCLOSE_ABSENT           (1<<4)
  ------------------
  |  Branch (1440:3): [True: 0, False: 7.43k]
  ------------------
 1441|      0|    len = compile_length_tree(node->target, reg);
 1442|      0|    if (len < 0) return len;
  ------------------
  |  Branch (1442:9): [True: 0, False: 0]
  ------------------
 1443|       |
 1444|      0|    r = add_opcode(reg, OP_PUSH_ABSENT_POS);
 1445|      0|    if (r) return r;
  ------------------
  |  Branch (1445:9): [True: 0, False: 0]
  ------------------
 1446|      0|    r = add_opcode_rel_addr(reg, OP_ABSENT, len + SIZE_OP_ABSENT_END);
  ------------------
  |  |  752|      0|#define SIZE_OP_ABSENT_END              SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
 1447|      0|    if (r) return r;
  ------------------
  |  Branch (1447:9): [True: 0, False: 0]
  ------------------
 1448|      0|    r = compile_tree(node->target, reg);
 1449|      0|    if (r) return r;
  ------------------
  |  Branch (1449:9): [True: 0, False: 0]
  ------------------
 1450|      0|    r = add_opcode(reg, OP_ABSENT_END);
 1451|      0|    break;
 1452|       |
 1453|      0|  default:
  ------------------
  |  Branch (1453:3): [True: 0, False: 7.43k]
  ------------------
 1454|      0|    return ONIGERR_TYPE_BUG;
  ------------------
  |  |  633|      0|#define ONIGERR_TYPE_BUG                                       -6
  ------------------
 1455|      0|    break;
 1456|  7.43k|  }
 1457|       |
 1458|  7.43k|  return r;
 1459|  7.43k|}
regcomp.c:compile_option_node:
 1187|    413|{
 1188|    413|  int r;
 1189|    413|  OnigOptionType prev = reg->options;
 1190|       |
 1191|    413|  if (IS_DYNAMIC_OPTION(prev ^ node->option)) {
  ------------------
  |  |  416|    413|#define IS_DYNAMIC_OPTION(option)  0
  |  |  ------------------
  |  |  |  Branch (416:36): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1192|      0|    r = add_opcode_option(reg, OP_SET_OPTION_PUSH, node->option);
 1193|      0|    if (r) return r;
  ------------------
  |  Branch (1193:9): [True: 0, False: 0]
  ------------------
 1194|      0|    r = add_opcode_option(reg, OP_SET_OPTION, prev);
 1195|      0|    if (r) return r;
  ------------------
  |  Branch (1195:9): [True: 0, False: 0]
  ------------------
 1196|      0|    r = add_opcode(reg, OP_FAIL);
 1197|      0|    if (r) return r;
  ------------------
  |  Branch (1197:9): [True: 0, False: 0]
  ------------------
 1198|      0|  }
 1199|       |
 1200|    413|  reg->options = node->option;
 1201|    413|  r = compile_tree(node->target, reg);
 1202|    413|  reg->options = prev;
 1203|       |
 1204|    413|  if (IS_DYNAMIC_OPTION(prev ^ node->option)) {
  ------------------
  |  |  416|    413|#define IS_DYNAMIC_OPTION(option)  0
  |  |  ------------------
  |  |  |  Branch (416:36): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1205|      0|    if (r) return r;
  ------------------
  |  Branch (1205:9): [True: 0, False: 0]
  ------------------
 1206|      0|    r = add_opcode_option(reg, OP_SET_OPTION, prev);
 1207|      0|  }
 1208|    413|  return r;
 1209|    413|}
regcomp.c:compile_anchor_node:
 1496|  11.9k|{
 1497|  11.9k|  int r, len;
 1498|       |
 1499|  11.9k|  switch (node->type) {
 1500|      0|  case ANCHOR_BEGIN_BUF:      r = add_opcode(reg, OP_BEGIN_BUF);      break;
  ------------------
  |  |  540|      0|#define ANCHOR_BEGIN_BUF        (1<<0)
  ------------------
  |  Branch (1500:3): [True: 0, False: 11.9k]
  ------------------
 1501|      0|  case ANCHOR_END_BUF:        r = add_opcode(reg, OP_END_BUF);        break;
  ------------------
  |  |  543|      0|#define ANCHOR_END_BUF          (1<<3)
  ------------------
  |  Branch (1501:3): [True: 0, False: 11.9k]
  ------------------
 1502|  8.26k|  case ANCHOR_BEGIN_LINE:     r = add_opcode(reg, OP_BEGIN_LINE);     break;
  ------------------
  |  |  541|  8.26k|#define ANCHOR_BEGIN_LINE       (1<<1)
  ------------------
  |  Branch (1502:3): [True: 8.26k, False: 3.71k]
  ------------------
 1503|  3.30k|  case ANCHOR_END_LINE:       r = add_opcode(reg, OP_END_LINE);       break;
  ------------------
  |  |  545|  3.30k|#define ANCHOR_END_LINE         (1<<5)
  ------------------
  |  Branch (1503:3): [True: 3.30k, False: 8.67k]
  ------------------
 1504|      0|  case ANCHOR_SEMI_END_BUF:   r = add_opcode(reg, OP_SEMI_END_BUF);   break;
  ------------------
  |  |  544|      0|#define ANCHOR_SEMI_END_BUF     (1<<4)
  ------------------
  |  Branch (1504:3): [True: 0, False: 11.9k]
  ------------------
 1505|      0|  case ANCHOR_BEGIN_POSITION: r = add_opcode(reg, OP_BEGIN_POSITION); break;
  ------------------
  |  |  542|      0|#define ANCHOR_BEGIN_POSITION   (1<<2)
  ------------------
  |  Branch (1505:3): [True: 0, False: 11.9k]
  ------------------
 1506|       |
 1507|    413|  case ANCHOR_WORD_BOUND:
  ------------------
  |  |  547|    413|#define ANCHOR_WORD_BOUND       (1<<6)
  ------------------
  |  Branch (1507:3): [True: 413, False: 11.5k]
  ------------------
 1508|    413|    if (node->ascii_range)    r = add_opcode(reg, OP_ASCII_WORD_BOUND);
  ------------------
  |  Branch (1508:9): [True: 0, False: 413]
  ------------------
 1509|    413|    else                      r = add_opcode(reg, OP_WORD_BOUND);
 1510|    413|    break;
 1511|      0|  case ANCHOR_NOT_WORD_BOUND:
  ------------------
  |  |  548|      0|#define ANCHOR_NOT_WORD_BOUND   (1<<7)
  ------------------
  |  Branch (1511:3): [True: 0, False: 11.9k]
  ------------------
 1512|      0|    if (node->ascii_range)    r = add_opcode(reg, OP_NOT_ASCII_WORD_BOUND);
  ------------------
  |  Branch (1512:9): [True: 0, False: 0]
  ------------------
 1513|      0|    else                      r = add_opcode(reg, OP_NOT_WORD_BOUND);
 1514|      0|    break;
 1515|      0|#ifdef USE_WORD_BEGIN_END
 1516|      0|  case ANCHOR_WORD_BEGIN:
  ------------------
  |  |  549|      0|#define ANCHOR_WORD_BEGIN       (1<<8)
  ------------------
  |  Branch (1516:3): [True: 0, False: 11.9k]
  ------------------
 1517|      0|    if (node->ascii_range)    r = add_opcode(reg, OP_ASCII_WORD_BEGIN);
  ------------------
  |  Branch (1517:9): [True: 0, False: 0]
  ------------------
 1518|      0|    else                      r = add_opcode(reg, OP_WORD_BEGIN);
 1519|      0|    break;
 1520|      0|  case ANCHOR_WORD_END:
  ------------------
  |  |  550|      0|#define ANCHOR_WORD_END         (1<<9)
  ------------------
  |  Branch (1520:3): [True: 0, False: 11.9k]
  ------------------
 1521|      0|    if (node->ascii_range)    r = add_opcode(reg, OP_ASCII_WORD_END);
  ------------------
  |  Branch (1521:9): [True: 0, False: 0]
  ------------------
 1522|      0|    else                      r = add_opcode(reg, OP_WORD_END);
 1523|      0|    break;
 1524|      0|#endif
 1525|      0|  case ANCHOR_KEEP:           r = add_opcode(reg, OP_KEEP);           break;
  ------------------
  |  |  559|      0|#define ANCHOR_KEEP             (1<<16)
  ------------------
  |  Branch (1525:3): [True: 0, False: 11.9k]
  ------------------
 1526|       |
 1527|      0|  case ANCHOR_PREC_READ:
  ------------------
  |  |  551|      0|#define ANCHOR_PREC_READ        (1<<10)
  ------------------
  |  Branch (1527:3): [True: 0, False: 11.9k]
  ------------------
 1528|      0|    r = add_opcode(reg, OP_PUSH_POS);
 1529|      0|    if (r) return r;
  ------------------
  |  Branch (1529:9): [True: 0, False: 0]
  ------------------
 1530|      0|    r = compile_tree(node->target, reg);
 1531|      0|    if (r) return r;
  ------------------
  |  Branch (1531:9): [True: 0, False: 0]
  ------------------
 1532|      0|    r = add_opcode(reg, OP_POP_POS);
 1533|      0|    break;
 1534|       |
 1535|      0|  case ANCHOR_PREC_READ_NOT:
  ------------------
  |  |  552|      0|#define ANCHOR_PREC_READ_NOT    (1<<11)
  ------------------
  |  Branch (1535:3): [True: 0, False: 11.9k]
  ------------------
 1536|      0|    len = compile_length_tree(node->target, reg);
 1537|      0|    if (len < 0) return len;
  ------------------
  |  Branch (1537:9): [True: 0, False: 0]
  ------------------
 1538|      0|    r = add_opcode_rel_addr(reg, OP_PUSH_POS_NOT, len + SIZE_OP_FAIL_POS);
  ------------------
  |  |  730|      0|#define SIZE_OP_FAIL_POS                SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
 1539|      0|    if (r) return r;
  ------------------
  |  Branch (1539:9): [True: 0, False: 0]
  ------------------
 1540|      0|    r = compile_tree(node->target, reg);
 1541|      0|    if (r) return r;
  ------------------
  |  Branch (1541:9): [True: 0, False: 0]
  ------------------
 1542|      0|    r = add_opcode(reg, OP_FAIL_POS);
 1543|      0|    break;
 1544|       |
 1545|      0|  case ANCHOR_LOOK_BEHIND:
  ------------------
  |  |  553|      0|#define ANCHOR_LOOK_BEHIND      (1<<12)
  ------------------
  |  Branch (1545:3): [True: 0, False: 11.9k]
  ------------------
 1546|      0|    {
 1547|      0|      int n;
 1548|      0|      r = add_opcode(reg, OP_LOOK_BEHIND);
 1549|      0|      if (r) return r;
  ------------------
  |  Branch (1549:11): [True: 0, False: 0]
  ------------------
 1550|      0|      if (node->char_len < 0) {
  ------------------
  |  Branch (1550:11): [True: 0, False: 0]
  ------------------
 1551|      0|	r = get_char_length_tree(node->target, reg, &n);
 1552|      0|	if (r) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
  ------------------
  |  |  665|      0|#define ONIGERR_INVALID_LOOK_BEHIND_PATTERN                  -122
  ------------------
  |  Branch (1552:6): [True: 0, False: 0]
  ------------------
 1553|      0|      }
 1554|      0|      else
 1555|      0|	n = node->char_len;
 1556|      0|      r = add_length(reg, n);
 1557|      0|      if (r) return r;
  ------------------
  |  Branch (1557:11): [True: 0, False: 0]
  ------------------
 1558|      0|      r = compile_tree(node->target, reg);
 1559|      0|    }
 1560|      0|    break;
 1561|       |
 1562|      0|  case ANCHOR_LOOK_BEHIND_NOT:
  ------------------
  |  |  554|      0|#define ANCHOR_LOOK_BEHIND_NOT  (1<<13)
  ------------------
  |  Branch (1562:3): [True: 0, False: 11.9k]
  ------------------
 1563|      0|    {
 1564|      0|      int n;
 1565|      0|      len = compile_length_tree(node->target, reg);
 1566|      0|      r = add_opcode_rel_addr(reg, OP_PUSH_LOOK_BEHIND_NOT,
 1567|      0|			   len + SIZE_OP_FAIL_LOOK_BEHIND_NOT);
  ------------------
  |  |  746|      0|#define SIZE_OP_FAIL_LOOK_BEHIND_NOT    SIZE_OPCODE
  |  |  ------------------
  |  |  |  |  688|      0|#define SIZE_OPCODE           1
  |  |  ------------------
  ------------------
 1568|      0|      if (r) return r;
  ------------------
  |  Branch (1568:11): [True: 0, False: 0]
  ------------------
 1569|      0|      if (node->char_len < 0) {
  ------------------
  |  Branch (1569:11): [True: 0, False: 0]
  ------------------
 1570|      0|	r = get_char_length_tree(node->target, reg, &n);
 1571|      0|	if (r) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
  ------------------
  |  |  665|      0|#define ONIGERR_INVALID_LOOK_BEHIND_PATTERN                  -122
  ------------------
  |  Branch (1571:6): [True: 0, False: 0]
  ------------------
 1572|      0|      }
 1573|      0|      else
 1574|      0|	n = node->char_len;
 1575|      0|      r = add_length(reg, n);
 1576|      0|      if (r) return r;
  ------------------
  |  Branch (1576:11): [True: 0, False: 0]
  ------------------
 1577|      0|      r = compile_tree(node->target, reg);
 1578|      0|      if (r) return r;
  ------------------
  |  Branch (1578:11): [True: 0, False: 0]
  ------------------
 1579|      0|      r = add_opcode(reg, OP_FAIL_LOOK_BEHIND_NOT);
 1580|      0|    }
 1581|      0|    break;
 1582|       |
 1583|      0|  default:
  ------------------
  |  Branch (1583:3): [True: 0, False: 11.9k]
  ------------------
 1584|      0|    return ONIGERR_TYPE_BUG;
  ------------------
  |  |  633|      0|#define ONIGERR_TYPE_BUG                                       -6
  ------------------
 1585|      0|    break;
 1586|  11.9k|  }
 1587|       |
 1588|  11.9k|  return r;
 1589|  11.9k|}
regcomp.c:add_opcode:
  205|  96.6k|{
  206|  96.6k|  BBUF_ADD1(reg, opcode);
  ------------------
  |  |  505|  96.6k|#define BBUF_ADD1(buf,byte)         BBUF_WRITE1((buf),(buf)->used,(byte))
  |  |  ------------------
  |  |  |  |  497|  96.6k|#define BBUF_WRITE1(buf,pos,byte) do{\
  |  |  |  |  498|  96.6k|  int used = (pos) + 1;\
  |  |  |  |  499|  96.6k|  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  470|  1.23k|#define BBUF_EXPAND(buf,low) do{\
  |  |  |  |  |  |  471|  1.23k|  UChar *tmp;\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   76|  1.23k|# define UChar OnigUChar
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  472|  1.23k|  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (472:36): [True: 0, False: 1.23k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  473|  1.23k|  tmp = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  1.23k|# define xrealloc    realloc
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  474|  1.23k|  if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  311|  1.23k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (311:39): [True: 0, False: 1.23k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  475|  1.23k|  (buf)->p = tmp;\
  |  |  |  |  |  |  476|  1.23k|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (476:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (499:7): [True: 1.23k, False: 95.4k]
  |  |  |  |  ------------------
  |  |  |  |  500|  96.6k|  (buf)->p[(pos)] = (UChar )(byte);\
  |  |  |  |  501|  96.6k|  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (501:7): [True: 96.6k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  502|  96.6k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (502:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  207|  96.6k|  return 0;
  208|  96.6k|}

onigenc_init:
   37|      1|{
   38|      1|  return 0;
   39|      1|}
onigenc_mbclen:
   56|   706k|{
   57|   706k|  int ret = ONIGENC_PRECISE_MBC_ENC_LEN(enc, p, e);
  ------------------
  |  |  356|   706k|#define ONIGENC_PRECISE_MBC_ENC_LEN(enc,p,e)   (enc)->precise_mbc_enc_len(p,e,enc)
  ------------------
   58|   706k|  if (ONIGENC_MBCLEN_CHARFOUND_P(ret)) {
  ------------------
  |  |  346|   706k|#define ONIGENC_MBCLEN_CHARFOUND_P(r)           (0 < (r))
  |  |  ------------------
  |  |  |  Branch (346:49): [True: 706k, False: 0]
  |  |  ------------------
  ------------------
   59|   706k|    ret = ONIGENC_MBCLEN_CHARFOUND_LEN(ret);
  ------------------
  |  |  347|   706k|#define ONIGENC_MBCLEN_CHARFOUND_LEN(r)         (r)
  ------------------
   60|   706k|    if (ret > (int)(e - p)) ret = (int)(e - p); // just for case
  ------------------
  |  Branch (60:9): [True: 0, False: 706k]
  ------------------
   61|   706k|    return ret;
   62|   706k|  }
   63|      0|  else if (ONIGENC_MBCLEN_NEEDMORE_P(ret)) {
  ------------------
  |  |  353|      0|#define ONIGENC_MBCLEN_NEEDMORE_P(r)            ((r) < -1)
  |  |  ------------------
  |  |  |  Branch (353:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   64|      0|    return (int)(e - p);
   65|      0|  }
   66|      0|  return p < e ? 1 : 0;
  ------------------
  |  Branch (66:10): [True: 0, False: 0]
  ------------------
   67|   706k|}
onigenc_always_true_is_allowed_reverse_match:
  677|  4.54k|{
  678|  4.54k|  return TRUE;
  ------------------
  |  |   73|  4.54k|# define TRUE    1
  ------------------
  679|  4.54k|}

onig_strcpy:
  260|   153k|{
  261|   153k|  ptrdiff_t len = end - src;
  262|   153k|  if (len > 0) {
  ------------------
  |  Branch (262:7): [True: 153k, False: 0]
  ------------------
  263|   153k|    xmemcpy(dest, src, len);
  ------------------
  |  |  215|   153k|#define xmemcpy     memcpy
  ------------------
  264|   153k|    dest[len] = (UChar )0;
  265|   153k|  }
  266|   153k|}
onig_st_init_strend_table_with_size:
  407|    413|{
  408|    413|  static const struct st_hash_type hashType = {
  409|    413|    str_end_cmp,
  410|    413|    str_end_hash,
  411|    413|  };
  412|       |
  413|    413|  return (hash_table_type* )
  414|    413|           onig_st_init_table_with_size(&hashType, size);
  415|    413|}
onig_st_lookup_strend:
  420|  1.23k|{
  421|  1.23k|  st_str_end_key key;
  422|       |
  423|  1.23k|  key.s   = (UChar* )str_key;
  424|  1.23k|  key.end = (UChar* )end_key;
  425|       |
  426|  1.23k|  return onig_st_lookup(table, (st_data_t )(&key), value);
  427|  1.23k|}
onig_st_insert_strend:
  432|  1.65k|{
  433|  1.65k|  st_str_end_key* key;
  434|  1.65k|  int result;
  435|       |
  436|  1.65k|  key = (st_str_end_key* )xmalloc(sizeof(st_str_end_key));
  ------------------
  |  |  142|  1.65k|# define xmalloc     malloc
  ------------------
  437|  1.65k|  key->s   = (UChar* )str_key;
  438|  1.65k|  key->end = (UChar* )end_key;
  439|  1.65k|  result = onig_st_insert(table, (st_data_t )key, value);
  440|  1.65k|  if (result) {
  ------------------
  |  Branch (440:7): [True: 0, False: 1.65k]
  ------------------
  441|      0|    xfree(key);
  ------------------
  |  |  145|      0|# define xfree       free
  ------------------
  442|      0|  }
  443|  1.65k|  return result;
  444|  1.65k|}
onig_names_free:
  526|  9.49k|{
  527|  9.49k|  int r;
  528|  9.49k|  NameTable* t;
  529|       |
  530|  9.49k|  r = names_clear(reg);
  531|  9.49k|  if (r) return r;
  ------------------
  |  Branch (531:7): [True: 0, False: 9.49k]
  ------------------
  532|       |
  533|  9.49k|  t = (NameTable* )reg->name_table;
  534|  9.49k|  if (IS_NOT_NULL(t)) onig_st_free_table(t);
  ------------------
  |  |  312|  9.49k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 413, False: 9.08k]
  |  |  ------------------
  ------------------
  535|  9.49k|  reg->name_table = (void* )NULL;
  536|  9.49k|  return 0;
  537|  9.49k|}
onig_node_free:
 1063|  82.6k|{
 1064|   129k| start:
 1065|   129k|  if (IS_NULL(node)) return ;
  ------------------
  |  |  311|   129k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 18.5k, False: 110k]
  |  |  ------------------
  ------------------
 1066|       |
 1067|   110k|  switch (NTYPE(node)) {
  ------------------
  |  |   69|   110k|#define NTYPE(node)             ((node)->u.base.type)
  |  |  ------------------
  |  |  |  Branch (69:33): [True: 4.13k, False: 106k]
  |  |  ------------------
  ------------------
 1068|  17.7k|  case NT_STR:
  ------------------
  |  |   38|  17.7k|#define NT_STR         0
  ------------------
  |  Branch (1068:3): [True: 17.7k, False: 92.9k]
  ------------------
 1069|  17.7k|    if (NSTR(node)->capa != 0 &&
  ------------------
  |  |   76|  17.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
  |  Branch (1069:9): [True: 1.65k, False: 16.1k]
  ------------------
 1070|  17.7k|	IS_NOT_NULL(NSTR(node)->s) && NSTR(node)->s != NSTR(node)->buf) {
  ------------------
  |  |  312|  19.4k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 1.65k, False: 0]
  |  |  ------------------
  ------------------
              	IS_NOT_NULL(NSTR(node)->s) && NSTR(node)->s != NSTR(node)->buf) {
  ------------------
  |  |   76|  1.65k|#define NSTR(node)         (&((node)->u.str))
  ------------------
              	IS_NOT_NULL(NSTR(node)->s) && NSTR(node)->s != NSTR(node)->buf) {
  ------------------
  |  |   76|  1.65k|#define NSTR(node)         (&((node)->u.str))
  ------------------
  |  Branch (1070:32): [True: 1.65k, False: 0]
  ------------------
 1071|  1.65k|      xfree(NSTR(node)->s);
  ------------------
  |  |  145|  1.65k|# define xfree       free
  ------------------
                    xfree(NSTR(node)->s);
  ------------------
  |  |   76|  1.65k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1072|  1.65k|    }
 1073|  17.7k|    break;
 1074|       |
 1075|  40.8k|  case NT_LIST:
  ------------------
  |  |   46|  40.8k|#define NT_LIST        8
  ------------------
  |  Branch (1075:3): [True: 40.8k, False: 69.7k]
  ------------------
 1076|  46.6k|  case NT_ALT:
  ------------------
  |  |   47|  46.6k|#define NT_ALT         9
  ------------------
  |  Branch (1076:3): [True: 5.78k, False: 104k]
  ------------------
 1077|  46.6k|    onig_node_free(NCAR(node));
  ------------------
  |  |   86|  46.6k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  46.6k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1078|  46.6k|    {
 1079|  46.6k|      Node* next_node = NCDR(node);
  ------------------
  |  |   87|  46.6k|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|  46.6k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1080|       |
 1081|  46.6k|      xfree(node);
  ------------------
  |  |  145|  46.6k|# define xfree       free
  ------------------
 1082|  46.6k|      node = next_node;
 1083|  46.6k|      goto start;
 1084|  40.8k|    }
 1085|      0|    break;
 1086|       |
 1087|  9.91k|  case NT_CCLASS:
  ------------------
  |  |   39|  9.91k|#define NT_CCLASS      1
  ------------------
  |  Branch (1087:3): [True: 9.91k, False: 100k]
  ------------------
 1088|  9.91k|    {
 1089|  9.91k|      CClassNode* cc = NCCLASS(node);
  ------------------
  |  |   77|  9.91k|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 1090|       |
 1091|  9.91k|      if (cc->mbuf)
  ------------------
  |  Branch (1091:11): [True: 0, False: 9.91k]
  ------------------
 1092|      0|	bbuf_free(cc->mbuf);
 1093|  9.91k|    }
 1094|  9.91k|    break;
 1095|       |
 1096|  12.3k|  case NT_QTFR:
  ------------------
  |  |   43|  12.3k|#define NT_QTFR        5
  ------------------
  |  Branch (1096:3): [True: 12.3k, False: 98.2k]
  ------------------
 1097|  12.3k|    if (NQTFR(node)->target)
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
  |  Branch (1097:9): [True: 12.3k, False: 0]
  ------------------
 1098|  12.3k|      onig_node_free(NQTFR(node)->target);
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 1099|  12.3k|    break;
 1100|       |
 1101|  7.84k|  case NT_ENCLOSE:
  ------------------
  |  |   44|  7.84k|#define NT_ENCLOSE     6
  ------------------
  |  Branch (1101:3): [True: 7.84k, False: 102k]
  ------------------
 1102|  7.84k|    if (NENCLOSE(node)->target)
  ------------------
  |  |   81|  7.84k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
  |  Branch (1102:9): [True: 7.84k, False: 0]
  ------------------
 1103|  7.84k|      onig_node_free(NENCLOSE(node)->target);
  ------------------
  |  |   81|  7.84k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 1104|  7.84k|    break;
 1105|       |
 1106|      0|  case NT_BREF:
  ------------------
  |  |   42|      0|#define NT_BREF        4
  ------------------
  |  Branch (1106:3): [True: 0, False: 110k]
  ------------------
 1107|      0|    if (IS_NOT_NULL(NBREF(node)->back_dynamic))
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1108|      0|      xfree(NBREF(node)->back_dynamic);
  ------------------
  |  |  145|      0|# define xfree       free
  ------------------
                    xfree(NBREF(node)->back_dynamic);
  ------------------
  |  |   79|      0|#define NBREF(node)        (&((node)->u.bref))
  ------------------
 1109|      0|    break;
 1110|       |
 1111|  11.9k|  case NT_ANCHOR:
  ------------------
  |  |   45|  11.9k|#define NT_ANCHOR      7
  ------------------
  |  Branch (1111:3): [True: 11.9k, False: 98.7k]
  ------------------
 1112|  11.9k|    if (NANCHOR(node)->target)
  ------------------
  |  |   82|  11.9k|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
  |  Branch (1112:9): [True: 0, False: 11.9k]
  ------------------
 1113|      0|      onig_node_free(NANCHOR(node)->target);
  ------------------
  |  |   82|      0|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 1114|  11.9k|    break;
 1115|   110k|  }
 1116|       |
 1117|  64.0k|  xfree(node);
  ------------------
  |  |  145|  64.0k|# define xfree       free
  ------------------
 1118|  64.0k|}
onig_node_new_alt:
 1211|  5.78k|{
 1212|  5.78k|  Node* node = node_new();
 1213|  5.78k|  CHECK_NULL_RETURN(node);
  ------------------
  |  |  313|  5.78k|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|  5.78k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 5.78k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1214|       |
 1215|  5.78k|  SET_NTYPE(node, NT_ALT);
  ------------------
  |  |   71|  5.78k|    do { \
  |  |   72|  5.78k|	int value = ntype; \
  |  |   73|  5.78k|	memcpy(&((node)->u.base.type), &value, sizeof(int)); \
  |  |   74|  5.78k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (74:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1216|  5.78k|  NCAR(node)  = left;
  ------------------
  |  |   86|  5.78k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  5.78k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1217|  5.78k|  NCDR(node) = right;
  ------------------
  |  |   87|  5.78k|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|  5.78k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1218|  5.78k|  return node;
 1219|  5.78k|}
onig_node_new_anchor:
 1223|  11.9k|{
 1224|  11.9k|  Node* node = node_new();
 1225|  11.9k|  CHECK_NULL_RETURN(node);
  ------------------
  |  |  313|  11.9k|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|  11.9k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 11.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1226|       |
 1227|  11.9k|  SET_NTYPE(node, NT_ANCHOR);
  ------------------
  |  |   71|  11.9k|    do { \
  |  |   72|  11.9k|	int value = ntype; \
  |  |   73|  11.9k|	memcpy(&((node)->u.base.type), &value, sizeof(int)); \
  |  |   74|  11.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (74:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1228|  11.9k|  NANCHOR(node)->type     = type;
  ------------------
  |  |   82|  11.9k|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 1229|  11.9k|  NANCHOR(node)->target   = NULL;
  ------------------
  |  |   82|  11.9k|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 1230|  11.9k|  NANCHOR(node)->char_len = -1;
  ------------------
  |  |   82|  11.9k|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 1231|  11.9k|  NANCHOR(node)->ascii_range = 0;
  ------------------
  |  |   82|  11.9k|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 1232|  11.9k|  return node;
 1233|  11.9k|}
onig_node_new_enclose:
 1348|  5.36k|{
 1349|  5.36k|  return node_new_enclose(type);
 1350|  5.36k|}
onig_node_str_cat:
 1377|   152k|{
 1378|   152k|  ptrdiff_t addlen = end - s;
 1379|       |
 1380|   152k|  if (addlen > 0) {
  ------------------
  |  Branch (1380:7): [True: 151k, False: 413]
  ------------------
 1381|   151k|    ptrdiff_t len  = NSTR(node)->end - NSTR(node)->s;
  ------------------
  |  |   76|   151k|#define NSTR(node)         (&((node)->u.str))
  ------------------
                  ptrdiff_t len  = NSTR(node)->end - NSTR(node)->s;
  ------------------
  |  |   76|   151k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1382|       |
 1383|   151k|    if (NSTR(node)->capa > 0 || (len + addlen > NODE_STR_BUF_SIZE - 1)) {
  ------------------
  |  |   76|   151k|#define NSTR(node)         (&((node)->u.str))
  ------------------
                  if (NSTR(node)->capa > 0 || (len + addlen > NODE_STR_BUF_SIZE - 1)) {
  ------------------
  |  |  101|   128k|#define NODE_STR_BUF_SIZE       24  /* sizeof(CClassNode) - sizeof(int)*4 */
  ------------------
  |  Branch (1383:9): [True: 23.1k, False: 128k]
  |  Branch (1383:33): [True: 1.65k, False: 127k]
  ------------------
 1384|  24.7k|      UChar* p;
  ------------------
  |  |   76|  24.7k|# define UChar OnigUChar
  ------------------
 1385|  24.7k|      ptrdiff_t capa = len + addlen + NODE_STR_MARGIN;
  ------------------
  |  |  100|  24.7k|#define NODE_STR_MARGIN         16
  ------------------
 1386|       |
 1387|  24.7k|      if (capa <= NSTR(node)->capa) {
  ------------------
  |  |   76|  24.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
  |  Branch (1387:11): [True: 0, False: 24.7k]
  ------------------
 1388|      0|	onig_strcpy(NSTR(node)->s + len, s, end);
  ------------------
  |  |   76|      0|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1389|      0|      }
 1390|  24.7k|      else {
 1391|  24.7k|	if (NSTR(node)->s == NSTR(node)->buf)
  ------------------
  |  |   76|  24.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
              	if (NSTR(node)->s == NSTR(node)->buf)
  ------------------
  |  |   76|  24.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
  |  Branch (1391:6): [True: 1.65k, False: 23.1k]
  ------------------
 1392|  1.65k|	  p = strcat_capa_from_static(NSTR(node)->s, NSTR(node)->end,
  ------------------
  |  |   76|  1.65k|#define NSTR(node)         (&((node)->u.str))
  ------------------
              	  p = strcat_capa_from_static(NSTR(node)->s, NSTR(node)->end,
  ------------------
  |  |   76|  1.65k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1393|  1.65k|				      s, end, capa);
 1394|  23.1k|	else
 1395|  23.1k|	  p = strcat_capa(NSTR(node)->s, NSTR(node)->end, s, end, capa);
  ------------------
  |  |   76|  23.1k|#define NSTR(node)         (&((node)->u.str))
  ------------------
              	  p = strcat_capa(NSTR(node)->s, NSTR(node)->end, s, end, capa);
  ------------------
  |  |   76|  23.1k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1396|       |
 1397|  24.7k|	CHECK_NULL_RETURN_MEMERR(p);
  ------------------
  |  |  314|  24.7k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  24.7k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 24.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 1398|  24.7k|	NSTR(node)->s    = p;
  ------------------
  |  |   76|  24.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1399|  24.7k|	NSTR(node)->capa = (int )capa;
  ------------------
  |  |   76|  24.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1400|  24.7k|      }
 1401|  24.7k|    }
 1402|   127k|    else {
 1403|   127k|      onig_strcpy(NSTR(node)->s + len, s, end);
  ------------------
  |  |   76|   127k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1404|   127k|    }
 1405|   151k|    NSTR(node)->end = NSTR(node)->s + len + addlen;
  ------------------
  |  |   76|   151k|#define NSTR(node)         (&((node)->u.str))
  ------------------
                  NSTR(node)->end = NSTR(node)->s + len + addlen;
  ------------------
  |  |   76|   151k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1406|   151k|  }
 1407|       |
 1408|   152k|  return 0;
 1409|   152k|}
onig_parse_make_tree:
 6633|  9.49k|{
 6634|  9.49k|  int r;
 6635|  9.49k|  UChar* p;
  ------------------
  |  |   76|  9.49k|# define UChar OnigUChar
  ------------------
 6636|       |
 6637|  9.49k|#ifdef USE_NAMED_GROUP
 6638|  9.49k|  names_clear(reg);
 6639|  9.49k|#endif
 6640|       |
 6641|  9.49k|  scan_env_clear(env);
 6642|  9.49k|  env->option         = reg->options;
 6643|  9.49k|  env->case_fold_flag = reg->case_fold_flag;
 6644|  9.49k|  env->enc            = reg->enc;
 6645|  9.49k|  env->syntax         = reg->syntax;
 6646|  9.49k|  env->pattern        = (UChar* )pattern;
 6647|  9.49k|  env->pattern_end    = (UChar* )end;
 6648|  9.49k|  env->reg            = reg;
 6649|       |
 6650|  9.49k|  *root = NULL;
 6651|  9.49k|  p = (UChar* )pattern;
 6652|  9.49k|  r = parse_regexp(root, &p, (UChar* )end, env);
 6653|  9.49k|  reg->num_mem = env->num_mem;
 6654|  9.49k|  return r;
 6655|  9.49k|}
regparse.c:str_end_hash:
  392|  2.89k|{
  393|  2.89k|  const st_str_end_key *x = (const st_str_end_key *)xp;
  394|  2.89k|  const UChar *p;
  395|  2.89k|  st_index_t val = 0;
  396|       |
  397|  2.89k|  p = x->s;
  398|  13.6k|  while (p < x->end) {
  ------------------
  |  Branch (398:10): [True: 10.7k, False: 2.89k]
  ------------------
  399|  10.7k|    val = val * 997 + (int )*p++;
  400|  10.7k|  }
  401|       |
  402|  2.89k|  return val + (val >> 5);
  403|  2.89k|}
regparse.c:names_clear:
  515|  18.9k|{
  516|  18.9k|  NameTable* t = (NameTable* )reg->name_table;
  517|       |
  518|  18.9k|  if (IS_NOT_NULL(t)) {
  ------------------
  |  |  312|  18.9k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 413, False: 18.5k]
  |  |  ------------------
  ------------------
  519|    413|    onig_st_foreach(t, i_free_name_entry, 0);
  520|    413|  }
  521|  18.9k|  return 0;
  522|  18.9k|}
regparse.c:i_free_name_entry:
  505|  1.65k|{
  506|  1.65k|  xfree(e->name);
  ------------------
  |  |  145|  1.65k|# define xfree       free
  ------------------
  507|  1.65k|  if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs);
  ------------------
  |  |  312|  1.65k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
                if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs);
  ------------------
  |  |  145|      0|# define xfree       free
  ------------------
  508|  1.65k|  xfree(key);
  ------------------
  |  |  145|  1.65k|# define xfree       free
  ------------------
  509|  1.65k|  xfree(e);
  ------------------
  |  |  145|  1.65k|# define xfree       free
  ------------------
  510|  1.65k|  return ST_DELETE;
  511|  1.65k|}
regparse.c:name_find:
  541|  1.65k|{
  542|  1.65k|  NameEntry* e;
  543|  1.65k|  NameTable* t = (NameTable* )reg->name_table;
  544|       |
  545|  1.65k|  e = (NameEntry* )NULL;
  546|  1.65k|  if (IS_NOT_NULL(t)) {
  ------------------
  |  |  312|  1.65k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 1.23k, False: 413]
  |  |  ------------------
  ------------------
  547|  1.23k|    onig_st_lookup_strend(t, name, name_end, (HashDataType* )((void* )(&e)));
  548|  1.23k|  }
  549|  1.65k|  return e;
  550|  1.65k|}
regparse.c:bbuf_free:
  135|  10.7k|{
  136|  10.7k|  if (IS_NOT_NULL(bbuf)) {
  ------------------
  |  |  312|  10.7k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 5.36k, False: 5.36k]
  |  |  ------------------
  ------------------
  137|  5.36k|    if (IS_NOT_NULL(bbuf->p)) xfree(bbuf->p);
  ------------------
  |  |  312|  5.36k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 5.36k, False: 0]
  |  |  ------------------
  ------------------
                  if (IS_NOT_NULL(bbuf->p)) xfree(bbuf->p);
  ------------------
  |  |  145|  5.36k|# define xfree       free
  ------------------
  138|  5.36k|    xfree(bbuf);
  ------------------
  |  |  145|  5.36k|# define xfree       free
  ------------------
  139|  5.36k|  }
  140|  10.7k|}
regparse.c:node_new_list:
 1175|  40.8k|{
 1176|  40.8k|  Node* node = node_new();
 1177|  40.8k|  CHECK_NULL_RETURN(node);
  ------------------
  |  |  313|  40.8k|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|  40.8k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 40.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1178|       |
 1179|  40.8k|  SET_NTYPE(node, NT_LIST);
  ------------------
  |  |   71|  40.8k|    do { \
  |  |   72|  40.8k|	int value = ntype; \
  |  |   73|  40.8k|	memcpy(&((node)->u.base.type), &value, sizeof(int)); \
  |  |   74|  40.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (74:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1180|  40.8k|  NCAR(node)  = left;
  ------------------
  |  |   86|  40.8k|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|  40.8k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1181|  40.8k|  NCDR(node) = right;
  ------------------
  |  |   87|  40.8k|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|  40.8k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 1182|  40.8k|  return node;
 1183|  40.8k|}
regparse.c:node_new:
 1122|   110k|{
 1123|   110k|  Node* node;
 1124|       |
 1125|   110k|  node = (Node* )xmalloc(sizeof(Node));
  ------------------
  |  |  142|   110k|# define xmalloc     malloc
  ------------------
 1126|       |  /* xmemset(node, 0, sizeof(Node)); */
 1127|   110k|  return node;
 1128|   110k|}
regparse.c:node_new_enclose:
 1331|  7.84k|{
 1332|  7.84k|  Node* node = node_new();
 1333|  7.84k|  CHECK_NULL_RETURN(node);
  ------------------
  |  |  313|  7.84k|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|  7.84k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 7.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1334|       |
 1335|  7.84k|  SET_NTYPE(node, NT_ENCLOSE);
  ------------------
  |  |   71|  7.84k|    do { \
  |  |   72|  7.84k|	int value = ntype; \
  |  |   73|  7.84k|	memcpy(&((node)->u.base.type), &value, sizeof(int)); \
  |  |   74|  7.84k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (74:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1336|  7.84k|  NENCLOSE(node)->type      = type;
  ------------------
  |  |   81|  7.84k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 1337|  7.84k|  NENCLOSE(node)->state     =  0;
  ------------------
  |  |   81|  7.84k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 1338|  7.84k|  NENCLOSE(node)->regnum    =  0;
  ------------------
  |  |   81|  7.84k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 1339|  7.84k|  NENCLOSE(node)->option    =  0;
  ------------------
  |  |   81|  7.84k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 1340|  7.84k|  NENCLOSE(node)->target    = NULL;
  ------------------
  |  |   81|  7.84k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 1341|  7.84k|  NENCLOSE(node)->call_addr = -1;
  ------------------
  |  |   81|  7.84k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 1342|  7.84k|  NENCLOSE(node)->opt_count =  0;
  ------------------
  |  |   81|  7.84k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 1343|  7.84k|  return node;
 1344|  7.84k|}
regparse.c:strcat_capa_from_static:
  342|  1.65k|{
  343|  1.65k|  UChar* r;
  ------------------
  |  |   76|  1.65k|# define UChar OnigUChar
  ------------------
  344|       |
  345|  1.65k|  r = (UChar* )xmalloc(capa + 1);
  ------------------
  |  |  142|  1.65k|# define xmalloc     malloc
  ------------------
  346|  1.65k|  CHECK_NULL_RETURN(r);
  ------------------
  |  |  313|  1.65k|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|  1.65k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  347|  1.65k|  onig_strcpy(r, dest, dest_end);
  348|  1.65k|  onig_strcpy(r + (dest_end - dest), src, src_end);
  349|  1.65k|  return r;
  350|  1.65k|}
regparse.c:strcat_capa:
  325|  23.1k|{
  326|  23.1k|  UChar* r;
  ------------------
  |  |   76|  23.1k|# define UChar OnigUChar
  ------------------
  327|       |
  328|  23.1k|  if (dest)
  ------------------
  |  Branch (328:7): [True: 23.1k, False: 0]
  ------------------
  329|  23.1k|    r = (UChar* )xrealloc(dest, capa + 1);
  ------------------
  |  |  143|  23.1k|# define xrealloc    realloc
  ------------------
  330|      0|  else
  331|      0|    r = (UChar* )xmalloc(capa + 1);
  ------------------
  |  |  142|      0|# define xmalloc     malloc
  ------------------
  332|       |
  333|  23.1k|  CHECK_NULL_RETURN(r);
  ------------------
  |  |  313|  23.1k|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|  23.1k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  334|  23.1k|  onig_strcpy(r + (dest_end - dest), src, src_end);
  335|  23.1k|  return r;
  336|  23.1k|}
regparse.c:node_new_str:
 1464|  17.7k|{
 1465|  17.7k|  Node* node = node_new();
 1466|  17.7k|  CHECK_NULL_RETURN(node);
  ------------------
  |  |  313|  17.7k|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|  17.7k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 17.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1467|       |
 1468|  17.7k|  SET_NTYPE(node, NT_STR);
  ------------------
  |  |   71|  17.7k|    do { \
  |  |   72|  17.7k|	int value = ntype; \
  |  |   73|  17.7k|	memcpy(&((node)->u.base.type), &value, sizeof(int)); \
  |  |   74|  17.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (74:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1469|  17.7k|  NSTR(node)->capa = 0;
  ------------------
  |  |   76|  17.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1470|  17.7k|  NSTR(node)->flag = 0;
  ------------------
  |  |   76|  17.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1471|  17.7k|  NSTR(node)->s    = NSTR(node)->buf;
  ------------------
  |  |   76|  17.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
                NSTR(node)->s    = NSTR(node)->buf;
  ------------------
  |  |   76|  17.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1472|  17.7k|  NSTR(node)->end  = NSTR(node)->buf;
  ------------------
  |  |   76|  17.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
                NSTR(node)->end  = NSTR(node)->buf;
  ------------------
  |  |   76|  17.7k|#define NSTR(node)         (&((node)->u.str))
  ------------------
 1473|  17.7k|  if (onig_node_str_cat(node, s, end)) {
  ------------------
  |  Branch (1473:7): [True: 0, False: 17.7k]
  ------------------
 1474|      0|    onig_node_free(node);
 1475|      0|    return NULL;
 1476|      0|  }
 1477|  17.7k|  return node;
 1478|  17.7k|}
regparse.c:scan_env_clear:
  984|  9.49k|{
  985|  9.49k|  int i;
  986|       |
  987|  9.49k|  BIT_STATUS_CLEAR(env->capture_history);
  ------------------
  |  |  368|  9.49k|#define BIT_STATUS_CLEAR(stats)      (stats) = 0
  ------------------
  988|  9.49k|  BIT_STATUS_CLEAR(env->bt_mem_start);
  ------------------
  |  |  368|  9.49k|#define BIT_STATUS_CLEAR(stats)      (stats) = 0
  ------------------
  989|  9.49k|  BIT_STATUS_CLEAR(env->bt_mem_end);
  ------------------
  |  |  368|  9.49k|#define BIT_STATUS_CLEAR(stats)      (stats) = 0
  ------------------
  990|  9.49k|  BIT_STATUS_CLEAR(env->backrefed_mem);
  ------------------
  |  |  368|  9.49k|#define BIT_STATUS_CLEAR(stats)      (stats) = 0
  ------------------
  991|  9.49k|  env->error      = (UChar* )NULL;
  992|  9.49k|  env->error_end  = (UChar* )NULL;
  993|  9.49k|  env->num_call   = 0;
  994|  9.49k|  env->num_mem    = 0;
  995|  9.49k|#ifdef USE_NAMED_GROUP
  996|  9.49k|  env->num_named  = 0;
  997|  9.49k|#endif
  998|  9.49k|  env->mem_alloc         = 0;
  999|  9.49k|  env->mem_nodes_dynamic = (Node** )NULL;
 1000|       |
 1001|  85.4k|  for (i = 0; i < SCANENV_MEMNODES_SIZE; i++)
  ------------------
  |  |  285|  85.4k|#define SCANENV_MEMNODES_SIZE               8
  ------------------
  |  Branch (1001:15): [True: 75.9k, False: 9.49k]
  ------------------
 1002|  75.9k|    env->mem_nodes_static[i] = NULL_NODE;
  ------------------
  |  |  283|  75.9k|#define NULL_NODE  ((Node* )0)
  ------------------
 1003|       |
 1004|       |#ifdef USE_COMBINATION_EXPLOSION_CHECK
 1005|       |  env->num_comb_exp_check  = 0;
 1006|       |  env->comb_exp_max_regnum = 0;
 1007|       |  env->curr_max_regnum     = 0;
 1008|       |  env->has_recursion       = 0;
 1009|       |#endif
 1010|  9.49k|  env->parse_depth         = 0;
 1011|  9.49k|  env->warnings_flag       = 0;
 1012|  9.49k|}
regparse.c:parse_regexp:
 6601|  9.49k|{
 6602|  9.49k|  int r;
 6603|  9.49k|  OnigToken tok;
 6604|       |
 6605|  9.49k|  r = fetch_token(&tok, src, end, env);
 6606|  9.49k|  if (r < 0) return r;
  ------------------
  |  Branch (6606:7): [True: 0, False: 9.49k]
  ------------------
 6607|  9.49k|  r = parse_subexp(top, &tok, TK_EOT, src, end, env);
 6608|  9.49k|  if (r < 0) return r;
  ------------------
  |  Branch (6608:7): [True: 0, False: 9.49k]
  ------------------
 6609|       |
 6610|  9.49k|#ifdef USE_SUBEXP_CALL
 6611|  9.49k|  if (env->num_call > 0) {
  ------------------
  |  Branch (6611:7): [True: 0, False: 9.49k]
  ------------------
 6612|       |    /* Capture the pattern itself. It is used for (?R), (?0) and \g<0>. */
 6613|      0|    const int num = 0;
 6614|      0|    Node* np;
 6615|      0|    np = node_new_enclose_memory(env->option, 0);
 6616|      0|    CHECK_NULL_RETURN_MEMERR(np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6617|      0|    NENCLOSE(np)->regnum = num;
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 6618|      0|    NENCLOSE(np)->target = *top;
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 6619|      0|    r = scan_env_set_mem_node(env, num, np);
 6620|      0|    if (r != 0) {
  ------------------
  |  Branch (6620:9): [True: 0, False: 0]
  ------------------
 6621|      0|	onig_node_free(np);
 6622|      0|	return r;
 6623|      0|    }
 6624|      0|    *top = np;
 6625|      0|  }
 6626|  9.49k|#endif
 6627|  9.49k|  return 0;
 6628|  9.49k|}
regparse.c:fetch_token:
 3306|   213k|{
 3307|   213k|  int r, num;
 3308|   213k|  OnigCodePoint c;
 3309|   213k|  OnigEncoding enc = env->enc;
 3310|   213k|  const OnigSyntaxType* syn = env->syntax;
 3311|   213k|  UChar* prev;
  ------------------
  |  |   76|   213k|# define UChar OnigUChar
  ------------------
 3312|   213k|  UChar* p = *src;
  ------------------
  |  |   76|   213k|# define UChar OnigUChar
  ------------------
 3313|   213k|  PFETCH_READY;
  ------------------
  |  |  295|   213k|# define PFETCH_READY  UChar* pfetch_prev = NULL; (void)pfetch_prev
  |  |  ------------------
  |  |  |  |   76|   213k|# define UChar OnigUChar
  |  |  ------------------
  ------------------
 3314|       |
 3315|   213k| start:
 3316|   213k|  if (PEND) {
  ------------------
  |  |  299|   213k|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 9.49k, False: 203k]
  |  |  |  Branch (299:23): [True: 203k, False: 9.49k]
  |  |  ------------------
  ------------------
 3317|  9.49k|    tok->type = TK_EOT;
 3318|  9.49k|    return tok->type;
 3319|  9.49k|  }
 3320|       |
 3321|   203k|  tok->type  = TK_STRING;
 3322|   203k|  tok->base  = 0;
 3323|   203k|  tok->backp = p;
 3324|       |
 3325|   203k|  PFETCH(c);
  ------------------
  |  |  305|   203k|#define PFETCH(c)  do { \
  |  |  306|   203k|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|   203k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 203k]
  |  |  ------------------
  |  |  307|   203k|  pfetch_prev = p; \
  |  |  308|   203k|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|   203k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|   203k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 203k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|   203k|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3326|   203k|	if (p > end) return ONIGERR_PREMATURE_END_OF_CHAR_CLASS;
  ------------------
  |  |  648|      0|#define ONIGERR_PREMATURE_END_OF_CHAR_CLASS                  -103
  ------------------
  |  Branch (3326:6): [True: 0, False: 203k]
  ------------------
 3327|   203k|  if (IS_MC_ESC_CODE(c, syn)) {
  ------------------
  |  |  769|   203k|  ((code) == MC_ESC(syn) && \
  |  |  ------------------
  |  |  |  |  761|   407k|#define MC_ESC(syn)               (syn)->meta_char_table.esc
  |  |  ------------------
  |  |  |  Branch (769:4): [True: 7.43k, False: 196k]
  |  |  ------------------
  |  |  770|   203k|   !IS_SYNTAX_OP2((syn), ONIG_SYN_OP2_INEFFECTIVE_ESCAPE))
  |  |  ------------------
  |  |  |  |  331|  7.43k|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (770:4): [True: 7.43k, False: 0]
  |  |  ------------------
  ------------------
 3328|  7.43k|    if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
  ------------------
  |  |  299|  7.43k|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 7.43k]
  |  |  |  Branch (299:23): [True: 7.43k, False: 0]
  |  |  ------------------
  ------------------
                  if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
  ------------------
  |  |  649|      0|#define ONIGERR_END_PATTERN_AT_ESCAPE                        -104
  ------------------
 3329|       |
 3330|  7.43k|    tok->backp = p;
 3331|  7.43k|    PFETCH(c);
  ------------------
  |  |  305|  7.43k|#define PFETCH(c)  do { \
  |  |  306|  7.43k|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|  7.43k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 7.43k]
  |  |  ------------------
  |  |  307|  7.43k|  pfetch_prev = p; \
  |  |  308|  7.43k|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|  7.43k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|  7.43k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 7.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|  7.43k|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3332|       |
 3333|  7.43k|    tok->u.c = c;
 3334|  7.43k|    tok->escaped = 1;
 3335|  7.43k|    switch (c) {
 3336|      0|    case '*':
  ------------------
  |  Branch (3336:5): [True: 0, False: 7.43k]
  ------------------
 3337|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3337:11): [True: 0, False: 0]
  ------------------
 3338|      0|      tok->type = TK_OP_REPEAT;
 3339|      0|      tok->u.repeat.lower = 0;
 3340|      0|      tok->u.repeat.upper = REPEAT_INFINITE;
  ------------------
  |  |  421|      0|#define REPEAT_INFINITE         -1
  ------------------
 3341|      0|      goto greedy_check;
 3342|      0|      break;
 3343|       |
 3344|      0|    case '+':
  ------------------
  |  Branch (3344:5): [True: 0, False: 7.43k]
  ------------------
 3345|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_PLUS_ONE_INF)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3345:11): [True: 0, False: 0]
  ------------------
 3346|      0|      tok->type = TK_OP_REPEAT;
 3347|      0|      tok->u.repeat.lower = 1;
 3348|      0|      tok->u.repeat.upper = REPEAT_INFINITE;
  ------------------
  |  |  421|      0|#define REPEAT_INFINITE         -1
  ------------------
 3349|      0|      goto greedy_check;
 3350|      0|      break;
 3351|       |
 3352|      0|    case '?':
  ------------------
  |  Branch (3352:5): [True: 0, False: 7.43k]
  ------------------
 3353|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_QMARK_ZERO_ONE)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3353:11): [True: 0, False: 0]
  ------------------
 3354|      0|      tok->type = TK_OP_REPEAT;
 3355|      0|      tok->u.repeat.lower = 0;
 3356|      0|      tok->u.repeat.upper = 1;
 3357|  12.3k|    greedy_check:
 3358|  12.3k|      if (!PEND && PPEEK_IS('?') &&
  ------------------
  |  |  299|  24.7k|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 11.1k, False: 1.23k]
  |  |  ------------------
  ------------------
                    if (!PEND && PPEEK_IS('?') &&
  ------------------
  |  |  320|  23.5k|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|  11.1k|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|  11.1k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 11.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 413, False: 10.7k]
  |  |  ------------------
  ------------------
  |  Branch (3358:11): [True: 11.1k, False: 1.23k]
  ------------------
 3359|  12.3k|	  IS_SYNTAX_OP(syn, ONIG_SYN_OP_QMARK_NON_GREEDY)) {
  ------------------
  |  |  330|    413|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 413, False: 0]
  |  |  ------------------
  ------------------
 3360|    413|	PFETCH(c);
  ------------------
  |  |  305|    413|#define PFETCH(c)  do { \
  |  |  306|    413|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|    413|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 413]
  |  |  ------------------
  |  |  307|    413|  pfetch_prev = p; \
  |  |  308|    413|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|    413|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|    413|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 413]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|    413|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3361|    413|	tok->u.repeat.greedy     = 0;
 3362|    413|	tok->u.repeat.possessive = 0;
 3363|    413|      }
 3364|  11.9k|      else {
 3365|  11.9k|      possessive_check:
 3366|  11.9k|	if (!PEND && PPEEK_IS('+') &&
  ------------------
  |  |  299|  23.9k|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 10.7k, False: 1.23k]
  |  |  ------------------
  ------------------
              	if (!PEND && PPEEK_IS('+') &&
  ------------------
  |  |  320|  22.7k|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|  10.7k|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|  10.7k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 10.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 0, False: 10.7k]
  |  |  ------------------
  ------------------
  |  Branch (3366:6): [True: 10.7k, False: 1.23k]
  ------------------
 3367|  11.9k|	    ((IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT) &&
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3368|      0|	      tok->type != TK_INTERVAL)  ||
  ------------------
  |  Branch (3368:8): [True: 0, False: 0]
  ------------------
 3369|      0|	     (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL) &&
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3370|      0|	      tok->type == TK_INTERVAL))) {
  ------------------
  |  Branch (3370:8): [True: 0, False: 0]
  ------------------
 3371|      0|	  PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3372|      0|	  tok->u.repeat.greedy     = 1;
 3373|      0|	  tok->u.repeat.possessive = 1;
 3374|      0|	}
 3375|  11.9k|	else {
 3376|  11.9k|	  tok->u.repeat.greedy     = 1;
 3377|  11.9k|	  tok->u.repeat.possessive = 0;
 3378|  11.9k|	}
 3379|  11.9k|      }
 3380|  12.3k|      break;
 3381|       |
 3382|  12.3k|    case '{':
  ------------------
  |  Branch (3382:5): [True: 0, False: 7.43k]
  ------------------
 3383|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3383:11): [True: 0, False: 0]
  ------------------
 3384|      0|      r = fetch_range_quantifier(&p, end, tok, env);
 3385|      0|      if (r < 0) return r;  /* error */
  ------------------
  |  Branch (3385:11): [True: 0, False: 0]
  ------------------
 3386|      0|      if (r == 0) goto greedy_check;
  ------------------
  |  Branch (3386:11): [True: 0, False: 0]
  ------------------
 3387|      0|      else if (r == 2) { /* {n} */
  ------------------
  |  Branch (3387:16): [True: 0, False: 0]
  ------------------
 3388|      0|	if (IS_SYNTAX_BV(syn, ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY))
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3389|      0|	  goto possessive_check;
 3390|       |
 3391|      0|	goto greedy_check;
 3392|      0|      }
 3393|       |      /* r == 1 : normal char */
 3394|      0|      break;
 3395|       |
 3396|      0|    case '|':
  ------------------
  |  Branch (3396:5): [True: 0, False: 7.43k]
  ------------------
 3397|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_VBAR_ALT)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3397:11): [True: 0, False: 0]
  ------------------
 3398|      0|      tok->type = TK_ALT;
 3399|      0|      break;
 3400|       |
 3401|    826|    case '(':
  ------------------
  |  Branch (3401:5): [True: 826, False: 6.60k]
  ------------------
 3402|    826|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LPAREN_SUBEXP)) break;
  ------------------
  |  |  330|    826|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3402:11): [True: 826, False: 0]
  ------------------
 3403|      0|      tok->type = TK_SUBEXP_OPEN;
 3404|      0|      break;
 3405|       |
 3406|    413|    case ')':
  ------------------
  |  Branch (3406:5): [True: 413, False: 7.02k]
  ------------------
 3407|    413|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LPAREN_SUBEXP)) break;
  ------------------
  |  |  330|    413|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3407:11): [True: 413, False: 0]
  ------------------
 3408|      0|      tok->type = TK_SUBEXP_CLOSE;
 3409|      0|      break;
 3410|       |
 3411|      0|    case 'w':
  ------------------
  |  Branch (3411:5): [True: 0, False: 7.43k]
  ------------------
 3412|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3412:11): [True: 0, False: 0]
  ------------------
 3413|      0|      tok->type = TK_CHAR_TYPE;
 3414|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_WORD;
  ------------------
  |  |  306|      0|#define ONIGENC_CTYPE_WORD     12
  ------------------
 3415|      0|      tok->u.prop.not   = 0;
 3416|      0|      break;
 3417|       |
 3418|      0|    case 'W':
  ------------------
  |  Branch (3418:5): [True: 0, False: 7.43k]
  ------------------
 3419|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3419:11): [True: 0, False: 0]
  ------------------
 3420|      0|      tok->type = TK_CHAR_TYPE;
 3421|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_WORD;
  ------------------
  |  |  306|      0|#define ONIGENC_CTYPE_WORD     12
  ------------------
 3422|      0|      tok->u.prop.not   = 1;
 3423|      0|      break;
 3424|       |
 3425|    413|    case 'b':
  ------------------
  |  Branch (3425:5): [True: 413, False: 7.02k]
  ------------------
 3426|    413|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_B_WORD_BOUND)) break;
  ------------------
  |  |  330|    413|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3426:11): [True: 0, False: 413]
  ------------------
 3427|    413|      tok->type = TK_ANCHOR;
 3428|    413|      tok->u.anchor.subtype = ANCHOR_WORD_BOUND;
  ------------------
  |  |  547|    413|#define ANCHOR_WORD_BOUND       (1<<6)
  ------------------
 3429|    413|      tok->u.anchor.ascii_range = IS_ASCII_RANGE(env->option)
  ------------------
  |  |  406|    826|#define IS_ASCII_RANGE(option)    ((option) & ONIG_OPTION_ASCII_RANGE)
  |  |  ------------------
  |  |  |  |  470|    413|#define ONIG_OPTION_ASCII_RANGE          (ONIG_OPTION_NOTEOS << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  468|    413|#define ONIG_OPTION_NOTEOS               (ONIG_OPTION_NOTBOS << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  467|    413|#define ONIG_OPTION_NOTBOS               (ONIG_OPTION_NOTEOL << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  466|    413|#define ONIG_OPTION_NOTEOL               (ONIG_OPTION_NOTBOL << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  465|    413|#define ONIG_OPTION_NOTBOL               (ONIG_OPTION_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  463|    413|#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  462|    413|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  461|    413|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  460|    413|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  459|    413|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  458|    413|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  456|    413|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|    413|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|    413|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (406:35): [True: 413, False: 0]
  |  |  ------------------
  ------------------
 3430|    413|		&& ! IS_WORD_BOUND_ALL_RANGE(env->option);
  ------------------
  |  |  408|    826|#define IS_WORD_BOUND_ALL_RANGE(option)     ((option) & ONIG_OPTION_WORD_BOUND_ALL_RANGE)
  |  |  ------------------
  |  |  |  |  472|    413|#define ONIG_OPTION_WORD_BOUND_ALL_RANGE    (ONIG_OPTION_POSIX_BRACKET_ALL_RANGE << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  471|    413|#define ONIG_OPTION_POSIX_BRACKET_ALL_RANGE (ONIG_OPTION_ASCII_RANGE << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  470|    413|#define ONIG_OPTION_ASCII_RANGE          (ONIG_OPTION_NOTEOS << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  468|    413|#define ONIG_OPTION_NOTEOS               (ONIG_OPTION_NOTBOS << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  467|    413|#define ONIG_OPTION_NOTBOS               (ONIG_OPTION_NOTEOL << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  466|    413|#define ONIG_OPTION_NOTEOL               (ONIG_OPTION_NOTBOL << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  465|    413|#define ONIG_OPTION_NOTBOL               (ONIG_OPTION_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  463|    413|#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  462|    413|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  461|    413|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  460|    413|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  459|    413|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  458|    413|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  456|    413|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|    413|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|    413|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3430:6): [True: 0, False: 413]
  ------------------
 3431|    413|      break;
 3432|       |
 3433|      0|    case 'B':
  ------------------
  |  Branch (3433:5): [True: 0, False: 7.43k]
  ------------------
 3434|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_B_WORD_BOUND)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3434:11): [True: 0, False: 0]
  ------------------
 3435|      0|      tok->type = TK_ANCHOR;
 3436|      0|      tok->u.anchor.subtype = ANCHOR_NOT_WORD_BOUND;
  ------------------
  |  |  548|      0|#define ANCHOR_NOT_WORD_BOUND   (1<<7)
  ------------------
 3437|      0|      tok->u.anchor.ascii_range = IS_ASCII_RANGE(env->option)
  ------------------
  |  |  406|      0|#define IS_ASCII_RANGE(option)    ((option) & ONIG_OPTION_ASCII_RANGE)
  |  |  ------------------
  |  |  |  |  470|      0|#define ONIG_OPTION_ASCII_RANGE          (ONIG_OPTION_NOTEOS << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  468|      0|#define ONIG_OPTION_NOTEOS               (ONIG_OPTION_NOTBOS << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  467|      0|#define ONIG_OPTION_NOTBOS               (ONIG_OPTION_NOTEOL << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  466|      0|#define ONIG_OPTION_NOTEOL               (ONIG_OPTION_NOTBOL << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  465|      0|#define ONIG_OPTION_NOTBOL               (ONIG_OPTION_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  463|      0|#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  462|      0|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  461|      0|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  460|      0|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  459|      0|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  458|      0|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  456|      0|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|      0|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (406:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3438|      0|		&& ! IS_WORD_BOUND_ALL_RANGE(env->option);
  ------------------
  |  |  408|      0|#define IS_WORD_BOUND_ALL_RANGE(option)     ((option) & ONIG_OPTION_WORD_BOUND_ALL_RANGE)
  |  |  ------------------
  |  |  |  |  472|      0|#define ONIG_OPTION_WORD_BOUND_ALL_RANGE    (ONIG_OPTION_POSIX_BRACKET_ALL_RANGE << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  471|      0|#define ONIG_OPTION_POSIX_BRACKET_ALL_RANGE (ONIG_OPTION_ASCII_RANGE << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  470|      0|#define ONIG_OPTION_ASCII_RANGE          (ONIG_OPTION_NOTEOS << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  468|      0|#define ONIG_OPTION_NOTEOS               (ONIG_OPTION_NOTBOS << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  467|      0|#define ONIG_OPTION_NOTBOS               (ONIG_OPTION_NOTEOL << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  466|      0|#define ONIG_OPTION_NOTEOL               (ONIG_OPTION_NOTBOL << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  465|      0|#define ONIG_OPTION_NOTBOL               (ONIG_OPTION_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  463|      0|#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  462|      0|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  461|      0|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  460|      0|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  459|      0|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  458|      0|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  456|      0|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|      0|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3438:6): [True: 0, False: 0]
  ------------------
 3439|      0|      break;
 3440|       |
 3441|      0|#ifdef USE_WORD_BEGIN_END
 3442|      0|    case '<':
  ------------------
  |  Branch (3442:5): [True: 0, False: 7.43k]
  ------------------
 3443|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3443:11): [True: 0, False: 0]
  ------------------
 3444|      0|      tok->type = TK_ANCHOR;
 3445|      0|      tok->u.anchor.subtype = ANCHOR_WORD_BEGIN;
  ------------------
  |  |  549|      0|#define ANCHOR_WORD_BEGIN       (1<<8)
  ------------------
 3446|      0|      tok->u.anchor.ascii_range = IS_ASCII_RANGE(env->option);
  ------------------
  |  |  406|      0|#define IS_ASCII_RANGE(option)    ((option) & ONIG_OPTION_ASCII_RANGE)
  |  |  ------------------
  |  |  |  |  470|      0|#define ONIG_OPTION_ASCII_RANGE          (ONIG_OPTION_NOTEOS << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  468|      0|#define ONIG_OPTION_NOTEOS               (ONIG_OPTION_NOTBOS << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  467|      0|#define ONIG_OPTION_NOTBOS               (ONIG_OPTION_NOTEOL << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  466|      0|#define ONIG_OPTION_NOTEOL               (ONIG_OPTION_NOTBOL << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  465|      0|#define ONIG_OPTION_NOTBOL               (ONIG_OPTION_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  463|      0|#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  462|      0|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  461|      0|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  460|      0|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  459|      0|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  458|      0|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  456|      0|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|      0|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3447|      0|      break;
 3448|       |
 3449|      0|    case '>':
  ------------------
  |  Branch (3449:5): [True: 0, False: 7.43k]
  ------------------
 3450|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3450:11): [True: 0, False: 0]
  ------------------
 3451|      0|      tok->type = TK_ANCHOR;
 3452|      0|      tok->u.anchor.subtype = ANCHOR_WORD_END;
  ------------------
  |  |  550|      0|#define ANCHOR_WORD_END         (1<<9)
  ------------------
 3453|      0|      tok->u.anchor.ascii_range = IS_ASCII_RANGE(env->option);
  ------------------
  |  |  406|      0|#define IS_ASCII_RANGE(option)    ((option) & ONIG_OPTION_ASCII_RANGE)
  |  |  ------------------
  |  |  |  |  470|      0|#define ONIG_OPTION_ASCII_RANGE          (ONIG_OPTION_NOTEOS << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  468|      0|#define ONIG_OPTION_NOTEOS               (ONIG_OPTION_NOTBOS << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  467|      0|#define ONIG_OPTION_NOTBOS               (ONIG_OPTION_NOTEOL << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  466|      0|#define ONIG_OPTION_NOTEOL               (ONIG_OPTION_NOTBOL << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  465|      0|#define ONIG_OPTION_NOTBOL               (ONIG_OPTION_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  463|      0|#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  462|      0|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  461|      0|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  460|      0|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  459|      0|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  458|      0|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  456|      0|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|      0|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3454|      0|      break;
 3455|      0|#endif
 3456|       |
 3457|  2.06k|    case 's':
  ------------------
  |  Branch (3457:5): [True: 2.06k, False: 5.36k]
  ------------------
 3458|  2.06k|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break;
  ------------------
  |  |  330|  2.06k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3458:11): [True: 0, False: 2.06k]
  ------------------
 3459|  2.06k|      tok->type = TK_CHAR_TYPE;
 3460|  2.06k|      tok->u.prop.ctype = ONIGENC_CTYPE_SPACE;
  ------------------
  |  |  303|  2.06k|#define ONIGENC_CTYPE_SPACE     9
  ------------------
 3461|  2.06k|      tok->u.prop.not   = 0;
 3462|  2.06k|      break;
 3463|       |
 3464|      0|    case 'S':
  ------------------
  |  Branch (3464:5): [True: 0, False: 7.43k]
  ------------------
 3465|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3465:11): [True: 0, False: 0]
  ------------------
 3466|      0|      tok->type = TK_CHAR_TYPE;
 3467|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_SPACE;
  ------------------
  |  |  303|      0|#define ONIGENC_CTYPE_SPACE     9
  ------------------
 3468|      0|      tok->u.prop.not   = 1;
 3469|      0|      break;
 3470|       |
 3471|  1.65k|    case 'd':
  ------------------
  |  Branch (3471:5): [True: 1.65k, False: 5.78k]
  ------------------
 3472|  1.65k|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break;
  ------------------
  |  |  330|  1.65k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3472:11): [True: 0, False: 1.65k]
  ------------------
 3473|  1.65k|      tok->type = TK_CHAR_TYPE;
 3474|  1.65k|      tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT;
  ------------------
  |  |  298|  1.65k|#define ONIGENC_CTYPE_DIGIT     4
  ------------------
 3475|  1.65k|      tok->u.prop.not   = 0;
 3476|  1.65k|      break;
 3477|       |
 3478|      0|    case 'D':
  ------------------
  |  Branch (3478:5): [True: 0, False: 7.43k]
  ------------------
 3479|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3479:11): [True: 0, False: 0]
  ------------------
 3480|      0|      tok->type = TK_CHAR_TYPE;
 3481|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT;
  ------------------
  |  |  298|      0|#define ONIGENC_CTYPE_DIGIT     4
  ------------------
 3482|      0|      tok->u.prop.not   = 1;
 3483|      0|      break;
 3484|       |
 3485|      0|    case 'h':
  ------------------
  |  Branch (3485:5): [True: 0, False: 7.43k]
  ------------------
 3486|      0|      if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  ------------------
  |  Branch (3486:11): [True: 0, False: 0]
  ------------------
 3487|      0|      tok->type = TK_CHAR_TYPE;
 3488|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT;
  ------------------
  |  |  305|      0|#define ONIGENC_CTYPE_XDIGIT   11
  ------------------
 3489|      0|      tok->u.prop.not   = 0;
 3490|      0|      break;
 3491|       |
 3492|      0|    case 'H':
  ------------------
  |  Branch (3492:5): [True: 0, False: 7.43k]
  ------------------
 3493|      0|      if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  ------------------
  |  Branch (3493:11): [True: 0, False: 0]
  ------------------
 3494|      0|      tok->type = TK_CHAR_TYPE;
 3495|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT;
  ------------------
  |  |  305|      0|#define ONIGENC_CTYPE_XDIGIT   11
  ------------------
 3496|      0|      tok->u.prop.not   = 1;
 3497|      0|      break;
 3498|       |
 3499|      0|    case 'A':
  ------------------
  |  Branch (3499:5): [True: 0, False: 7.43k]
  ------------------
 3500|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3500:11): [True: 0, False: 0]
  ------------------
 3501|      0|    begin_buf:
 3502|      0|      tok->type = TK_ANCHOR;
 3503|      0|      tok->u.anchor.subtype = ANCHOR_BEGIN_BUF;
  ------------------
  |  |  540|      0|#define ANCHOR_BEGIN_BUF        (1<<0)
  ------------------
 3504|      0|      break;
 3505|       |
 3506|      0|    case 'Z':
  ------------------
  |  Branch (3506:5): [True: 0, False: 7.43k]
  ------------------
 3507|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3507:11): [True: 0, False: 0]
  ------------------
 3508|      0|      tok->type = TK_ANCHOR;
 3509|      0|      tok->u.anchor.subtype = ANCHOR_SEMI_END_BUF;
  ------------------
  |  |  544|      0|#define ANCHOR_SEMI_END_BUF     (1<<4)
  ------------------
 3510|      0|      break;
 3511|       |
 3512|      0|    case 'z':
  ------------------
  |  Branch (3512:5): [True: 0, False: 7.43k]
  ------------------
 3513|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3513:11): [True: 0, False: 0]
  ------------------
 3514|      0|    end_buf:
 3515|      0|      tok->type = TK_ANCHOR;
 3516|      0|      tok->u.anchor.subtype = ANCHOR_END_BUF;
  ------------------
  |  |  543|      0|#define ANCHOR_END_BUF          (1<<3)
  ------------------
 3517|      0|      break;
 3518|       |
 3519|      0|    case 'G':
  ------------------
  |  Branch (3519:5): [True: 0, False: 7.43k]
  ------------------
 3520|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3520:11): [True: 0, False: 0]
  ------------------
 3521|      0|      tok->type = TK_ANCHOR;
 3522|      0|      tok->u.anchor.subtype = ANCHOR_BEGIN_POSITION;
  ------------------
  |  |  542|      0|#define ANCHOR_BEGIN_POSITION   (1<<2)
  ------------------
 3523|      0|      break;
 3524|       |
 3525|      0|    case '`':
  ------------------
  |  Branch (3525:5): [True: 0, False: 7.43k]
  ------------------
 3526|      0|      if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR)) break;
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  ------------------
  |  Branch (3526:11): [True: 0, False: 0]
  ------------------
 3527|      0|      goto begin_buf;
 3528|      0|      break;
 3529|       |
 3530|      0|    case '\'':
  ------------------
  |  Branch (3530:5): [True: 0, False: 7.43k]
  ------------------
 3531|      0|      if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR)) break;
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  ------------------
  |  Branch (3531:11): [True: 0, False: 0]
  ------------------
 3532|      0|      goto end_buf;
 3533|      0|      break;
 3534|       |
 3535|      0|    case 'x':
  ------------------
  |  Branch (3535:5): [True: 0, False: 7.43k]
  ------------------
 3536|      0|      if (PEND) break;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3537|       |
 3538|      0|      prev = p;
 3539|      0|      if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) {
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) {
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3540|      0|	PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3541|      0|	num = scan_unsigned_hexadecimal_number(&p, end, 0, 8, enc);
 3542|      0|	if (num < 0) return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE;
  ------------------
  |  |  694|      0|#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE                      -401
  ------------------
  |  Branch (3542:6): [True: 0, False: 0]
  ------------------
 3543|      0|	if (!PEND) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3543:6): [True: 0, False: 0]
  ------------------
 3544|      0|	  if (ONIGENC_IS_CODE_XDIGIT(enc, PPEEK))
  ------------------
  |  |  402|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_XDIGIT)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  |  Branch (375:69): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3545|      0|	    return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE;
  ------------------
  |  |  681|      0|#define ONIGERR_TOO_LONG_WIDE_CHAR_VALUE                     -212
  ------------------
 3546|      0|	}
 3547|       |
 3548|      0|	if ((p > prev + enclen(enc, prev, end)) && !PEND && PPEEK_IS('}')) {
  ------------------
  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	if ((p > prev + enclen(enc, prev, end)) && !PEND && PPEEK_IS('}')) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	if ((p > prev + enclen(enc, prev, end)) && !PEND && PPEEK_IS('}')) {
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3548:6): [True: 0, False: 0]
  |  Branch (3548:45): [True: 0, False: 0]
  ------------------
 3549|      0|	  PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3550|      0|	  tok->type   = TK_CODE_POINT;
 3551|      0|	  tok->u.code = (OnigCodePoint )num;
 3552|      0|	}
 3553|      0|	else {
 3554|       |	  /* can't read nothing or invalid format */
 3555|      0|	  p = prev;
 3556|      0|	}
 3557|      0|      }
 3558|      0|      else if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_HEX2)) {
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3559|      0|	num = scan_unsigned_hexadecimal_number(&p, end, 0, 2, enc);
 3560|      0|	if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
  ------------------
  |  |  669|      0|#define ONIGERR_TOO_BIG_NUMBER                               -200
  ------------------
  |  Branch (3560:6): [True: 0, False: 0]
  ------------------
 3561|      0|	if (p == prev) {  /* can't read nothing. */
  ------------------
  |  Branch (3561:6): [True: 0, False: 0]
  ------------------
 3562|      0|	  num = 0; /* but, it's not error */
 3563|      0|	}
 3564|      0|	tok->type = TK_RAW_BYTE;
 3565|      0|	tok->base = 16;
 3566|      0|	tok->u.c  = num;
 3567|      0|      }
 3568|      0|      break;
 3569|       |
 3570|      0|    case 'u':
  ------------------
  |  Branch (3570:5): [True: 0, False: 7.43k]
  ------------------
 3571|      0|      if (PEND) break;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3572|       |
 3573|      0|      prev = p;
 3574|      0|      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_U_HEX4)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3575|      0|	num = scan_unsigned_hexadecimal_number(&p, end, 4, 4, enc);
 3576|      0|	if (num < -1) return ONIGERR_TOO_SHORT_DIGITS;
  ------------------
  |  |  680|      0|#define ONIGERR_TOO_SHORT_DIGITS                             -211
  ------------------
  |  Branch (3576:6): [True: 0, False: 0]
  ------------------
 3577|      0|	else if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
  ------------------
  |  |  669|      0|#define ONIGERR_TOO_BIG_NUMBER                               -200
  ------------------
  |  Branch (3577:11): [True: 0, False: 0]
  ------------------
 3578|      0|	if (p == prev) {  /* can't read nothing. */
  ------------------
  |  Branch (3578:6): [True: 0, False: 0]
  ------------------
 3579|      0|	  num = 0; /* but, it's not error */
 3580|      0|	}
 3581|      0|	tok->type   = TK_CODE_POINT;
 3582|      0|	tok->base   = 16;
 3583|      0|	tok->u.code = (OnigCodePoint )num;
 3584|      0|      }
 3585|      0|      break;
 3586|       |
 3587|      0|    case 'o':
  ------------------
  |  Branch (3587:5): [True: 0, False: 7.43k]
  ------------------
 3588|      0|      if (PEND) break;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3589|       |
 3590|      0|      prev = p;
 3591|      0|      if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_O_BRACE_OCTAL)) {
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_O_BRACE_OCTAL)) {
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3592|      0|	PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3593|      0|	num = scan_unsigned_octal_number(&p, end, 11, enc);
 3594|      0|	if (num < 0) return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE;
  ------------------
  |  |  694|      0|#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE                      -401
  ------------------
  |  Branch (3594:6): [True: 0, False: 0]
  ------------------
 3595|      0|	if (!PEND) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3595:6): [True: 0, False: 0]
  ------------------
 3596|      0|	  OnigCodePoint c = PPEEK;
  ------------------
  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  ------------------
  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3597|      0|	  if (ONIGENC_IS_CODE_DIGIT(enc, c) && c < '8')
  ------------------
  |  |  400|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3597:41): [True: 0, False: 0]
  ------------------
 3598|      0|	    return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE;
  ------------------
  |  |  681|      0|#define ONIGERR_TOO_LONG_WIDE_CHAR_VALUE                     -212
  ------------------
 3599|      0|	}
 3600|       |
 3601|      0|	if ((p > prev + enclen(enc, prev, end)) && !PEND && PPEEK_IS('}')) {
  ------------------
  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	if ((p > prev + enclen(enc, prev, end)) && !PEND && PPEEK_IS('}')) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	if ((p > prev + enclen(enc, prev, end)) && !PEND && PPEEK_IS('}')) {
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3601:6): [True: 0, False: 0]
  |  Branch (3601:45): [True: 0, False: 0]
  ------------------
 3602|      0|	  PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3603|      0|	  tok->type   = TK_CODE_POINT;
 3604|      0|	  tok->u.code = (OnigCodePoint )num;
 3605|      0|	}
 3606|      0|	else {
 3607|       |	  /* can't read nothing or invalid format */
 3608|      0|	  p = prev;
 3609|      0|	}
 3610|      0|      }
 3611|      0|      break;
 3612|       |
 3613|      0|    case '1': case '2': case '3': case '4':
  ------------------
  |  Branch (3613:5): [True: 0, False: 7.43k]
  |  Branch (3613:15): [True: 0, False: 7.43k]
  |  Branch (3613:25): [True: 0, False: 7.43k]
  |  Branch (3613:35): [True: 0, False: 7.43k]
  ------------------
 3614|      0|    case '5': case '6': case '7': case '8': case '9':
  ------------------
  |  Branch (3614:5): [True: 0, False: 7.43k]
  |  Branch (3614:15): [True: 0, False: 7.43k]
  |  Branch (3614:25): [True: 0, False: 7.43k]
  |  Branch (3614:35): [True: 0, False: 7.43k]
  |  Branch (3614:45): [True: 0, False: 7.43k]
  ------------------
 3615|      0|      PUNFETCH;
  ------------------
  |  |  300|      0|#define PUNFETCH     p = pfetch_prev
  ------------------
 3616|      0|      prev = p;
 3617|      0|      num = onig_scan_unsigned_number(&p, end, enc);
 3618|      0|      if (num < 0 || num > ONIG_MAX_BACKREF_NUM) {
  ------------------
  |  |  442|      0|#define ONIG_MAX_BACKREF_NUM                1000
  ------------------
  |  Branch (3618:11): [True: 0, False: 0]
  |  Branch (3618:22): [True: 0, False: 0]
  ------------------
 3619|      0|	goto skip_backref;
 3620|      0|      }
 3621|       |
 3622|      0|      if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_DECIMAL_BACKREF) &&
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3623|      0|	  (num <= env->num_mem || num <= 9)) { /* This spec. from GNU regex */
  ------------------
  |  Branch (3623:5): [True: 0, False: 0]
  |  Branch (3623:28): [True: 0, False: 0]
  ------------------
 3624|      0|	if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) {
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3625|      0|	  if (num > env->num_mem || IS_NULL(SCANENV_MEM_NODES(env)[num]))
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  Branch (311:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3625:8): [True: 0, False: 0]
  ------------------
 3626|      0|	    return ONIGERR_INVALID_BACKREF;
  ------------------
  |  |  677|      0|#define ONIGERR_INVALID_BACKREF                              -208
  ------------------
 3627|      0|	}
 3628|       |
 3629|      0|	tok->type = TK_BACKREF;
 3630|      0|	tok->u.backref.num     = 1;
 3631|      0|	tok->u.backref.ref1    = num;
 3632|      0|	tok->u.backref.by_name = 0;
 3633|      0|#ifdef USE_BACKREF_WITH_LEVEL
 3634|      0|	tok->u.backref.exist_level = 0;
 3635|      0|#endif
 3636|      0|	break;
 3637|      0|      }
 3638|       |
 3639|      0|    skip_backref:
 3640|      0|      if (c == '8' || c == '9') {
  ------------------
  |  Branch (3640:11): [True: 0, False: 0]
  |  Branch (3640:23): [True: 0, False: 0]
  ------------------
 3641|       |	/* normal char */
 3642|      0|	p = prev; PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3643|      0|	break;
 3644|      0|      }
 3645|       |
 3646|      0|      p = prev;
 3647|       |      /* fall through */
 3648|      0|    case '0':
  ------------------
  |  Branch (3648:5): [True: 0, False: 7.43k]
  ------------------
 3649|      0|      if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3650|      0|	prev = p;
 3651|      0|	num = scan_unsigned_octal_number(&p, end, (c == '0' ? 2:3), enc);
  ------------------
  |  Branch (3651:45): [True: 0, False: 0]
  ------------------
 3652|      0|	if (num < 0 || 0xff < num) return ONIGERR_TOO_BIG_NUMBER;
  ------------------
  |  |  669|      0|#define ONIGERR_TOO_BIG_NUMBER                               -200
  ------------------
  |  Branch (3652:6): [True: 0, False: 0]
  |  Branch (3652:17): [True: 0, False: 0]
  ------------------
 3653|      0|	if (p == prev) {  /* can't read nothing. */
  ------------------
  |  Branch (3653:6): [True: 0, False: 0]
  ------------------
 3654|      0|	  num = 0; /* but, it's not error */
 3655|      0|	}
 3656|      0|	tok->type = TK_RAW_BYTE;
 3657|      0|	tok->base = 8;
 3658|      0|	tok->u.c  = num;
 3659|      0|      }
 3660|      0|      else if (c != '0') {
  ------------------
  |  Branch (3660:16): [True: 0, False: 0]
  ------------------
 3661|      0|	PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3662|      0|      }
 3663|      0|      break;
 3664|       |
 3665|      0|#ifdef USE_NAMED_GROUP
 3666|      0|    case 'k':
  ------------------
  |  Branch (3666:5): [True: 0, False: 7.43k]
  ------------------
 3667|      0|      if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_K_NAMED_BACKREF)) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_K_NAMED_BACKREF)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3667:11): [True: 0, False: 0]
  ------------------
 3668|      0|	PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3669|      0|	if (c == '<' || c == '\'') {
  ------------------
  |  Branch (3669:6): [True: 0, False: 0]
  |  Branch (3669:18): [True: 0, False: 0]
  ------------------
 3670|      0|	  r = fetch_named_backref_token(c, tok, &p, end, env);
 3671|      0|	  if (r < 0) return r;
  ------------------
  |  Branch (3671:8): [True: 0, False: 0]
  ------------------
 3672|      0|	}
 3673|      0|	else {
 3674|      0|	  PUNFETCH;
  ------------------
  |  |  300|      0|#define PUNFETCH     p = pfetch_prev
  ------------------
 3675|      0|	  onig_syntax_warn(env, "invalid back reference");
 3676|      0|	}
 3677|      0|      }
 3678|      0|      break;
 3679|      0|#endif
 3680|       |
 3681|      0|#if defined(USE_SUBEXP_CALL) || defined(USE_NAMED_GROUP)
 3682|      0|    case 'g':
  ------------------
  |  Branch (3682:5): [True: 0, False: 7.43k]
  ------------------
 3683|      0|# ifdef USE_NAMED_GROUP
 3684|      0|      if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_G_BRACE_BACKREF)) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_G_BRACE_BACKREF)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3684:11): [True: 0, False: 0]
  ------------------
 3685|      0|	PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3686|      0|	if (c == '{') {
  ------------------
  |  Branch (3686:6): [True: 0, False: 0]
  ------------------
 3687|      0|	  r = fetch_named_backref_token(c, tok, &p, end, env);
 3688|      0|	  if (r < 0) return r;
  ------------------
  |  Branch (3688:8): [True: 0, False: 0]
  ------------------
 3689|      0|	}
 3690|      0|	else
 3691|      0|	  PUNFETCH;
  ------------------
  |  |  300|      0|#define PUNFETCH     p = pfetch_prev
  ------------------
 3692|      0|      }
 3693|      0|# endif
 3694|      0|# ifdef USE_SUBEXP_CALL
 3695|      0|      if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_G_SUBEXP_CALL)) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_G_SUBEXP_CALL)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3695:11): [True: 0, False: 0]
  ------------------
 3696|      0|	PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3697|      0|	if (c == '<' || c == '\'') {
  ------------------
  |  Branch (3697:6): [True: 0, False: 0]
  |  Branch (3697:18): [True: 0, False: 0]
  ------------------
 3698|      0|	  int gnum = -1, rel = 0;
 3699|      0|	  UChar* name_end;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 3700|      0|	  OnigCodePoint cnext;
 3701|       |
 3702|      0|	  cnext = PPEEK;
  ------------------
  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  ------------------
  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3703|      0|	  if (cnext == '0') {
  ------------------
  |  Branch (3703:8): [True: 0, False: 0]
  ------------------
 3704|      0|	    PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3705|      0|	    if (PPEEK_IS(get_name_end_code_point(c))) {  /* \g<0>, \g'0' */
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3706|      0|	      PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3707|      0|	      name_end = p;
 3708|      0|	      gnum = 0;
 3709|      0|	    }
 3710|      0|	  }
 3711|      0|	  else if (cnext == '+') {
  ------------------
  |  Branch (3711:13): [True: 0, False: 0]
  ------------------
 3712|      0|	    PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3713|      0|	    rel = 1;
 3714|      0|	  }
 3715|      0|	  prev = p;
 3716|      0|	  if (gnum < 0) {
  ------------------
  |  Branch (3716:8): [True: 0, False: 0]
  ------------------
 3717|      0|	    r = fetch_name((OnigCodePoint )c, &p, end, &name_end, env, &gnum, 1);
 3718|      0|	    if (r < 0) return r;
  ------------------
  |  Branch (3718:10): [True: 0, False: 0]
  ------------------
 3719|      0|	  }
 3720|       |
 3721|      0|	  tok->type = TK_CALL;
 3722|      0|	  tok->u.call.name     = prev;
 3723|      0|	  tok->u.call.name_end = name_end;
 3724|      0|	  tok->u.call.gnum     = gnum;
 3725|      0|	  tok->u.call.rel      = rel;
 3726|      0|	}
 3727|      0|	else {
 3728|      0|	  onig_syntax_warn(env, "invalid subexp call");
 3729|      0|	  PUNFETCH;
  ------------------
  |  |  300|      0|#define PUNFETCH     p = pfetch_prev
  ------------------
 3730|      0|	}
 3731|      0|      }
 3732|      0|# endif
 3733|      0|      break;
 3734|      0|#endif
 3735|       |
 3736|      0|    case 'Q':
  ------------------
  |  Branch (3736:5): [True: 0, False: 7.43k]
  ------------------
 3737|      0|      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3738|      0|	tok->type = TK_QUOTE_OPEN;
 3739|      0|      }
 3740|      0|      break;
 3741|       |
 3742|      0|    case 'p':
  ------------------
  |  Branch (3742:5): [True: 0, False: 7.43k]
  ------------------
 3743|      0|    case 'P':
  ------------------
  |  Branch (3743:5): [True: 0, False: 7.43k]
  ------------------
 3744|      0|      if (PPEEK_IS('{') &&
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3745|      0|	  IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3746|      0|	PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3747|      0|	tok->type = TK_CHAR_PROPERTY;
 3748|      0|	tok->u.prop.not = (c == 'P' ? 1 : 0);
  ------------------
  |  Branch (3748:21): [True: 0, False: 0]
  ------------------
 3749|       |
 3750|      0|	if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3750:6): [True: 0, False: 0]
  ------------------
 3751|      0|	  PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3752|      0|	  if (c == '^') {
  ------------------
  |  Branch (3752:8): [True: 0, False: 0]
  ------------------
 3753|      0|	    tok->u.prop.not = (tok->u.prop.not == 0 ? 1 : 0);
  ------------------
  |  Branch (3753:25): [True: 0, False: 0]
  ------------------
 3754|      0|	  }
 3755|      0|	  else
 3756|      0|	    PUNFETCH;
  ------------------
  |  |  300|      0|#define PUNFETCH     p = pfetch_prev
  ------------------
 3757|      0|	}
 3758|      0|      }
 3759|      0|      else {
 3760|      0|	onig_syntax_warn(env, "invalid Unicode Property \\%c", c);
 3761|      0|      }
 3762|      0|      break;
 3763|       |
 3764|      0|    case 'R':
  ------------------
  |  Branch (3764:5): [True: 0, False: 7.43k]
  ------------------
 3765|      0|      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_CAPITAL_R_LINEBREAK)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3766|      0|	tok->type = TK_LINEBREAK;
 3767|      0|      }
 3768|      0|      break;
 3769|       |
 3770|      0|    case 'X':
  ------------------
  |  Branch (3770:5): [True: 0, False: 7.43k]
  ------------------
 3771|      0|      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_CAPITAL_X_EXTENDED_GRAPHEME_CLUSTER)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3772|      0|	tok->type = TK_EXTENDED_GRAPHEME_CLUSTER;
 3773|      0|      }
 3774|      0|      break;
 3775|       |
 3776|      0|    case 'K':
  ------------------
  |  Branch (3776:5): [True: 0, False: 7.43k]
  ------------------
 3777|      0|      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3778|      0|	tok->type = TK_KEEP;
 3779|      0|      }
 3780|      0|      break;
 3781|       |
 3782|  2.06k|    default:
  ------------------
  |  Branch (3782:5): [True: 2.06k, False: 5.36k]
  ------------------
 3783|  2.06k|      {
 3784|  2.06k|	OnigCodePoint c2;
 3785|       |
 3786|  2.06k|	PUNFETCH;
  ------------------
  |  |  300|  2.06k|#define PUNFETCH     p = pfetch_prev
  ------------------
 3787|  2.06k|	num = fetch_escaped_value(&p, end, env, &c2);
 3788|  2.06k|	if (num < 0) return num;
  ------------------
  |  Branch (3788:6): [True: 0, False: 2.06k]
  ------------------
 3789|       |	/* set_raw: */
 3790|  2.06k|	if ((OnigCodePoint )tok->u.c != c2) {
  ------------------
  |  Branch (3790:6): [True: 0, False: 2.06k]
  ------------------
 3791|      0|	  tok->type = TK_CODE_POINT;
 3792|      0|	  tok->u.code = (OnigCodePoint )c2;
 3793|      0|	}
 3794|  2.06k|	else { /* string */
 3795|  2.06k|	  p = tok->backp + enclen(enc, tok->backp, end);
  ------------------
  |  |   93|  2.06k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|  2.06k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 2.06k]
  |  |  ------------------
  ------------------
 3796|  2.06k|	}
 3797|  2.06k|      }
 3798|      0|      break;
 3799|  7.43k|    }
 3800|  7.43k|  }
 3801|   196k|  else {
 3802|   196k|    tok->u.c = c;
 3803|   196k|    tok->escaped = 0;
 3804|       |
 3805|   196k|#ifdef USE_VARIABLE_META_CHARS
 3806|   196k|    if ((c != ONIG_INEFFECTIVE_META_CHAR) &&
  ------------------
  |  |  622|   196k|#define ONIG_INEFFECTIVE_META_CHAR          0
  ------------------
  |  Branch (3806:9): [True: 196k, False: 0]
  ------------------
 3807|   196k|	IS_SYNTAX_OP(syn, ONIG_SYN_OP_VARIABLE_META_CHARACTERS)) {
  ------------------
  |  |  330|   196k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 0, False: 196k]
  |  |  ------------------
  ------------------
 3808|      0|      if (c == MC_ANYCHAR(syn))
  ------------------
  |  |  762|      0|#define MC_ANYCHAR(syn)           (syn)->meta_char_table.anychar
  ------------------
  |  Branch (3808:11): [True: 0, False: 0]
  ------------------
 3809|      0|	goto any_char;
 3810|      0|      else if (c == MC_ANYTIME(syn))
  ------------------
  |  |  763|      0|#define MC_ANYTIME(syn)           (syn)->meta_char_table.anytime
  ------------------
  |  Branch (3810:16): [True: 0, False: 0]
  ------------------
 3811|      0|	goto anytime;
 3812|      0|      else if (c == MC_ZERO_OR_ONE_TIME(syn))
  ------------------
  |  |  764|      0|#define MC_ZERO_OR_ONE_TIME(syn)  (syn)->meta_char_table.zero_or_one_time
  ------------------
  |  Branch (3812:16): [True: 0, False: 0]
  ------------------
 3813|      0|	goto zero_or_one_time;
 3814|      0|      else if (c == MC_ONE_OR_MORE_TIME(syn))
  ------------------
  |  |  765|      0|#define MC_ONE_OR_MORE_TIME(syn)  (syn)->meta_char_table.one_or_more_time
  ------------------
  |  Branch (3814:16): [True: 0, False: 0]
  ------------------
 3815|      0|	goto one_or_more_time;
 3816|      0|      else if (c == MC_ANYCHAR_ANYTIME(syn)) {
  ------------------
  |  |  766|      0|#define MC_ANYCHAR_ANYTIME(syn)   (syn)->meta_char_table.anychar_anytime
  ------------------
  |  Branch (3816:16): [True: 0, False: 0]
  ------------------
 3817|      0|	tok->type = TK_ANYCHAR_ANYTIME;
 3818|      0|	goto out;
 3819|      0|      }
 3820|      0|    }
 3821|   196k|#endif
 3822|       |
 3823|   196k|    switch (c) {
 3824|  4.13k|    case '.':
  ------------------
  |  Branch (3824:5): [True: 4.13k, False: 192k]
  ------------------
 3825|  4.13k|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_DOT_ANYCHAR)) break;
  ------------------
  |  |  330|  4.13k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3825:11): [True: 0, False: 4.13k]
  ------------------
 3826|  4.13k|#ifdef USE_VARIABLE_META_CHARS
 3827|  4.13k|    any_char:
 3828|  4.13k|#endif
 3829|  4.13k|      tok->type = TK_ANYCHAR;
 3830|  4.13k|      break;
 3831|       |
 3832|  4.54k|    case '*':
  ------------------
  |  Branch (3832:5): [True: 4.54k, False: 191k]
  ------------------
 3833|  4.54k|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ASTERISK_ZERO_INF)) break;
  ------------------
  |  |  330|  4.54k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3833:11): [True: 0, False: 4.54k]
  ------------------
 3834|  4.54k|#ifdef USE_VARIABLE_META_CHARS
 3835|  4.54k|    anytime:
 3836|  4.54k|#endif
 3837|  4.54k|      tok->type = TK_OP_REPEAT;
 3838|  4.54k|      tok->u.repeat.lower = 0;
 3839|  4.54k|      tok->u.repeat.upper = REPEAT_INFINITE;
  ------------------
  |  |  421|  4.54k|#define REPEAT_INFINITE         -1
  ------------------
 3840|  4.54k|      goto greedy_check;
 3841|      0|      break;
 3842|       |
 3843|  7.43k|    case '+':
  ------------------
  |  Branch (3843:5): [True: 7.43k, False: 188k]
  ------------------
 3844|  7.43k|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_PLUS_ONE_INF)) break;
  ------------------
  |  |  330|  7.43k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3844:11): [True: 0, False: 7.43k]
  ------------------
 3845|  7.43k|#ifdef USE_VARIABLE_META_CHARS
 3846|  7.43k|    one_or_more_time:
 3847|  7.43k|#endif
 3848|  7.43k|      tok->type = TK_OP_REPEAT;
 3849|  7.43k|      tok->u.repeat.lower = 1;
 3850|  7.43k|      tok->u.repeat.upper = REPEAT_INFINITE;
  ------------------
  |  |  421|  7.43k|#define REPEAT_INFINITE         -1
  ------------------
 3851|  7.43k|      goto greedy_check;
 3852|      0|      break;
 3853|       |
 3854|    413|    case '?':
  ------------------
  |  Branch (3854:5): [True: 413, False: 195k]
  ------------------
 3855|    413|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_QMARK_ZERO_ONE)) break;
  ------------------
  |  |  330|    413|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3855:11): [True: 0, False: 413]
  ------------------
 3856|    413|#ifdef USE_VARIABLE_META_CHARS
 3857|    413|    zero_or_one_time:
 3858|    413|#endif
 3859|    413|      tok->type = TK_OP_REPEAT;
 3860|    413|      tok->u.repeat.lower = 0;
 3861|    413|      tok->u.repeat.upper = 1;
 3862|    413|      goto greedy_check;
 3863|      0|      break;
 3864|       |
 3865|      0|    case '{':
  ------------------
  |  Branch (3865:5): [True: 0, False: 196k]
  ------------------
 3866|      0|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_BRACE_INTERVAL)) break;
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3866:11): [True: 0, False: 0]
  ------------------
 3867|      0|      r = fetch_range_quantifier(&p, end, tok, env);
 3868|      0|      if (r < 0) return r;  /* error */
  ------------------
  |  Branch (3868:11): [True: 0, False: 0]
  ------------------
 3869|      0|      if (r == 0) goto greedy_check;
  ------------------
  |  Branch (3869:11): [True: 0, False: 0]
  ------------------
 3870|      0|      else if (r == 2) { /* {n} */
  ------------------
  |  Branch (3870:16): [True: 0, False: 0]
  ------------------
 3871|      0|	if (IS_SYNTAX_BV(syn, ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY))
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3872|      0|	  goto possessive_check;
 3873|       |
 3874|      0|	goto greedy_check;
 3875|      0|      }
 3876|       |      /* r == 1 : normal char */
 3877|      0|      break;
 3878|       |
 3879|  3.30k|    case '|':
  ------------------
  |  Branch (3879:5): [True: 3.30k, False: 192k]
  ------------------
 3880|  3.30k|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_VBAR_ALT)) break;
  ------------------
  |  |  330|  3.30k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (3880:11): [True: 0, False: 3.30k]
  ------------------
 3881|  3.30k|      tok->type = TK_ALT;
 3882|  3.30k|      break;
 3883|       |
 3884|  4.95k|    case '(':
  ------------------
  |  Branch (3884:5): [True: 4.95k, False: 191k]
  ------------------
 3885|  4.95k|      if (PPEEK_IS('?') &&
  ------------------
  |  |  320|  9.91k|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|  4.95k|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|  4.95k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 4.95k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 4.54k, False: 413]
  |  |  ------------------
  ------------------
 3886|  4.95k|	  IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_QMARK_GROUP_EFFECT)) {
  ------------------
  |  |  331|  4.54k|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 4.54k, False: 0]
  |  |  ------------------
  ------------------
 3887|  4.54k|	PINC;
  ------------------
  |  |  301|  4.54k|#define PINC       do { \
  |  |  302|  4.54k|  pfetch_prev = p; \
  |  |  303|  4.54k|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|  4.54k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|  4.54k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 4.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|  4.54k|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3888|  4.54k|	if (PPEEK_IS('#')) {
  ------------------
  |  |  320|  4.54k|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|  4.54k|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|  4.54k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 4.54k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 0, False: 4.54k]
  |  |  ------------------
  ------------------
 3889|      0|	  PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3890|      0|	  while (1) {
  ------------------
  |  Branch (3890:11): [Folded - Ignored]
  ------------------
 3891|      0|	    if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	    if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
  ------------------
  |  |  662|      0|#define ONIGERR_END_PATTERN_IN_GROUP                         -118
  ------------------
 3892|      0|	    PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3893|      0|	    if (c == MC_ESC(syn)) {
  ------------------
  |  |  761|      0|#define MC_ESC(syn)               (syn)->meta_char_table.esc
  ------------------
  |  Branch (3893:10): [True: 0, False: 0]
  ------------------
 3894|      0|	      if (!PEND) PFETCH(c);
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	      if (!PEND) PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (3894:12): [True: 0, False: 0]
  ------------------
 3895|      0|	    }
 3896|      0|	    else {
 3897|      0|	      if (c == ')') break;
  ------------------
  |  Branch (3897:12): [True: 0, False: 0]
  ------------------
 3898|      0|	    }
 3899|      0|	  }
 3900|      0|	  goto start;
 3901|      0|	}
 3902|  4.54k|#ifdef USE_PERL_SUBEXP_CALL
 3903|       |	/* (?&name), (?n), (?R), (?0), (?+n), (?-n) */
 3904|  4.54k|	c = PPEEK;
  ------------------
  |  |  319|  4.54k|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  369|  4.54k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  ------------------
  |  |  |  Branch (319:23): [True: 4.54k, False: 0]
  |  |  ------------------
  ------------------
 3905|  4.54k|	if ((c == '&' || c == 'R' || ONIGENC_IS_CODE_DIGIT(enc, c)) &&
  ------------------
  |  |  400|  4.54k|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
  |  |  ------------------
  |  |  |  |  375|  4.54k|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 4.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3905:7): [True: 0, False: 4.54k]
  |  Branch (3905:19): [True: 0, False: 4.54k]
  ------------------
 3906|  4.54k|	    IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_SUBEXP_CALL)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3907|       |	  /* (?&name), (?n), (?R), (?0) */
 3908|      0|	  int gnum;
 3909|      0|	  UChar *name;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 3910|      0|	  UChar *name_end;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 3911|       |
 3912|      0|	  if (c == 'R' || c == '0') {
  ------------------
  |  Branch (3912:8): [True: 0, False: 0]
  |  Branch (3912:20): [True: 0, False: 0]
  ------------------
 3913|      0|	    PINC;   /* skip 'R' / '0' */
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3914|      0|	    if (!PPEEK_IS(')')) {
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3914:10): [True: 0, False: 0]
  ------------------
 3915|      0|	      r = ONIGERR_INVALID_GROUP_NAME;
  ------------------
  |  |  683|      0|#define ONIGERR_INVALID_GROUP_NAME                           -215
  ------------------
 3916|      0|	      onig_scan_env_set_error_string(env, r, p - 1, p + 1);
 3917|      0|	      return r;
 3918|      0|	    }
 3919|      0|	    PINC;   /* skip ')' */
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3920|      0|	    name_end = name = p;
 3921|      0|	    gnum = 0;
 3922|      0|	  }
 3923|      0|	  else {
 3924|      0|	    int numref = 1;
 3925|      0|	    if (c == '&') {     /* (?&name) */
  ------------------
  |  Branch (3925:10): [True: 0, False: 0]
  ------------------
 3926|      0|	      PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3927|      0|	      numref = 0;       /* don't allow number name */
 3928|      0|	    }
 3929|      0|	    name = p;
 3930|      0|	    r = fetch_name((OnigCodePoint )'(', &p, end, &name_end, env, &gnum, numref);
 3931|      0|	    if (r < 0) return r;
  ------------------
  |  Branch (3931:10): [True: 0, False: 0]
  ------------------
 3932|      0|	  }
 3933|       |
 3934|      0|	  tok->type = TK_CALL;
 3935|      0|	  tok->u.call.name     = name;
 3936|      0|	  tok->u.call.name_end = name_end;
 3937|      0|	  tok->u.call.gnum     = gnum;
 3938|      0|	  tok->u.call.rel      = 0;
 3939|      0|	  break;
 3940|      0|	}
 3941|  4.54k|	else if ((c == '-' || c == '+') &&
  ------------------
  |  Branch (3941:12): [True: 0, False: 4.54k]
  |  Branch (3941:24): [True: 0, False: 4.54k]
  ------------------
 3942|  4.54k|	    IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_SUBEXP_CALL)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3943|       |	  /* (?+n), (?-n) */
 3944|      0|	  int gnum;
 3945|      0|	  UChar *name;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 3946|      0|	  UChar *name_end;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 3947|      0|	  OnigCodePoint cnext;
 3948|      0|	  PFETCH_READY;
  ------------------
  |  |  295|      0|# define PFETCH_READY  UChar* pfetch_prev = NULL; (void)pfetch_prev
  |  |  ------------------
  |  |  |  |   76|      0|# define UChar OnigUChar
  |  |  ------------------
  ------------------
 3949|       |
 3950|      0|	  PINC;     /* skip '-' / '+' */
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3951|      0|	  cnext = PPEEK;
  ------------------
  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  ------------------
  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3952|      0|	  if (ONIGENC_IS_CODE_DIGIT(enc, cnext)) {
  ------------------
  |  |  400|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3953|      0|	    if (c == '-') PUNFETCH;
  ------------------
  |  |  300|      0|#define PUNFETCH     p = pfetch_prev
  ------------------
  |  Branch (3953:10): [True: 0, False: 0]
  ------------------
 3954|      0|	    name = p;
 3955|      0|	    r = fetch_name((OnigCodePoint )'(', &p, end, &name_end, env, &gnum, 1);
 3956|      0|	    if (r < 0) return r;
  ------------------
  |  Branch (3956:10): [True: 0, False: 0]
  ------------------
 3957|       |
 3958|      0|	    tok->type = TK_CALL;
 3959|      0|	    tok->u.call.name     = name;
 3960|      0|	    tok->u.call.name_end = name_end;
 3961|      0|	    tok->u.call.gnum     = gnum;
 3962|      0|	    tok->u.call.rel      = 1;
 3963|      0|	    break;
 3964|      0|	  }
 3965|      0|	}
 3966|  4.54k|#endif /* USE_PERL_SUBEXP_CALL */
 3967|  4.54k|#ifdef USE_CAPITAL_P_NAMED_GROUP
 3968|  4.54k|	if (PPEEK_IS('P') &&
  ------------------
  |  |  320|  9.08k|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|  4.54k|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|  4.54k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 4.54k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 0, False: 4.54k]
  |  |  ------------------
  ------------------
 3969|  4.54k|	    IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_CAPITAL_P_NAMED_GROUP)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3970|      0|	  int gnum;
 3971|      0|	  UChar *name;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 3972|      0|	  UChar *name_end;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 3973|      0|	  PFETCH_READY;
  ------------------
  |  |  295|      0|# define PFETCH_READY  UChar* pfetch_prev = NULL; (void)pfetch_prev
  |  |  ------------------
  |  |  |  |   76|      0|# define UChar OnigUChar
  |  |  ------------------
  ------------------
 3974|       |
 3975|      0|	  PINC;     /* skip 'P' */
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3976|      0|	  if (PEND) return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	  if (PEND) return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 3977|      0|	  PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3978|      0|	  if (c == '=') {       /* (?P=name): backref */
  ------------------
  |  Branch (3978:8): [True: 0, False: 0]
  ------------------
 3979|      0|	    r = fetch_named_backref_token((OnigCodePoint )'(', tok, &p, end, env);
 3980|      0|	    if (r < 0) return r;
  ------------------
  |  Branch (3980:10): [True: 0, False: 0]
  ------------------
 3981|      0|	    break;
 3982|      0|	  }
 3983|      0|	  else if (c == '>') {  /* (?P>name): subexp call */
  ------------------
  |  Branch (3983:13): [True: 0, False: 0]
  ------------------
 3984|      0|	    name = p;
 3985|      0|	    r = fetch_name((OnigCodePoint )'(', &p, end, &name_end, env, &gnum, 0);
 3986|      0|	    if (r < 0) return r;
  ------------------
  |  Branch (3986:10): [True: 0, False: 0]
  ------------------
 3987|       |
 3988|      0|	    tok->type = TK_CALL;
 3989|      0|	    tok->u.call.name     = name;
 3990|      0|	    tok->u.call.name_end = name_end;
 3991|      0|	    tok->u.call.gnum     = gnum;
 3992|      0|	    tok->u.call.rel      = 0;
 3993|      0|	    break;
 3994|      0|	  }
 3995|      0|	}
 3996|  4.54k|#endif /* USE_CAPITAL_P_NAMED_GROUP */
 3997|  4.54k|	PUNFETCH;
  ------------------
  |  |  300|  4.54k|#define PUNFETCH     p = pfetch_prev
  ------------------
 3998|  4.54k|      }
 3999|       |
 4000|  4.95k|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LPAREN_SUBEXP)) break;
  ------------------
  |  |  330|  4.95k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (4000:11): [True: 0, False: 4.95k]
  ------------------
 4001|  4.95k|      tok->type = TK_SUBEXP_OPEN;
 4002|  4.95k|      break;
 4003|       |
 4004|  4.95k|    case ')':
  ------------------
  |  Branch (4004:5): [True: 4.95k, False: 191k]
  ------------------
 4005|  4.95k|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LPAREN_SUBEXP)) break;
  ------------------
  |  |  330|  4.95k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (4005:11): [True: 0, False: 4.95k]
  ------------------
 4006|  4.95k|      tok->type = TK_SUBEXP_CLOSE;
 4007|  4.95k|      break;
 4008|       |
 4009|  8.26k|    case '^':
  ------------------
  |  Branch (4009:5): [True: 8.26k, False: 187k]
  ------------------
 4010|  8.26k|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break;
  ------------------
  |  |  330|  8.26k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (4010:11): [True: 0, False: 8.26k]
  ------------------
 4011|  8.26k|      tok->type = TK_ANCHOR;
 4012|  8.26k|      tok->u.anchor.subtype = (IS_SINGLELINE(env->option)
  ------------------
  |  |  394|  8.26k|#define IS_SINGLELINE(option)     ((option) & ONIG_OPTION_SINGLELINE)
  |  |  ------------------
  |  |  |  |  458|  8.26k|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  456|  8.26k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  455|  8.26k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  454|  8.26k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (394:35): [True: 0, False: 8.26k]
  |  |  ------------------
  ------------------
 4013|  8.26k|			       ? ANCHOR_BEGIN_BUF : ANCHOR_BEGIN_LINE);
  ------------------
  |  |  540|      0|#define ANCHOR_BEGIN_BUF        (1<<0)
  ------------------
              			       ? ANCHOR_BEGIN_BUF : ANCHOR_BEGIN_LINE);
  ------------------
  |  |  541|  8.26k|#define ANCHOR_BEGIN_LINE       (1<<1)
  ------------------
 4014|  8.26k|      break;
 4015|       |
 4016|  3.30k|    case '$':
  ------------------
  |  Branch (4016:5): [True: 3.30k, False: 192k]
  ------------------
 4017|  3.30k|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break;
  ------------------
  |  |  330|  3.30k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (4017:11): [True: 0, False: 3.30k]
  ------------------
 4018|  3.30k|      tok->type = TK_ANCHOR;
 4019|  3.30k|      tok->u.anchor.subtype = (IS_SINGLELINE(env->option)
  ------------------
  |  |  394|  3.30k|#define IS_SINGLELINE(option)     ((option) & ONIG_OPTION_SINGLELINE)
  |  |  ------------------
  |  |  |  |  458|  3.30k|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  456|  3.30k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  455|  3.30k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  454|  3.30k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (394:35): [True: 0, False: 3.30k]
  |  |  ------------------
  ------------------
 4020|  3.30k|			       ? ANCHOR_SEMI_END_BUF : ANCHOR_END_LINE);
  ------------------
  |  |  544|      0|#define ANCHOR_SEMI_END_BUF     (1<<4)
  ------------------
              			       ? ANCHOR_SEMI_END_BUF : ANCHOR_END_LINE);
  ------------------
  |  |  545|  3.30k|#define ANCHOR_END_LINE         (1<<5)
  ------------------
 4021|  3.30k|      break;
 4022|       |
 4023|  6.19k|    case '[':
  ------------------
  |  Branch (4023:5): [True: 6.19k, False: 189k]
  ------------------
 4024|  6.19k|      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_BRACKET_CC)) break;
  ------------------
  |  |  330|  6.19k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  ------------------
  |  Branch (4024:11): [True: 0, False: 6.19k]
  ------------------
 4025|  6.19k|      tok->type = TK_CC_OPEN;
 4026|  6.19k|      break;
 4027|       |
 4028|      0|    case ']':
  ------------------
  |  Branch (4028:5): [True: 0, False: 196k]
  ------------------
 4029|      0|      if (*src > env->pattern)   /* /].../ is allowed. */
  ------------------
  |  Branch (4029:11): [True: 0, False: 0]
  ------------------
 4030|      0|	CLOSE_BRACKET_WITHOUT_ESC_WARN(env, (UChar* )"]");
 4031|      0|      break;
 4032|       |
 4033|      0|    case '#':
  ------------------
  |  Branch (4033:5): [True: 0, False: 196k]
  ------------------
 4034|      0|      if (IS_EXTEND(env->option)) {
  ------------------
  |  |  397|      0|#define IS_EXTEND(option)         ((option) & ONIG_OPTION_EXTEND)
  |  |  ------------------
  |  |  |  |  455|      0|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (397:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4035|      0|	while (!PEND) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4035:9): [True: 0, False: 0]
  ------------------
 4036|      0|	  PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4037|      0|	  if (ONIGENC_IS_CODE_NEWLINE(enc, c))
  ------------------
  |  |  378|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_NEWLINE)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4038|      0|	    break;
 4039|      0|	}
 4040|      0|	goto start;
 4041|      0|	break;
 4042|      0|      }
 4043|      0|      break;
 4044|       |
 4045|  19.4k|    case ' ': case '\t': case '\n': case '\r': case '\f':
  ------------------
  |  Branch (4045:5): [True: 19.4k, False: 176k]
  |  Branch (4045:15): [True: 0, False: 196k]
  |  Branch (4045:26): [True: 0, False: 196k]
  |  Branch (4045:37): [True: 0, False: 196k]
  |  Branch (4045:48): [True: 0, False: 196k]
  ------------------
 4046|  19.4k|      if (IS_EXTEND(env->option))
  ------------------
  |  |  397|  19.4k|#define IS_EXTEND(option)         ((option) & ONIG_OPTION_EXTEND)
  |  |  ------------------
  |  |  |  |  455|  19.4k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  454|  19.4k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (397:35): [True: 0, False: 19.4k]
  |  |  ------------------
  ------------------
 4047|      0|	goto start;
 4048|  19.4k|      break;
 4049|       |
 4050|   129k|    default:
  ------------------
  |  Branch (4050:5): [True: 129k, False: 66.9k]
  ------------------
 4051|       |      /* string */
 4052|   129k|      break;
 4053|   196k|    }
 4054|   196k|  }
 4055|       |
 4056|   203k|#ifdef USE_VARIABLE_META_CHARS
 4057|   203k| out:
 4058|   203k|#endif
 4059|   203k|  *src = p;
 4060|   203k|  return tok->type;
 4061|   203k|}
regparse.c:get_name_end_code_point:
 2495|  1.65k|{
 2496|  1.65k|  switch (start) {
 2497|  1.65k|  case '<':  return (OnigCodePoint )'>'; break;
  ------------------
  |  Branch (2497:3): [True: 1.65k, False: 0]
  ------------------
 2498|      0|  case '\'': return (OnigCodePoint )'\''; break;
  ------------------
  |  Branch (2498:3): [True: 0, False: 1.65k]
  ------------------
 2499|      0|  case '(':  return (OnigCodePoint )')'; break;
  ------------------
  |  Branch (2499:3): [True: 0, False: 1.65k]
  ------------------
 2500|      0|  case '{':  return (OnigCodePoint )'}'; break;
  ------------------
  |  Branch (2500:3): [True: 0, False: 1.65k]
  ------------------
 2501|      0|  default:
  ------------------
  |  Branch (2501:3): [True: 0, False: 1.65k]
  ------------------
 2502|      0|    break;
 2503|  1.65k|  }
 2504|       |
 2505|      0|  return (OnigCodePoint )0;
 2506|  1.65k|}
regparse.c:fetch_name:
 2644|  1.65k|{
 2645|  1.65k|  int r, is_num, sign;
 2646|  1.65k|  OnigCodePoint end_code;
 2647|  1.65k|  OnigCodePoint c = 0;
 2648|  1.65k|  OnigEncoding enc = env->enc;
 2649|  1.65k|  UChar *name_end;
  ------------------
  |  |   76|  1.65k|# define UChar OnigUChar
  ------------------
 2650|  1.65k|  UChar *pnum_head;
  ------------------
  |  |   76|  1.65k|# define UChar OnigUChar
  ------------------
 2651|  1.65k|  UChar *p = *src;
  ------------------
  |  |   76|  1.65k|# define UChar OnigUChar
  ------------------
 2652|       |
 2653|  1.65k|  *rback_num = 0;
 2654|       |
 2655|  1.65k|  end_code = get_name_end_code_point(start_code);
 2656|       |
 2657|  1.65k|  name_end = end;
 2658|  1.65k|  pnum_head = *src;
 2659|  1.65k|  r = 0;
 2660|  1.65k|  is_num = 0;
 2661|  1.65k|  sign = 1;
 2662|  1.65k|  if (PEND) {
  ------------------
  |  |  299|  1.65k|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 1.65k]
  |  |  |  Branch (299:23): [True: 1.65k, False: 0]
  |  |  ------------------
  ------------------
 2663|      0|    return ONIGERR_EMPTY_GROUP_NAME;
  ------------------
  |  |  682|      0|#define ONIGERR_EMPTY_GROUP_NAME                             -214
  ------------------
 2664|      0|  }
 2665|  1.65k|  else {
 2666|  1.65k|    PFETCH_S(c);
  ------------------
  |  |  314|  1.65k|#define PFETCH_S(c) do { \
  |  |  315|  1.65k|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|  1.65k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (315:8): [True: 0, False: 1.65k]
  |  |  ------------------
  |  |  316|  1.65k|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|  1.65k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|  1.65k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  317|  1.65k|} while (0)
  |  |  ------------------
  |  |  |  Branch (317:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2667|  1.65k|    if (c == end_code)
  ------------------
  |  Branch (2667:9): [True: 0, False: 1.65k]
  ------------------
 2668|      0|      return ONIGERR_EMPTY_GROUP_NAME;
  ------------------
  |  |  682|      0|#define ONIGERR_EMPTY_GROUP_NAME                             -214
  ------------------
 2669|       |
 2670|  1.65k|    if (ONIGENC_IS_CODE_DIGIT(enc, c)) {
  ------------------
  |  |  400|  1.65k|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
  |  |  ------------------
  |  |  |  |  375|  1.65k|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2671|      0|      if (ref == 1)
  ------------------
  |  Branch (2671:11): [True: 0, False: 0]
  ------------------
 2672|      0|	is_num = 1;
 2673|      0|      else {
 2674|      0|	r = ONIGERR_INVALID_GROUP_NAME;
  ------------------
  |  |  683|      0|#define ONIGERR_INVALID_GROUP_NAME                           -215
  ------------------
 2675|      0|	is_num = 0;
 2676|      0|      }
 2677|      0|    }
 2678|  1.65k|    else if (c == '-') {
  ------------------
  |  Branch (2678:14): [True: 0, False: 1.65k]
  ------------------
 2679|      0|      if (ref == 1) {
  ------------------
  |  Branch (2679:11): [True: 0, False: 0]
  ------------------
 2680|      0|	is_num = 2;
 2681|      0|	sign = -1;
 2682|      0|	pnum_head = p;
 2683|      0|      }
 2684|      0|      else {
 2685|      0|	r = ONIGERR_INVALID_GROUP_NAME;
  ------------------
  |  |  683|      0|#define ONIGERR_INVALID_GROUP_NAME                           -215
  ------------------
 2686|      0|	is_num = 0;
 2687|      0|      }
 2688|      0|    }
 2689|  1.65k|    else if (!ONIGENC_IS_CODE_NAME(enc, c)) {
  ------------------
  |  | 2512|  1.65k|#  define ONIGENC_IS_CODE_NAME(enc, c)  ONIGENC_IS_CODE_WORD(enc, c)
  |  |  ------------------
  |  |  |  |  404|  1.65k|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  375|  1.65k|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2689:14): [True: 0, False: 1.65k]
  ------------------
 2690|      0|      r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
  ------------------
  |  |  684|      0|#define ONIGERR_INVALID_CHAR_IN_GROUP_NAME                   -216
  ------------------
 2691|      0|    }
 2692|  1.65k|  }
 2693|       |
 2694|  1.65k|  if (r == 0) {
  ------------------
  |  Branch (2694:7): [True: 1.65k, False: 0]
  ------------------
 2695|  6.19k|    while (!PEND) {
  ------------------
  |  |  299|  6.19k|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 6.19k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2695:12): [True: 6.19k, False: 0]
  ------------------
 2696|  6.19k|      name_end = p;
 2697|  6.19k|      PFETCH_S(c);
  ------------------
  |  |  314|  6.19k|#define PFETCH_S(c) do { \
  |  |  315|  6.19k|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|  6.19k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (315:8): [True: 0, False: 6.19k]
  |  |  ------------------
  |  |  316|  6.19k|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|  6.19k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|  6.19k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 6.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  317|  6.19k|} while (0)
  |  |  ------------------
  |  |  |  Branch (317:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2698|  6.19k|      if (c == end_code || c == ')') {
  ------------------
  |  Branch (2698:11): [True: 1.65k, False: 4.54k]
  |  Branch (2698:28): [True: 0, False: 4.54k]
  ------------------
 2699|  1.65k|	if (is_num == 2) {
  ------------------
  |  Branch (2699:6): [True: 0, False: 1.65k]
  ------------------
 2700|      0|	  r = ONIGERR_INVALID_GROUP_NAME;
  ------------------
  |  |  683|      0|#define ONIGERR_INVALID_GROUP_NAME                           -215
  ------------------
 2701|      0|	  goto teardown;
 2702|      0|	}
 2703|  1.65k|	break;
 2704|  1.65k|      }
 2705|       |
 2706|  4.54k|      if (is_num != 0) {
  ------------------
  |  Branch (2706:11): [True: 0, False: 4.54k]
  ------------------
 2707|      0|	if (ONIGENC_IS_CODE_DIGIT(enc, c)) {
  ------------------
  |  |  400|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2708|      0|	  is_num = 1;
 2709|      0|	}
 2710|      0|	else {
 2711|      0|	  if (!ONIGENC_IS_CODE_WORD(enc, c))
  ------------------
  |  |  404|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  ------------------
  ------------------
  |  Branch (2711:8): [True: 0, False: 0]
  ------------------
 2712|      0|	    r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
  ------------------
  |  |  684|      0|#define ONIGERR_INVALID_CHAR_IN_GROUP_NAME                   -216
  ------------------
 2713|      0|	  else
 2714|      0|	    r = ONIGERR_INVALID_GROUP_NAME;
  ------------------
  |  |  683|      0|#define ONIGERR_INVALID_GROUP_NAME                           -215
  ------------------
 2715|      0|	  goto teardown;
 2716|      0|	}
 2717|      0|      }
 2718|  4.54k|      else {
 2719|  4.54k|	if (!ONIGENC_IS_CODE_NAME(enc, c)) {
  ------------------
  |  | 2512|  4.54k|#  define ONIGENC_IS_CODE_NAME(enc, c)  ONIGENC_IS_CODE_WORD(enc, c)
  |  |  ------------------
  |  |  |  |  404|  4.54k|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  375|  4.54k|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2719:6): [True: 0, False: 4.54k]
  ------------------
 2720|      0|	  r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
  ------------------
  |  |  684|      0|#define ONIGERR_INVALID_CHAR_IN_GROUP_NAME                   -216
  ------------------
 2721|      0|	  goto teardown;
 2722|      0|	}
 2723|  4.54k|      }
 2724|  4.54k|    }
 2725|       |
 2726|  1.65k|    if (c != end_code) {
  ------------------
  |  Branch (2726:9): [True: 0, False: 1.65k]
  ------------------
 2727|      0|      r = ONIGERR_INVALID_GROUP_NAME;
  ------------------
  |  |  683|      0|#define ONIGERR_INVALID_GROUP_NAME                           -215
  ------------------
 2728|      0|      name_end = end;
 2729|      0|      goto err;
 2730|      0|    }
 2731|       |
 2732|  1.65k|    if (is_num != 0) {
  ------------------
  |  Branch (2732:9): [True: 0, False: 1.65k]
  ------------------
 2733|      0|      *rback_num = onig_scan_unsigned_number(&pnum_head, name_end, enc);
 2734|      0|      if (*rback_num < 0) return ONIGERR_TOO_BIG_NUMBER;
  ------------------
  |  |  669|      0|#define ONIGERR_TOO_BIG_NUMBER                               -200
  ------------------
  |  Branch (2734:11): [True: 0, False: 0]
  ------------------
 2735|      0|      else if (*rback_num == 0) {
  ------------------
  |  Branch (2735:16): [True: 0, False: 0]
  ------------------
 2736|      0|	r = ONIGERR_INVALID_GROUP_NAME;
  ------------------
  |  |  683|      0|#define ONIGERR_INVALID_GROUP_NAME                           -215
  ------------------
 2737|      0|	goto err;
 2738|      0|      }
 2739|       |
 2740|      0|      *rback_num *= sign;
 2741|      0|    }
 2742|       |
 2743|  1.65k|    *rname_end = name_end;
 2744|  1.65k|    *src = p;
 2745|  1.65k|    return 0;
 2746|  1.65k|  }
 2747|      0|  else {
 2748|      0|teardown:
 2749|      0|    while (!PEND) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2749:12): [True: 0, False: 0]
  ------------------
 2750|      0|      name_end = p;
 2751|      0|      PFETCH_S(c);
  ------------------
  |  |  314|      0|#define PFETCH_S(c) do { \
  |  |  315|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (315:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  316|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  317|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (317:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2752|      0|      if (c == end_code || c == ')')
  ------------------
  |  Branch (2752:11): [True: 0, False: 0]
  |  Branch (2752:28): [True: 0, False: 0]
  ------------------
 2753|      0|	break;
 2754|      0|    }
 2755|      0|    if (PEND)
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2756|      0|      name_end = end;
 2757|       |
 2758|      0|  err:
 2759|      0|    onig_scan_env_set_error_string(env, r, *src, name_end);
 2760|      0|    return r;
 2761|      0|  }
 2762|  1.65k|}
regparse.c:fetch_escaped_value:
 2422|  7.43k|{
 2423|  7.43k|  int v;
 2424|  7.43k|  OnigCodePoint c;
 2425|  7.43k|  OnigEncoding enc = env->enc;
 2426|  7.43k|  UChar* p = *src;
  ------------------
  |  |   76|  7.43k|# define UChar OnigUChar
  ------------------
 2427|       |
 2428|  7.43k|  if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
  ------------------
  |  |  299|  7.43k|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 7.43k]
  |  |  |  Branch (299:23): [True: 7.43k, False: 0]
  |  |  ------------------
  ------------------
                if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
  ------------------
  |  |  649|      0|#define ONIGERR_END_PATTERN_AT_ESCAPE                        -104
  ------------------
 2429|       |
 2430|  7.43k|  PFETCH_S(c);
  ------------------
  |  |  314|  7.43k|#define PFETCH_S(c) do { \
  |  |  315|  7.43k|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|  7.43k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (315:8): [True: 0, False: 7.43k]
  |  |  ------------------
  |  |  316|  7.43k|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|  7.43k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|  7.43k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 7.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  317|  7.43k|} while (0)
  |  |  ------------------
  |  |  |  Branch (317:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2431|  7.43k|  switch (c) {
 2432|      0|  case 'M':
  ------------------
  |  Branch (2432:3): [True: 0, False: 7.43k]
  ------------------
 2433|      0|    if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2434|      0|      if (PEND) return ONIGERR_END_PATTERN_AT_META;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if (PEND) return ONIGERR_END_PATTERN_AT_META;
  ------------------
  |  |  650|      0|#define ONIGERR_END_PATTERN_AT_META                          -105
  ------------------
 2435|      0|      PFETCH_S(c);
  ------------------
  |  |  314|      0|#define PFETCH_S(c) do { \
  |  |  315|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (315:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  316|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  317|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (317:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2436|      0|      if (c != '-') return ONIGERR_META_CODE_SYNTAX;
  ------------------
  |  |  652|      0|#define ONIGERR_META_CODE_SYNTAX                             -108
  ------------------
  |  Branch (2436:11): [True: 0, False: 0]
  ------------------
 2437|      0|      if (PEND) return ONIGERR_END_PATTERN_AT_META;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if (PEND) return ONIGERR_END_PATTERN_AT_META;
  ------------------
  |  |  650|      0|#define ONIGERR_END_PATTERN_AT_META                          -105
  ------------------
 2438|      0|      PFETCH_S(c);
  ------------------
  |  |  314|      0|#define PFETCH_S(c) do { \
  |  |  315|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (315:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  316|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  317|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (317:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2439|      0|      if (c == MC_ESC(env->syntax)) {
  ------------------
  |  |  761|      0|#define MC_ESC(syn)               (syn)->meta_char_table.esc
  ------------------
  |  Branch (2439:11): [True: 0, False: 0]
  ------------------
 2440|      0|	v = fetch_escaped_value(&p, end, env, &c);
 2441|      0|	if (v < 0) return v;
  ------------------
  |  Branch (2441:6): [True: 0, False: 0]
  ------------------
 2442|      0|      }
 2443|      0|      c = ((c & 0xff) | 0x80);
 2444|      0|    }
 2445|      0|    else
 2446|      0|      goto backslash;
 2447|      0|    break;
 2448|       |
 2449|      0|  case 'C':
  ------------------
  |  Branch (2449:3): [True: 0, False: 7.43k]
  ------------------
 2450|      0|    if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2451|      0|      if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL;
  ------------------
  |  |  651|      0|#define ONIGERR_END_PATTERN_AT_CONTROL                       -106
  ------------------
 2452|      0|      PFETCH_S(c);
  ------------------
  |  |  314|      0|#define PFETCH_S(c) do { \
  |  |  315|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (315:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  316|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  317|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (317:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2453|      0|      if (c != '-') return ONIGERR_CONTROL_CODE_SYNTAX;
  ------------------
  |  |  653|      0|#define ONIGERR_CONTROL_CODE_SYNTAX                          -109
  ------------------
  |  Branch (2453:11): [True: 0, False: 0]
  ------------------
 2454|      0|      goto control;
 2455|      0|    }
 2456|      0|    else
 2457|      0|      goto backslash;
 2458|       |
 2459|      0|  case 'c':
  ------------------
  |  Branch (2459:3): [True: 0, False: 7.43k]
  ------------------
 2460|      0|    if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_C_CONTROL)) {
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2461|      0|    control:
 2462|      0|      if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL;
  ------------------
  |  |  651|      0|#define ONIGERR_END_PATTERN_AT_CONTROL                       -106
  ------------------
 2463|      0|      PFETCH_S(c);
  ------------------
  |  |  314|      0|#define PFETCH_S(c) do { \
  |  |  315|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (315:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  316|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  317|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (317:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2464|      0|      if (c == '?') {
  ------------------
  |  Branch (2464:11): [True: 0, False: 0]
  ------------------
 2465|      0|	c = 0177;
 2466|      0|      }
 2467|      0|      else {
 2468|      0|	if (c == MC_ESC(env->syntax)) {
  ------------------
  |  |  761|      0|#define MC_ESC(syn)               (syn)->meta_char_table.esc
  ------------------
  |  Branch (2468:6): [True: 0, False: 0]
  ------------------
 2469|      0|	  v = fetch_escaped_value(&p, end, env, &c);
 2470|      0|	  if (v < 0) return v;
  ------------------
  |  Branch (2470:8): [True: 0, False: 0]
  ------------------
 2471|      0|	}
 2472|      0|	c &= 0x9f;
 2473|      0|      }
 2474|      0|      break;
 2475|      0|    }
 2476|       |    /* fall through */
 2477|       |
 2478|  7.43k|  default:
  ------------------
  |  Branch (2478:3): [True: 7.43k, False: 0]
  ------------------
 2479|  7.43k|    {
 2480|  7.43k|    backslash:
 2481|  7.43k|      c = conv_backslash_value(c, env);
 2482|  7.43k|    }
 2483|  7.43k|    break;
 2484|  7.43k|  }
 2485|       |
 2486|  7.43k|  *src = p;
 2487|  7.43k|  *val = c;
 2488|  7.43k|  return 0;
 2489|  7.43k|}
regparse.c:conv_backslash_value:
 2097|  7.43k|{
 2098|  7.43k|  if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_CONTROL_CHARS)) {
  ------------------
  |  |  330|  7.43k|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 7.43k, False: 0]
  |  |  ------------------
  ------------------
 2099|  7.43k|    switch (c) {
 2100|    826|    case 'n': return '\n';
  ------------------
  |  Branch (2100:5): [True: 826, False: 6.60k]
  ------------------
 2101|  3.30k|    case 't': return '\t';
  ------------------
  |  Branch (2101:5): [True: 3.30k, False: 4.13k]
  ------------------
 2102|    826|    case 'r': return '\r';
  ------------------
  |  Branch (2102:5): [True: 826, False: 6.60k]
  ------------------
 2103|      0|    case 'f': return '\f';
  ------------------
  |  Branch (2103:5): [True: 0, False: 7.43k]
  ------------------
 2104|      0|    case 'a': return '\007';
  ------------------
  |  Branch (2104:5): [True: 0, False: 7.43k]
  ------------------
 2105|      0|    case 'b': return '\010';
  ------------------
  |  Branch (2105:5): [True: 0, False: 7.43k]
  ------------------
 2106|      0|    case 'e': return '\033';
  ------------------
  |  Branch (2106:5): [True: 0, False: 7.43k]
  ------------------
 2107|      0|    case 'v':
  ------------------
  |  Branch (2107:5): [True: 0, False: 7.43k]
  ------------------
 2108|      0|      if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_V_VTAB))
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2109|      0|	return '\v';
 2110|      0|      break;
 2111|       |
 2112|  2.47k|    default:
  ------------------
  |  Branch (2112:5): [True: 2.47k, False: 4.95k]
  ------------------
 2113|  2.47k|      if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'))
  ------------------
  |  Branch (2113:12): [True: 0, False: 2.47k]
  |  Branch (2113:24): [True: 0, False: 0]
  |  Branch (2113:38): [True: 1.65k, False: 826]
  |  Branch (2113:50): [True: 0, False: 1.65k]
  ------------------
 2114|      0|	  UNKNOWN_ESC_WARN(env, c);
 2115|  2.47k|      break;
 2116|  7.43k|    }
 2117|  7.43k|  }
 2118|  2.47k|  return c;
 2119|  7.43k|}
regparse.c:parse_subexp:
 6550|  14.4k|{
 6551|  14.4k|  int r;
 6552|  14.4k|  Node *node, **headp;
 6553|       |
 6554|  14.4k|  *top = NULL;
 6555|  14.4k|  env->parse_depth++;
 6556|  14.4k|  if (env->parse_depth > ParseDepthLimit)
  ------------------
  |  Branch (6556:7): [True: 0, False: 14.4k]
  ------------------
 6557|      0|    return ONIGERR_PARSE_DEPTH_LIMIT_OVER;
  ------------------
  |  |  639|      0|#define ONIGERR_PARSE_DEPTH_LIMIT_OVER                        -16
  ------------------
 6558|  14.4k|  r = parse_branch(&node, tok, term, src, end, env);
 6559|  14.4k|  if (r < 0) {
  ------------------
  |  Branch (6559:7): [True: 0, False: 14.4k]
  ------------------
 6560|      0|    onig_node_free(node);
 6561|      0|    return r;
 6562|      0|  }
 6563|       |
 6564|  14.4k|  if (r == term) {
  ------------------
  |  Branch (6564:7): [True: 11.9k, False: 2.47k]
  ------------------
 6565|  11.9k|    *top = node;
 6566|  11.9k|  }
 6567|  2.47k|  else if (r == TK_ALT) {
  ------------------
  |  Branch (6567:12): [True: 2.47k, False: 0]
  ------------------
 6568|  2.47k|    *top  = onig_node_new_alt(node, NULL);
 6569|  2.47k|    headp = &(NCDR(*top));
  ------------------
  |  |   87|  2.47k|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|  2.47k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 6570|  5.78k|    while (r == TK_ALT) {
  ------------------
  |  Branch (6570:12): [True: 3.30k, False: 2.47k]
  ------------------
 6571|  3.30k|      r = fetch_token(tok, src, end, env);
 6572|  3.30k|      if (r < 0) return r;
  ------------------
  |  Branch (6572:11): [True: 0, False: 3.30k]
  ------------------
 6573|  3.30k|      r = parse_branch(&node, tok, term, src, end, env);
 6574|  3.30k|      if (r < 0) {
  ------------------
  |  Branch (6574:11): [True: 0, False: 3.30k]
  ------------------
 6575|      0|	onig_node_free(node);
 6576|      0|	return r;
 6577|      0|      }
 6578|       |
 6579|  3.30k|      *headp = onig_node_new_alt(node, NULL);
 6580|  3.30k|      headp = &(NCDR(*headp));
  ------------------
  |  |   87|  3.30k|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|  3.30k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 6581|  3.30k|    }
 6582|       |
 6583|  2.47k|    if (tok->type != (enum TokenSyms )term)
  ------------------
  |  Branch (6583:9): [True: 0, False: 2.47k]
  ------------------
 6584|      0|      goto err;
 6585|  2.47k|  }
 6586|      0|  else {
 6587|      0|    onig_node_free(node);
 6588|      0|  err:
 6589|      0|    if (term == TK_SUBEXP_CLOSE)
  ------------------
  |  Branch (6589:9): [True: 0, False: 0]
  ------------------
 6590|      0|      return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS;
  ------------------
  |  |  661|      0|#define ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS       -117
  ------------------
 6591|      0|    else
 6592|      0|      return ONIGERR_PARSER_BUG;
  ------------------
  |  |  634|      0|#define ONIGERR_PARSER_BUG                                    -11
  ------------------
 6593|      0|  }
 6594|       |
 6595|  14.4k|  env->parse_depth--;
 6596|  14.4k|  return r;
 6597|  14.4k|}
regparse.c:parse_branch:
 6507|  17.7k|{
 6508|  17.7k|  int r;
 6509|  17.7k|  Node *node, **headp;
 6510|       |
 6511|  17.7k|  *top = NULL;
 6512|  17.7k|  r = parse_exp(&node, tok, term, src, end, env);
 6513|  17.7k|  if (r < 0) {
  ------------------
  |  Branch (6513:7): [True: 0, False: 17.7k]
  ------------------
 6514|      0|    onig_node_free(node);
 6515|      0|    return r;
 6516|      0|  }
 6517|       |
 6518|  17.7k|  if (r == TK_EOT || r == term || r == TK_ALT) {
  ------------------
  |  Branch (6518:7): [True: 826, False: 16.9k]
  |  Branch (6518:22): [True: 4.13k, False: 12.8k]
  |  Branch (6518:35): [True: 2.89k, False: 9.91k]
  ------------------
 6519|  7.84k|    *top = node;
 6520|  7.84k|  }
 6521|  9.91k|  else {
 6522|  9.91k|    *top  = node_new_list(node, NULL);
 6523|  9.91k|    headp = &(NCDR(*top));
  ------------------
  |  |   87|  9.91k|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|  9.91k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 6524|  40.8k|    while (r != TK_EOT && r != term && r != TK_ALT) {
  ------------------
  |  Branch (6524:12): [True: 32.2k, False: 8.67k]
  |  Branch (6524:27): [True: 31.3k, False: 826]
  |  Branch (6524:40): [True: 30.9k, False: 413]
  ------------------
 6525|  30.9k|      r = parse_exp(&node, tok, term, src, end, env);
 6526|  30.9k|      if (r < 0) {
  ------------------
  |  Branch (6526:11): [True: 0, False: 30.9k]
  ------------------
 6527|      0|	onig_node_free(node);
 6528|      0|	return r;
 6529|      0|      }
 6530|       |
 6531|  30.9k|      if (NTYPE(node) == NT_LIST) {
  ------------------
  |  |   69|  30.9k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
                    if (NTYPE(node) == NT_LIST) {
  ------------------
  |  |   46|  30.9k|#define NT_LIST        8
  ------------------
  |  Branch (6531:11): [True: 0, False: 30.9k]
  ------------------
 6532|      0|	*headp = node;
 6533|      0|	while (IS_NOT_NULL(NCDR(node))) node = NCDR(node);
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	while (IS_NOT_NULL(NCDR(node))) node = NCDR(node);
  ------------------
  |  |   87|      0|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 6534|      0|	headp = &(NCDR(node));
  ------------------
  |  |   87|      0|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 6535|      0|      }
 6536|  30.9k|      else {
 6537|  30.9k|	*headp = node_new_list(node, NULL);
 6538|  30.9k|	headp = &(NCDR(*headp));
  ------------------
  |  |   87|  30.9k|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|  30.9k|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 6539|  30.9k|      }
 6540|  30.9k|    }
 6541|  9.91k|  }
 6542|       |
 6543|  17.7k|  return r;
 6544|  17.7k|}
regparse.c:parse_exp:
 6129|  48.7k|{
 6130|  48.7k|  int r, len, group = 0;
 6131|  48.7k|  Node* qn;
 6132|  48.7k|  Node** targetp;
 6133|  48.7k|  unsigned int parse_depth;
 6134|       |
 6135|  48.7k|  *np = NULL;
 6136|  48.7k|  if (tok->type == (enum TokenSyms )term)
  ------------------
  |  Branch (6136:7): [True: 413, False: 48.3k]
  ------------------
 6137|    413|    goto end_of_token;
 6138|       |
 6139|  48.3k|  parse_depth = env->parse_depth;
 6140|       |
 6141|  48.3k|  switch (tok->type) {
 6142|      0|  case TK_ALT:
  ------------------
  |  Branch (6142:3): [True: 0, False: 48.3k]
  ------------------
 6143|      0|  case TK_EOT:
  ------------------
  |  Branch (6143:3): [True: 0, False: 48.3k]
  ------------------
 6144|    413|  end_of_token:
 6145|    413|    *np = node_new_empty();
 6146|    413|    return tok->type;
 6147|      0|    break;
 6148|       |
 6149|  4.95k|  case TK_SUBEXP_OPEN:
  ------------------
  |  Branch (6149:3): [True: 4.95k, False: 43.3k]
  ------------------
 6150|  4.95k|    r = parse_enclose(np, tok, TK_SUBEXP_CLOSE, src, end, env);
 6151|  4.95k|    if (r < 0) return r;
  ------------------
  |  Branch (6151:9): [True: 0, False: 4.95k]
  ------------------
 6152|  4.95k|    if (r == 1) group = 1;
  ------------------
  |  Branch (6152:9): [True: 2.47k, False: 2.47k]
  ------------------
 6153|  2.47k|    else if (r == 2) { /* option only */
  ------------------
  |  Branch (6153:14): [True: 0, False: 2.47k]
  ------------------
 6154|      0|      Node* target;
 6155|      0|      OnigOptionType prev = env->option;
 6156|       |
 6157|      0|      env->option = NENCLOSE(*np)->option;
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 6158|      0|      r = fetch_token(tok, src, end, env);
 6159|      0|      if (r < 0) {
  ------------------
  |  Branch (6159:11): [True: 0, False: 0]
  ------------------
 6160|      0|	env->option = prev;
 6161|      0|	return r;
 6162|      0|      }
 6163|      0|      r = parse_subexp(&target, tok, term, src, end, env);
 6164|      0|      env->option = prev;
 6165|      0|      if (r < 0) {
  ------------------
  |  Branch (6165:11): [True: 0, False: 0]
  ------------------
 6166|      0|	onig_node_free(target);
 6167|      0|	return r;
 6168|      0|      }
 6169|      0|      NENCLOSE(*np)->target = target;
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 6170|      0|      return tok->type;
 6171|      0|    }
 6172|  4.95k|    break;
 6173|       |
 6174|  4.95k|  case TK_SUBEXP_CLOSE:
  ------------------
  |  Branch (6174:3): [True: 0, False: 48.3k]
  ------------------
 6175|      0|    if (! IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP))
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  ------------------
  |  Branch (6175:9): [True: 0, False: 0]
  ------------------
 6176|      0|      return ONIGERR_UNMATCHED_CLOSE_PARENTHESIS;
  ------------------
  |  |  660|      0|#define ONIGERR_UNMATCHED_CLOSE_PARENTHESIS                  -116
  ------------------
 6177|       |
 6178|      0|    if (tok->escaped) goto tk_raw_byte;
  ------------------
  |  Branch (6178:9): [True: 0, False: 0]
  ------------------
 6179|      0|    else goto tk_byte;
 6180|      0|    break;
 6181|       |
 6182|      0|  case TK_LINEBREAK:
  ------------------
  |  Branch (6182:3): [True: 0, False: 48.3k]
  ------------------
 6183|      0|    r = node_linebreak(np, env);
 6184|      0|    if (r < 0) return r;
  ------------------
  |  Branch (6184:9): [True: 0, False: 0]
  ------------------
 6185|      0|    break;
 6186|       |
 6187|      0|  case TK_EXTENDED_GRAPHEME_CLUSTER:
  ------------------
  |  Branch (6187:3): [True: 0, False: 48.3k]
  ------------------
 6188|      0|    r = node_extended_grapheme_cluster(np, env);
 6189|      0|    if (r < 0) return r;
  ------------------
  |  Branch (6189:9): [True: 0, False: 0]
  ------------------
 6190|      0|    break;
 6191|       |
 6192|      0|  case TK_KEEP:
  ------------------
  |  Branch (6192:3): [True: 0, False: 48.3k]
  ------------------
 6193|      0|    *np = onig_node_new_anchor(ANCHOR_KEEP);
  ------------------
  |  |  559|      0|#define ANCHOR_KEEP             (1<<16)
  ------------------
 6194|      0|    CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6195|      0|    break;
 6196|       |
 6197|  17.3k|  case TK_STRING:
  ------------------
  |  Branch (6197:3): [True: 17.3k, False: 30.9k]
  ------------------
 6198|  17.3k|  tk_byte:
 6199|  17.3k|    {
 6200|  17.3k|      *np = node_new_str(tok->backp, *src);
 6201|  17.3k|      CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|  17.3k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  17.3k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 17.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6202|       |
 6203|  17.3k|    string_loop:
 6204|   151k|      while (1) {
  ------------------
  |  Branch (6204:14): [Folded - Ignored]
  ------------------
 6205|   151k|	r = fetch_token(tok, src, end, env);
 6206|   151k|	if (r < 0) return r;
  ------------------
  |  Branch (6206:6): [True: 0, False: 151k]
  ------------------
 6207|   151k|	if (r == TK_STRING) {
  ------------------
  |  Branch (6207:6): [True: 134k, False: 17.3k]
  ------------------
 6208|   134k|	  r = onig_node_str_cat(*np, tok->backp, *src);
 6209|   134k|	}
 6210|  17.3k|#ifndef NUMBERED_CHAR_IS_NOT_CASE_AMBIG
 6211|  17.3k|	else if (r == TK_CODE_POINT) {
  ------------------
  |  Branch (6211:11): [True: 0, False: 17.3k]
  ------------------
 6212|      0|	  r = node_str_cat_codepoint(*np, env->enc, tok->u.code);
 6213|      0|	}
 6214|  17.3k|#endif
 6215|  17.3k|	else {
 6216|  17.3k|	  break;
 6217|  17.3k|	}
 6218|   134k|	if (r < 0) return r;
  ------------------
  |  Branch (6218:6): [True: 0, False: 134k]
  ------------------
 6219|   134k|      }
 6220|       |
 6221|  17.3k|    string_end:
 6222|  17.3k|      targetp = np;
 6223|  17.3k|      goto repeat;
 6224|  17.3k|    }
 6225|      0|    break;
 6226|       |
 6227|      0|  case TK_RAW_BYTE:
  ------------------
  |  Branch (6227:3): [True: 0, False: 48.3k]
  ------------------
 6228|      0|  tk_raw_byte:
 6229|      0|    {
 6230|      0|      *np = node_new_str_raw_char((UChar )tok->u.c);
 6231|      0|      CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6232|      0|      len = 1;
 6233|      0|      while (1) {
  ------------------
  |  Branch (6233:14): [Folded - Ignored]
  ------------------
 6234|      0|	if (len >= ONIGENC_MBC_MINLEN(env->enc)) {
  ------------------
  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  ------------------
  |  Branch (6234:6): [True: 0, False: 0]
  ------------------
 6235|      0|	  if (len == enclen(env->enc, NSTR(*np)->s, NSTR(*np)->end)) {
  ------------------
  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6235:8): [True: 0, False: 0]
  ------------------
 6236|      0|	    r = fetch_token(tok, src, end, env);
 6237|      0|	    NSTRING_CLEAR_RAW(*np);
  ------------------
  |  |  110|      0|#define NSTRING_CLEAR_RAW(node)        (node)->u.str.flag &= ~NSTR_RAW
  |  |  ------------------
  |  |  |  |  104|      0|#define NSTR_RAW                (1<<0) /* by backslashed number */
  |  |  ------------------
  ------------------
 6238|      0|	    goto string_end;
 6239|      0|	  }
 6240|      0|	}
 6241|       |
 6242|      0|	r = fetch_token(tok, src, end, env);
 6243|      0|	if (r < 0) return r;
  ------------------
  |  Branch (6243:6): [True: 0, False: 0]
  ------------------
 6244|      0|	if (r != TK_RAW_BYTE) {
  ------------------
  |  Branch (6244:6): [True: 0, False: 0]
  ------------------
 6245|       |	  /* Don't use this, it is wrong for little endian encodings. */
 6246|       |#ifdef USE_PAD_TO_SHORT_BYTE_CHAR
 6247|       |	  int rem;
 6248|       |	  if (len < ONIGENC_MBC_MINLEN(env->enc)) {
 6249|       |	    rem = ONIGENC_MBC_MINLEN(env->enc) - len;
 6250|       |	    (void )node_str_head_pad(NSTR(*np), rem, (UChar )0);
 6251|       |	    if (len + rem == enclen(env->enc, NSTR(*np)->s)) {
 6252|       |	      NSTRING_CLEAR_RAW(*np);
 6253|       |	      goto string_end;
 6254|       |	    }
 6255|       |	  }
 6256|       |#endif
 6257|      0|	  return ONIGERR_TOO_SHORT_MULTI_BYTE_STRING;
  ------------------
  |  |  675|      0|#define ONIGERR_TOO_SHORT_MULTI_BYTE_STRING                  -206
  ------------------
 6258|      0|	}
 6259|       |
 6260|      0|	r = node_str_cat_char(*np, (UChar )tok->u.c);
 6261|      0|	if (r < 0) return r;
  ------------------
  |  Branch (6261:6): [True: 0, False: 0]
  ------------------
 6262|       |
 6263|      0|	len++;
 6264|      0|      }
 6265|      0|    }
 6266|      0|    break;
 6267|       |
 6268|      0|  case TK_CODE_POINT:
  ------------------
  |  Branch (6268:3): [True: 0, False: 48.3k]
  ------------------
 6269|      0|    {
 6270|      0|      *np = node_new_empty();
 6271|      0|      CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6272|      0|      r = node_str_cat_codepoint(*np, env->enc, tok->u.code);
 6273|      0|      if (r != 0) return r;
  ------------------
  |  Branch (6273:11): [True: 0, False: 0]
  ------------------
 6274|       |#ifdef NUMBERED_CHAR_IS_NOT_CASE_AMBIG
 6275|       |      NSTRING_SET_RAW(*np);
 6276|       |#else
 6277|      0|      goto string_loop;
 6278|      0|#endif
 6279|      0|    }
 6280|      0|    break;
 6281|       |
 6282|      0|  case TK_QUOTE_OPEN:
  ------------------
  |  Branch (6282:3): [True: 0, False: 48.3k]
  ------------------
 6283|      0|    {
 6284|      0|      OnigCodePoint end_op[2];
 6285|      0|      UChar *qstart, *qend, *nextp;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 6286|       |
 6287|      0|      end_op[0] = (OnigCodePoint )MC_ESC(env->syntax);
  ------------------
  |  |  761|      0|#define MC_ESC(syn)               (syn)->meta_char_table.esc
  ------------------
 6288|      0|      end_op[1] = (OnigCodePoint )'E';
 6289|      0|      qstart = *src;
 6290|      0|      qend = find_str_position(end_op, 2, qstart, end, &nextp, env->enc);
 6291|      0|      if (IS_NULL(qend)) {
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6292|      0|	nextp = qend = end;
 6293|      0|      }
 6294|      0|      *np = node_new_str(qstart, qend);
 6295|      0|      CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6296|      0|      *src = nextp;
 6297|      0|    }
 6298|      0|    break;
 6299|       |
 6300|  3.71k|  case TK_CHAR_TYPE:
  ------------------
  |  Branch (6300:3): [True: 3.71k, False: 44.6k]
  ------------------
 6301|  3.71k|    {
 6302|  3.71k|      switch (tok->u.prop.ctype) {
 6303|      0|      case ONIGENC_CTYPE_WORD:
  ------------------
  |  |  306|      0|#define ONIGENC_CTYPE_WORD     12
  ------------------
  |  Branch (6303:7): [True: 0, False: 3.71k]
  ------------------
 6304|      0|	*np = node_new_ctype(tok->u.prop.ctype, tok->u.prop.not,
 6305|      0|			     IS_ASCII_RANGE(env->option));
  ------------------
  |  |  406|      0|#define IS_ASCII_RANGE(option)    ((option) & ONIG_OPTION_ASCII_RANGE)
  |  |  ------------------
  |  |  |  |  470|      0|#define ONIG_OPTION_ASCII_RANGE          (ONIG_OPTION_NOTEOS << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  468|      0|#define ONIG_OPTION_NOTEOS               (ONIG_OPTION_NOTBOS << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  467|      0|#define ONIG_OPTION_NOTBOS               (ONIG_OPTION_NOTEOL << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  466|      0|#define ONIG_OPTION_NOTEOL               (ONIG_OPTION_NOTBOL << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  465|      0|#define ONIG_OPTION_NOTBOL               (ONIG_OPTION_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  463|      0|#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  462|      0|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  461|      0|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  460|      0|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  459|      0|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  458|      0|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  456|      0|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|      0|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6306|      0|	CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6307|      0|	break;
 6308|       |
 6309|  2.06k|      case ONIGENC_CTYPE_SPACE:
  ------------------
  |  |  303|  2.06k|#define ONIGENC_CTYPE_SPACE     9
  ------------------
  |  Branch (6309:7): [True: 2.06k, False: 1.65k]
  ------------------
 6310|  3.71k|      case ONIGENC_CTYPE_DIGIT:
  ------------------
  |  |  298|  3.71k|#define ONIGENC_CTYPE_DIGIT     4
  ------------------
  |  Branch (6310:7): [True: 1.65k, False: 2.06k]
  ------------------
 6311|  3.71k|      case ONIGENC_CTYPE_XDIGIT:
  ------------------
  |  |  305|  3.71k|#define ONIGENC_CTYPE_XDIGIT   11
  ------------------
  |  Branch (6311:7): [True: 0, False: 3.71k]
  ------------------
 6312|  3.71k|	{
 6313|  3.71k|	  CClassNode* cc;
 6314|       |
 6315|  3.71k|	  *np = node_new_cclass();
 6316|  3.71k|	  CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|  3.71k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  3.71k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 3.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6317|  3.71k|	  cc = NCCLASS(*np);
  ------------------
  |  |   77|  3.71k|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 6318|  3.71k|	  r = add_ctype_to_cc(cc, tok->u.prop.ctype, 0,
 6319|  3.71k|	      IS_ASCII_RANGE(env->option), env);
  ------------------
  |  |  406|  3.71k|#define IS_ASCII_RANGE(option)    ((option) & ONIG_OPTION_ASCII_RANGE)
  |  |  ------------------
  |  |  |  |  470|  3.71k|#define ONIG_OPTION_ASCII_RANGE          (ONIG_OPTION_NOTEOS << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  468|  3.71k|#define ONIG_OPTION_NOTEOS               (ONIG_OPTION_NOTBOS << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  467|  3.71k|#define ONIG_OPTION_NOTBOS               (ONIG_OPTION_NOTEOL << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  466|  3.71k|#define ONIG_OPTION_NOTEOL               (ONIG_OPTION_NOTBOL << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  465|  3.71k|#define ONIG_OPTION_NOTBOL               (ONIG_OPTION_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  463|  3.71k|#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  462|  3.71k|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  461|  3.71k|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  460|  3.71k|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  459|  3.71k|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  458|  3.71k|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  456|  3.71k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|  3.71k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|  3.71k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6320|  3.71k|	  if (r != 0) return r;
  ------------------
  |  Branch (6320:8): [True: 0, False: 3.71k]
  ------------------
 6321|  3.71k|	  if (tok->u.prop.not != 0) NCCLASS_SET_NOT(cc);
  ------------------
  |  |  807|      0|#define NCCLASS_SET_NOT(nd)     NCCLASS_FLAG_SET(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  800|      0|#define NCCLASS_FLAG_SET(cc,flag)    (NCCLASS_FLAGS(cc) |= (flag))
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6321:8): [True: 0, False: 3.71k]
  ------------------
 6322|  3.71k|	}
 6323|      0|	break;
 6324|       |
 6325|      0|      default:
  ------------------
  |  Branch (6325:7): [True: 0, False: 3.71k]
  ------------------
 6326|      0|	return ONIGERR_PARSER_BUG;
  ------------------
  |  |  634|      0|#define ONIGERR_PARSER_BUG                                    -11
  ------------------
 6327|      0|	break;
 6328|  3.71k|      }
 6329|  3.71k|    }
 6330|  3.71k|    break;
 6331|       |
 6332|  3.71k|  case TK_CHAR_PROPERTY:
  ------------------
  |  Branch (6332:3): [True: 0, False: 48.3k]
  ------------------
 6333|      0|    r = parse_char_property(np, tok, src, end, env);
 6334|      0|    if (r != 0) return r;
  ------------------
  |  Branch (6334:9): [True: 0, False: 0]
  ------------------
 6335|      0|    break;
 6336|       |
 6337|  6.19k|  case TK_CC_OPEN:
  ------------------
  |  Branch (6337:3): [True: 6.19k, False: 42.1k]
  ------------------
 6338|  6.19k|    {
 6339|  6.19k|      Node *asc_node;
 6340|  6.19k|      CClassNode* cc;
 6341|  6.19k|      OnigCodePoint code;
 6342|       |
 6343|  6.19k|      r = parse_char_class(np, &asc_node, tok, src, end, env);
 6344|  6.19k|      if (r != 0) {
  ------------------
  |  Branch (6344:11): [True: 0, False: 6.19k]
  ------------------
 6345|      0|	onig_node_free(asc_node);
 6346|      0|	return r;
 6347|      0|      }
 6348|       |
 6349|  6.19k|      cc = NCCLASS(*np);
  ------------------
  |  |   77|  6.19k|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 6350|  6.19k|      if (is_onechar_cclass(cc, &code)) {
  ------------------
  |  Branch (6350:11): [True: 0, False: 6.19k]
  ------------------
 6351|      0|	onig_node_free(*np);
 6352|      0|	onig_node_free(asc_node);
 6353|      0|	*np = node_new_empty();
 6354|      0|	CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6355|      0|	r = node_str_cat_codepoint(*np, env->enc, code);
 6356|      0|	if (r != 0) return r;
  ------------------
  |  Branch (6356:6): [True: 0, False: 0]
  ------------------
 6357|      0|	goto string_loop;
 6358|      0|      }
 6359|  6.19k|      if (IS_IGNORECASE(env->option)) {
  ------------------
  |  |  396|  6.19k|#define IS_IGNORECASE(option)     ((option) & ONIG_OPTION_IGNORECASE)
  |  |  ------------------
  |  |  |  |  454|  6.19k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  ------------------
  |  |  |  Branch (396:35): [True: 0, False: 6.19k]
  |  |  ------------------
  ------------------
 6360|      0|	r = cclass_case_fold(np, cc, NCCLASS(asc_node), env);
  ------------------
  |  |   77|      0|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 6361|      0|	if (r != 0) {
  ------------------
  |  Branch (6361:6): [True: 0, False: 0]
  ------------------
 6362|      0|	  onig_node_free(asc_node);
 6363|      0|	  return r;
 6364|      0|	}
 6365|      0|      }
 6366|  6.19k|      onig_node_free(asc_node);
 6367|  6.19k|    }
 6368|      0|    break;
 6369|       |
 6370|  4.13k|  case TK_ANYCHAR:
  ------------------
  |  Branch (6370:3): [True: 4.13k, False: 44.1k]
  ------------------
 6371|  4.13k|    *np = node_new_anychar();
 6372|  4.13k|    CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|  4.13k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  4.13k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 4.13k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6373|  4.13k|    break;
 6374|       |
 6375|  4.13k|  case TK_ANYCHAR_ANYTIME:
  ------------------
  |  Branch (6375:3): [True: 0, False: 48.3k]
  ------------------
 6376|      0|    *np = node_new_anychar();
 6377|      0|    CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6378|      0|    qn = node_new_quantifier(0, REPEAT_INFINITE, 0);
  ------------------
  |  |  421|      0|#define REPEAT_INFINITE         -1
  ------------------
 6379|      0|    CHECK_NULL_RETURN_MEMERR(qn);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6380|      0|    NQTFR(qn)->target = *np;
  ------------------
  |  |   80|      0|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 6381|      0|    *np = qn;
 6382|      0|    break;
 6383|       |
 6384|      0|  case TK_BACKREF:
  ------------------
  |  Branch (6384:3): [True: 0, False: 48.3k]
  ------------------
 6385|      0|    len = tok->u.backref.num;
 6386|      0|    *np = node_new_backref(len,
 6387|      0|		   (len > 1 ? tok->u.backref.refs : &(tok->u.backref.ref1)),
  ------------------
  |  Branch (6387:7): [True: 0, False: 0]
  ------------------
 6388|      0|			   tok->u.backref.by_name,
 6389|      0|#ifdef USE_BACKREF_WITH_LEVEL
 6390|      0|			   tok->u.backref.exist_level,
 6391|      0|			   tok->u.backref.level,
 6392|      0|#endif
 6393|      0|			   env);
 6394|      0|    CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6395|      0|    break;
 6396|       |
 6397|      0|#ifdef USE_SUBEXP_CALL
 6398|      0|  case TK_CALL:
  ------------------
  |  Branch (6398:3): [True: 0, False: 48.3k]
  ------------------
 6399|      0|    {
 6400|      0|      int gnum = tok->u.call.gnum;
 6401|       |
 6402|      0|      if (gnum < 0 || tok->u.call.rel != 0) {
  ------------------
  |  Branch (6402:11): [True: 0, False: 0]
  |  Branch (6402:23): [True: 0, False: 0]
  ------------------
 6403|      0|	if (gnum > 0) gnum--;
  ------------------
  |  Branch (6403:6): [True: 0, False: 0]
  ------------------
 6404|      0|	gnum = BACKREF_REL_TO_ABS(gnum, env);
  ------------------
  |  |  158|      0|  ((env)->num_mem + 1 + (rel_no))
  ------------------
 6405|      0|	if (gnum <= 0)
  ------------------
  |  Branch (6405:6): [True: 0, False: 0]
  ------------------
 6406|      0|	  return ONIGERR_INVALID_BACKREF;
  ------------------
  |  |  677|      0|#define ONIGERR_INVALID_BACKREF                              -208
  ------------------
 6407|      0|      }
 6408|      0|      *np = node_new_call(tok->u.call.name, tok->u.call.name_end, gnum);
 6409|      0|      CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6410|      0|      env->num_call++;
 6411|      0|    }
 6412|      0|    break;
 6413|      0|#endif
 6414|       |
 6415|  11.9k|  case TK_ANCHOR:
  ------------------
  |  Branch (6415:3): [True: 11.9k, False: 36.3k]
  ------------------
 6416|  11.9k|    *np = onig_node_new_anchor(tok->u.anchor.subtype);
 6417|  11.9k|    CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|  11.9k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  11.9k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 11.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6418|  11.9k|    NANCHOR(*np)->ascii_range = tok->u.anchor.ascii_range;
  ------------------
  |  |   82|  11.9k|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 6419|  11.9k|    break;
 6420|       |
 6421|      0|  case TK_OP_REPEAT:
  ------------------
  |  Branch (6421:3): [True: 0, False: 48.3k]
  ------------------
 6422|      0|  case TK_INTERVAL:
  ------------------
  |  Branch (6422:3): [True: 0, False: 48.3k]
  ------------------
 6423|      0|    if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS)) {
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6424|      0|      if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS))
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6425|      0|	return ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED;
  ------------------
  |  |  657|      0|#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED      -113
  ------------------
 6426|      0|      else
 6427|      0|	*np = node_new_empty();
 6428|      0|    }
 6429|      0|    else {
 6430|      0|      goto tk_byte;
 6431|      0|    }
 6432|      0|    break;
 6433|       |
 6434|      0|  default:
  ------------------
  |  Branch (6434:3): [True: 0, False: 48.3k]
  ------------------
 6435|      0|    return ONIGERR_PARSER_BUG;
  ------------------
  |  |  634|      0|#define ONIGERR_PARSER_BUG                                    -11
  ------------------
 6436|      0|    break;
 6437|  48.3k|  }
 6438|       |
 6439|  30.9k|  {
 6440|  30.9k|    targetp = np;
 6441|       |
 6442|  43.3k|  re_entry:
 6443|  43.3k|    r = fetch_token(tok, src, end, env);
 6444|  43.3k|    if (r < 0) return r;
  ------------------
  |  Branch (6444:9): [True: 0, False: 43.3k]
  ------------------
 6445|       |
 6446|  60.7k|  repeat:
 6447|  60.7k|    if (r == TK_OP_REPEAT || r == TK_INTERVAL) {
  ------------------
  |  Branch (6447:9): [True: 12.3k, False: 48.3k]
  |  Branch (6447:30): [True: 0, False: 48.3k]
  ------------------
 6448|  12.3k|      if (is_invalid_quantifier_target(*targetp))
  ------------------
  |  | 2122|  12.3k|# define is_invalid_quantifier_target(node) 0
  |  |  ------------------
  |  |  |  Branch (2122:45): [Folded - Ignored]
  |  |  ------------------
  ------------------
 6449|      0|	return ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID;
  ------------------
  |  |  658|      0|#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID            -114
  ------------------
 6450|       |
 6451|  12.3k|      parse_depth++;
 6452|  12.3k|      if (parse_depth > ParseDepthLimit)
  ------------------
  |  Branch (6452:11): [True: 0, False: 12.3k]
  ------------------
 6453|      0|	return ONIGERR_PARSE_DEPTH_LIMIT_OVER;
  ------------------
  |  |  639|      0|#define ONIGERR_PARSE_DEPTH_LIMIT_OVER                        -16
  ------------------
 6454|       |
 6455|  12.3k|      qn = node_new_quantifier(tok->u.repeat.lower, tok->u.repeat.upper,
 6456|  12.3k|			       (r == TK_INTERVAL ? 1 : 0));
  ------------------
  |  Branch (6456:12): [True: 0, False: 12.3k]
  ------------------
 6457|  12.3k|      CHECK_NULL_RETURN_MEMERR(qn);
  ------------------
  |  |  314|  12.3k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  12.3k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 12.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 6458|  12.3k|      NQTFR(qn)->greedy = tok->u.repeat.greedy;
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 6459|  12.3k|      r = set_quantifier(qn, *targetp, group, env);
 6460|  12.3k|      if (r < 0) {
  ------------------
  |  Branch (6460:11): [True: 0, False: 12.3k]
  ------------------
 6461|      0|	onig_node_free(qn);
 6462|      0|	return r;
 6463|      0|      }
 6464|       |
 6465|  12.3k|      if (tok->u.repeat.possessive != 0) {
  ------------------
  |  Branch (6465:11): [True: 0, False: 12.3k]
  ------------------
 6466|      0|	Node* en;
 6467|      0|	en = node_new_enclose(ENCLOSE_STOP_BACKTRACK);
  ------------------
  |  |   96|      0|#define ENCLOSE_STOP_BACKTRACK   (1<<2)
  ------------------
 6468|      0|	if (IS_NULL(en)) {
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6469|      0|	  onig_node_free(qn);
 6470|      0|	  return ONIGERR_MEMORY;
  ------------------
  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  ------------------
 6471|      0|	}
 6472|      0|	NENCLOSE(en)->target = qn;
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 6473|      0|	qn = en;
 6474|      0|      }
 6475|       |
 6476|  12.3k|      if (r == 0) {
  ------------------
  |  Branch (6476:11): [True: 12.3k, False: 0]
  ------------------
 6477|  12.3k|	*targetp = qn;
 6478|  12.3k|      }
 6479|      0|      else if (r == 1) {
  ------------------
  |  Branch (6479:16): [True: 0, False: 0]
  ------------------
 6480|      0|	onig_node_free(qn);
 6481|      0|      }
 6482|      0|      else if (r == 2) { /* split case: /abc+/ */
  ------------------
  |  Branch (6482:16): [True: 0, False: 0]
  ------------------
 6483|      0|	Node *tmp;
 6484|       |
 6485|      0|	*targetp = node_new_list(*targetp, NULL);
 6486|      0|	if (IS_NULL(*targetp)) {
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6487|      0|	  onig_node_free(qn);
 6488|      0|	  return ONIGERR_MEMORY;
  ------------------
  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  ------------------
 6489|      0|	}
 6490|      0|	tmp = NCDR(*targetp) = node_new_list(qn, NULL);
  ------------------
  |  |   87|      0|#define NCDR(node)         (NCONS(node)->cdr)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 6491|      0|	if (IS_NULL(tmp)) {
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6492|      0|	  onig_node_free(qn);
 6493|      0|	  return ONIGERR_MEMORY;
  ------------------
  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  ------------------
 6494|      0|	}
 6495|      0|	targetp = &(NCAR(tmp));
  ------------------
  |  |   86|      0|#define NCAR(node)         (NCONS(node)->car)
  |  |  ------------------
  |  |  |  |   83|      0|#define NCONS(node)        (&((node)->u.cons))
  |  |  ------------------
  ------------------
 6496|      0|      }
 6497|  12.3k|      goto re_entry;
 6498|  12.3k|    }
 6499|  60.7k|  }
 6500|       |
 6501|  48.3k|  return r;
 6502|  60.7k|}
regparse.c:node_new_empty:
 1497|    413|{
 1498|    413|  return node_new_str(NULL, NULL);
 1499|    413|}
regparse.c:parse_enclose:
 4965|  4.95k|{
 4966|  4.95k|  int r = 0, num;
 4967|  4.95k|  Node *target, *work1 = NULL, *work2 = NULL;
 4968|  4.95k|  OnigOptionType option;
 4969|  4.95k|  OnigCodePoint c;
 4970|  4.95k|  OnigEncoding enc = env->enc;
 4971|       |
 4972|  4.95k|#ifdef USE_NAMED_GROUP
 4973|  4.95k|  int list_capture;
 4974|  4.95k|#endif
 4975|       |
 4976|  4.95k|  UChar* p = *src;
  ------------------
  |  |   76|  4.95k|# define UChar OnigUChar
  ------------------
 4977|  4.95k|  PFETCH_READY;
  ------------------
  |  |  295|  4.95k|# define PFETCH_READY  UChar* pfetch_prev = NULL; (void)pfetch_prev
  |  |  ------------------
  |  |  |  |   76|  4.95k|# define UChar OnigUChar
  |  |  ------------------
  ------------------
 4978|       |
 4979|  4.95k|  *np = NULL;
 4980|  4.95k|  if (PEND) return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS;
  ------------------
  |  |  299|  4.95k|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 4.95k]
  |  |  |  Branch (299:23): [True: 4.95k, False: 0]
  |  |  ------------------
  ------------------
                if (PEND) return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS;
  ------------------
  |  |  661|      0|#define ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS       -117
  ------------------
 4981|       |
 4982|  4.95k|  option = env->option;
 4983|  4.95k|  if (PPEEK_IS('?') &&
  ------------------
  |  |  320|  9.91k|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|  4.95k|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|  4.95k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 4.95k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 4.54k, False: 413]
  |  |  ------------------
  ------------------
 4984|  4.95k|      IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_GROUP_EFFECT)) {
  ------------------
  |  |  331|  4.54k|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 4.54k, False: 0]
  |  |  ------------------
  ------------------
 4985|  4.54k|    PINC;
  ------------------
  |  |  301|  4.54k|#define PINC       do { \
  |  |  302|  4.54k|  pfetch_prev = p; \
  |  |  303|  4.54k|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|  4.54k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|  4.54k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 4.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|  4.54k|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4986|  4.54k|    if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
  ------------------
  |  |  299|  4.54k|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 4.54k]
  |  |  |  Branch (299:23): [True: 4.54k, False: 0]
  |  |  ------------------
  ------------------
                  if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
  ------------------
  |  |  662|      0|#define ONIGERR_END_PATTERN_IN_GROUP                         -118
  ------------------
 4987|       |
 4988|  4.54k|    PFETCH(c);
  ------------------
  |  |  305|  4.54k|#define PFETCH(c)  do { \
  |  |  306|  4.54k|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|  4.54k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 4.54k]
  |  |  ------------------
  |  |  307|  4.54k|  pfetch_prev = p; \
  |  |  308|  4.54k|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|  4.54k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|  4.54k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 4.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|  4.54k|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4989|  4.54k|    switch (c) {
 4990|  2.47k|    case ':':   /* (?:...) grouping only */
  ------------------
  |  Branch (4990:5): [True: 2.47k, False: 2.06k]
  ------------------
 4991|  2.47k|    group:
 4992|  2.47k|      r = fetch_token(tok, &p, end, env);
 4993|  2.47k|      if (r < 0) return r;
  ------------------
  |  Branch (4993:11): [True: 0, False: 2.47k]
  ------------------
 4994|  2.47k|      r = parse_subexp(np, tok, term, &p, end, env);
 4995|  2.47k|      if (r < 0) return r;
  ------------------
  |  Branch (4995:11): [True: 0, False: 2.47k]
  ------------------
 4996|  2.47k|      *src = p;
 4997|  2.47k|      return 1; /* group */
 4998|      0|      break;
 4999|       |
 5000|      0|    case '=':
  ------------------
  |  Branch (5000:5): [True: 0, False: 4.54k]
  ------------------
 5001|      0|      *np = onig_node_new_anchor(ANCHOR_PREC_READ);
  ------------------
  |  |  551|      0|#define ANCHOR_PREC_READ        (1<<10)
  ------------------
 5002|      0|      break;
 5003|      0|    case '!':   /* preceding read */
  ------------------
  |  Branch (5003:5): [True: 0, False: 4.54k]
  ------------------
 5004|      0|      *np = onig_node_new_anchor(ANCHOR_PREC_READ_NOT);
  ------------------
  |  |  552|      0|#define ANCHOR_PREC_READ_NOT    (1<<11)
  ------------------
 5005|      0|      break;
 5006|      0|    case '>':   /* (?>...) stop backtrack */
  ------------------
  |  Branch (5006:5): [True: 0, False: 4.54k]
  ------------------
 5007|      0|      *np = node_new_enclose(ENCLOSE_STOP_BACKTRACK);
  ------------------
  |  |   96|      0|#define ENCLOSE_STOP_BACKTRACK   (1<<2)
  ------------------
 5008|      0|      break;
 5009|      0|    case '~':   /* (?~...) absent operator */
  ------------------
  |  Branch (5009:5): [True: 0, False: 4.54k]
  ------------------
 5010|      0|      if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_TILDE_ABSENT)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5011|      0|	*np = node_new_enclose(ENCLOSE_ABSENT);
  ------------------
  |  |   98|      0|#define ENCLOSE_ABSENT           (1<<4)
  ------------------
 5012|      0|      }
 5013|      0|      else {
 5014|      0|	return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5015|      0|      }
 5016|      0|      break;
 5017|       |
 5018|      0|#ifdef USE_NAMED_GROUP
 5019|      0|    case '\'':
  ------------------
  |  Branch (5019:5): [True: 0, False: 4.54k]
  ------------------
 5020|      0|      if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5021|      0|	goto named_group1;
 5022|      0|      }
 5023|      0|      else
 5024|      0|	return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5025|      0|      break;
 5026|       |
 5027|      0|# ifdef USE_CAPITAL_P_NAMED_GROUP
 5028|      0|    case 'P':   /* (?P<name>...) */
  ------------------
  |  Branch (5028:5): [True: 0, False: 4.54k]
  ------------------
 5029|      0|      if (!PEND &&
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5029:11): [True: 0, False: 0]
  ------------------
 5030|      0|	  IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_CAPITAL_P_NAMED_GROUP)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5031|      0|	PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5032|      0|	if (c == '<') goto named_group1;
  ------------------
  |  Branch (5032:6): [True: 0, False: 0]
  ------------------
 5033|      0|      }
 5034|      0|      return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5035|      0|      break;
 5036|      0|# endif
 5037|      0|#endif
 5038|       |
 5039|  1.65k|    case '<':   /* look behind (?<=...), (?<!...) */
  ------------------
  |  Branch (5039:5): [True: 1.65k, False: 2.89k]
  ------------------
 5040|  1.65k|      if (PEND) return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS;
  ------------------
  |  |  299|  1.65k|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 1.65k]
  |  |  |  Branch (299:23): [True: 1.65k, False: 0]
  |  |  ------------------
  ------------------
                    if (PEND) return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS;
  ------------------
  |  |  661|      0|#define ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS       -117
  ------------------
 5041|  1.65k|      PFETCH(c);
  ------------------
  |  |  305|  1.65k|#define PFETCH(c)  do { \
  |  |  306|  1.65k|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|  1.65k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 1.65k]
  |  |  ------------------
  |  |  307|  1.65k|  pfetch_prev = p; \
  |  |  308|  1.65k|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|  1.65k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|  1.65k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|  1.65k|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5042|  1.65k|      if (c == '=')
  ------------------
  |  Branch (5042:11): [True: 0, False: 1.65k]
  ------------------
 5043|      0|	*np = onig_node_new_anchor(ANCHOR_LOOK_BEHIND);
  ------------------
  |  |  553|      0|#define ANCHOR_LOOK_BEHIND      (1<<12)
  ------------------
 5044|  1.65k|      else if (c == '!')
  ------------------
  |  Branch (5044:16): [True: 0, False: 1.65k]
  ------------------
 5045|      0|	*np = onig_node_new_anchor(ANCHOR_LOOK_BEHIND_NOT);
  ------------------
  |  |  554|      0|#define ANCHOR_LOOK_BEHIND_NOT  (1<<13)
  ------------------
 5046|  1.65k|#ifdef USE_NAMED_GROUP
 5047|  1.65k|      else {    /* (?<name>...) */
 5048|  1.65k|	if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {
  ------------------
  |  |  331|  1.65k|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 1.65k, False: 0]
  |  |  ------------------
  ------------------
 5049|  1.65k|	  UChar *name;
  ------------------
  |  |   76|  1.65k|# define UChar OnigUChar
  ------------------
 5050|  1.65k|	  UChar *name_end;
  ------------------
  |  |   76|  1.65k|# define UChar OnigUChar
  ------------------
 5051|       |
 5052|  1.65k|	  PUNFETCH;
  ------------------
  |  |  300|  1.65k|#define PUNFETCH     p = pfetch_prev
  ------------------
 5053|  1.65k|	  c = '<';
 5054|       |
 5055|  1.65k|	named_group1:
 5056|  1.65k|	  list_capture = 0;
 5057|       |
 5058|  1.65k|# ifdef USE_CAPTURE_HISTORY
 5059|  1.65k|	named_group2:
 5060|  1.65k|# endif
 5061|  1.65k|	  name = p;
 5062|  1.65k|	  r = fetch_name((OnigCodePoint )c, &p, end, &name_end, env, &num, 0);
 5063|  1.65k|	  if (r < 0) return r;
  ------------------
  |  Branch (5063:8): [True: 0, False: 1.65k]
  ------------------
 5064|       |
 5065|  1.65k|	  num = scan_env_add_mem_entry(env);
 5066|  1.65k|	  if (num < 0) return num;
  ------------------
  |  Branch (5066:8): [True: 0, False: 1.65k]
  ------------------
 5067|  1.65k|	  if (list_capture != 0 && num >= (int )BIT_STATUS_BITS_NUM)
  ------------------
  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  ------------------
  |  Branch (5067:8): [True: 0, False: 1.65k]
  |  Branch (5067:29): [True: 0, False: 0]
  ------------------
 5068|      0|	    return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY;
  ------------------
  |  |  690|      0|#define ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY        -222
  ------------------
 5069|       |
 5070|  1.65k|	  r = name_add(env->reg, name, name_end, num, env);
 5071|  1.65k|	  if (r != 0) return r;
  ------------------
  |  Branch (5071:8): [True: 0, False: 1.65k]
  ------------------
 5072|  1.65k|	  *np = node_new_enclose_memory(env->option, 1);
 5073|  1.65k|	  CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|  1.65k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  1.65k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 5074|  1.65k|	  NENCLOSE(*np)->regnum = num;
  ------------------
  |  |   81|  1.65k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 5075|  1.65k|	  if (list_capture != 0)
  ------------------
  |  Branch (5075:8): [True: 0, False: 1.65k]
  ------------------
 5076|      0|	    BIT_STATUS_ON_AT_SIMPLE(env->capture_history, num);
  ------------------
  |  |  380|      0|#define BIT_STATUS_ON_AT_SIMPLE(stats,n) do {\
  |  |  381|      0|  if ((n) < (int )BIT_STATUS_BITS_NUM)\
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (381:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  382|      0|    (stats) |= (1 << (n));\
  |  |  383|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (383:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5077|  1.65k|	  env->num_named++;
 5078|  1.65k|	}
 5079|      0|	else {
 5080|      0|	  return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5081|      0|	}
 5082|  1.65k|      }
 5083|       |#else
 5084|       |      else {
 5085|       |	return ONIGERR_UNDEFINED_GROUP_OPTION;
 5086|       |      }
 5087|       |#endif
 5088|  1.65k|      break;
 5089|       |
 5090|  1.65k|#ifdef USE_CAPTURE_HISTORY
 5091|  1.65k|    case '@':
  ------------------
  |  Branch (5091:5): [True: 0, False: 4.54k]
  ------------------
 5092|      0|      if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5093|      0|# ifdef USE_NAMED_GROUP
 5094|      0|	if (!PEND &&
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5094:6): [True: 0, False: 0]
  ------------------
 5095|      0|	    IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5096|      0|	  PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5097|      0|	  if (c == '<' || c == '\'') {
  ------------------
  |  Branch (5097:8): [True: 0, False: 0]
  |  Branch (5097:20): [True: 0, False: 0]
  ------------------
 5098|      0|	    list_capture = 1;
 5099|      0|	    goto named_group2; /* (?@<name>...) */
 5100|      0|	  }
 5101|      0|	  PUNFETCH;
  ------------------
  |  |  300|      0|#define PUNFETCH     p = pfetch_prev
  ------------------
 5102|      0|	}
 5103|      0|# endif
 5104|      0|	*np = node_new_enclose_memory(env->option, 0);
 5105|      0|	CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 5106|      0|	num = scan_env_add_mem_entry(env);
 5107|      0|	if (num < 0) return num;
  ------------------
  |  Branch (5107:6): [True: 0, False: 0]
  ------------------
 5108|      0|	if (num >= (int )BIT_STATUS_BITS_NUM)
  ------------------
  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  ------------------
  |  Branch (5108:6): [True: 0, False: 0]
  ------------------
 5109|      0|	  return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY;
  ------------------
  |  |  690|      0|#define ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY        -222
  ------------------
 5110|       |
 5111|      0|	NENCLOSE(*np)->regnum = num;
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 5112|      0|	BIT_STATUS_ON_AT_SIMPLE(env->capture_history, num);
  ------------------
  |  |  380|      0|#define BIT_STATUS_ON_AT_SIMPLE(stats,n) do {\
  |  |  381|      0|  if ((n) < (int )BIT_STATUS_BITS_NUM)\
  |  |  ------------------
  |  |  |  |  367|      0|#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
  |  |  ------------------
  |  |  |  Branch (381:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  382|      0|    (stats) |= (1 << (n));\
  |  |  383|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (383:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5113|      0|      }
 5114|      0|      else {
 5115|      0|	return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5116|      0|      }
 5117|      0|      break;
 5118|      0|#endif /* USE_CAPTURE_HISTORY */
 5119|       |
 5120|      0|    case '(':   /* conditional expression: (?(cond)yes), (?(cond)yes|no) */
  ------------------
  |  Branch (5120:5): [True: 0, False: 4.54k]
  ------------------
 5121|      0|      if (!PEND &&
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5121:11): [True: 0, False: 0]
  ------------------
 5122|      0|	  IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LPAREN_CONDITION)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5123|      0|	UChar *name = NULL;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 5124|      0|	UChar *name_end;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 5125|      0|	PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5126|      0|	if (ONIGENC_IS_CODE_DIGIT(enc, c)) {     /* (n) */
  ------------------
  |  |  400|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5127|      0|	  PUNFETCH;
  ------------------
  |  |  300|      0|#define PUNFETCH     p = pfetch_prev
  ------------------
 5128|      0|	  r = fetch_name((OnigCodePoint )'(', &p, end, &name_end, env, &num, 1);
 5129|      0|	  if (r < 0) return r;
  ------------------
  |  Branch (5129:8): [True: 0, False: 0]
  ------------------
 5130|       |#if 0
 5131|       |	  /* Relative number is not currently supported. (same as Perl) */
 5132|       |	  if (num < 0) {
 5133|       |	    num = BACKREF_REL_TO_ABS(num, env);
 5134|       |	    if (num <= 0)
 5135|       |	      return ONIGERR_INVALID_BACKREF;
 5136|       |	  }
 5137|       |#endif
 5138|      0|	  if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_STRICT_CHECK_BACKREF)) {
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5139|      0|	    if (num > env->num_mem ||
  ------------------
  |  Branch (5139:10): [True: 0, False: 0]
  ------------------
 5140|      0|		IS_NULL(SCANENV_MEM_NODES(env)[num]))
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  Branch (311:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5141|      0|	    return ONIGERR_INVALID_BACKREF;
  ------------------
  |  |  677|      0|#define ONIGERR_INVALID_BACKREF                              -208
  ------------------
 5142|      0|	  }
 5143|      0|	}
 5144|      0|#ifdef USE_NAMED_GROUP
 5145|      0|	else if (c == '<' || c == '\'') {    /* (<name>), ('name') */
  ------------------
  |  Branch (5145:11): [True: 0, False: 0]
  |  Branch (5145:23): [True: 0, False: 0]
  ------------------
 5146|      0|	  name = p;
 5147|      0|	  r = fetch_named_backref_token(c, tok, &p, end, env);
 5148|      0|	  if (r < 0) return r;
  ------------------
  |  Branch (5148:8): [True: 0, False: 0]
  ------------------
 5149|      0|	  if (!PPEEK_IS(')')) return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
              	  if (!PPEEK_IS(')')) return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
  |  Branch (5149:8): [True: 0, False: 0]
  ------------------
 5150|      0|	  PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5151|       |
 5152|      0|	  if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_USE_LEFT_MOST_NAMED_GROUP)) {
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5153|      0|	    num = tok->u.backref.ref1;
 5154|      0|	  }
 5155|      0|	  else {
 5156|       |	    /* FIXME:
 5157|       |	     * Use left most named group for now. This is the same as Perl.
 5158|       |	     * However this should use the same strategy as normal back-
 5159|       |	     * references on Ruby syntax; search right to left. */
 5160|      0|	    int len = tok->u.backref.num;
 5161|      0|	    num = len > 1 ? tok->u.backref.refs[0] : tok->u.backref.ref1;
  ------------------
  |  Branch (5161:12): [True: 0, False: 0]
  ------------------
 5162|      0|	  }
 5163|      0|	}
 5164|      0|#endif
 5165|      0|	else
 5166|      0|	  return ONIGERR_INVALID_CONDITION_PATTERN;
  ------------------
  |  |  667|      0|#define ONIGERR_INVALID_CONDITION_PATTERN                    -124
  ------------------
 5167|      0|	*np = node_new_enclose(ENCLOSE_CONDITION);
  ------------------
  |  |   97|      0|#define ENCLOSE_CONDITION        (1<<3)
  ------------------
 5168|      0|	CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 5169|      0|	NENCLOSE(*np)->regnum = num;
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 5170|      0|	if (IS_NOT_NULL(name)) NENCLOSE(*np)->state |= NST_NAME_REF;
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	if (IS_NOT_NULL(name)) NENCLOSE(*np)->state |= NST_NAME_REF;
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
              	if (IS_NOT_NULL(name)) NENCLOSE(*np)->state |= NST_NAME_REF;
  ------------------
  |  |  139|      0|#define NST_NAME_REF              (1<<11)
  ------------------
 5171|      0|      }
 5172|      0|      else
 5173|      0|	return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5174|      0|      break;
 5175|       |
 5176|       |#if 0
 5177|       |    case '|':   /* branch reset: (?|...) */
 5178|       |      if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_VBAR_BRANCH_RESET)) {
 5179|       |	/* TODO */
 5180|       |      }
 5181|       |      else
 5182|       |	return ONIGERR_UNDEFINED_GROUP_OPTION;
 5183|       |      break;
 5184|       |#endif
 5185|       |
 5186|      0|    case '^':   /* loads default options */
  ------------------
  |  Branch (5186:5): [True: 0, False: 4.54k]
  ------------------
 5187|      0|      if (!PEND && IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if (!PEND && IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5187:11): [True: 0, False: 0]
  ------------------
 5188|       |	/* d-imsx */
 5189|      0|	ONOFF(option, ONIG_OPTION_ASCII_RANGE, 1);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5190|      0|	ONOFF(option, ONIG_OPTION_IGNORECASE, 1);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5191|      0|	ONOFF(option, ONIG_OPTION_SINGLELINE, 0);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5192|      0|	ONOFF(option, ONIG_OPTION_MULTILINE,  1);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5193|      0|	ONOFF(option, ONIG_OPTION_EXTEND, 1);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5194|      0|	PFETCH(c);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5195|      0|      }
 5196|       |#if 0
 5197|       |      else if (!PEND && IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_RUBY)) {
 5198|       |	/* d-imx */
 5199|       |	ONOFF(option, ONIG_OPTION_ASCII_RANGE, 0);
 5200|       |	ONOFF(option, ONIG_OPTION_POSIX_BRACKET_ALL_RANGE, 0);
 5201|       |	ONOFF(option, ONIG_OPTION_WORD_BOUND_ALL_RANGE, 0);
 5202|       |	ONOFF(option, ONIG_OPTION_IGNORECASE, 1);
 5203|       |	ONOFF(option, ONIG_OPTION_MULTILINE,  1);
 5204|       |	ONOFF(option, ONIG_OPTION_EXTEND, 1);
 5205|       |	PFETCH(c);
 5206|       |      }
 5207|       |#endif
 5208|      0|      else {
 5209|      0|	return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5210|      0|      }
 5211|       |      /* fall through */
 5212|       |#ifdef USE_POSIXLINE_OPTION
 5213|       |    case 'p':
 5214|       |#endif
 5215|    413|    case '-': case 'i': case 'm': case 's': case 'x':
  ------------------
  |  Branch (5215:5): [True: 0, False: 4.54k]
  |  Branch (5215:15): [True: 0, False: 4.54k]
  |  Branch (5215:25): [True: 0, False: 4.54k]
  |  Branch (5215:35): [True: 0, False: 4.54k]
  |  Branch (5215:45): [True: 413, False: 4.13k]
  ------------------
 5216|    413|    case 'a': case 'd': case 'l': case 'u':
  ------------------
  |  Branch (5216:5): [True: 0, False: 4.54k]
  |  Branch (5216:15): [True: 0, False: 4.54k]
  |  Branch (5216:25): [True: 0, False: 4.54k]
  |  Branch (5216:35): [True: 0, False: 4.54k]
  ------------------
 5217|    413|      {
 5218|    413|	int neg = 0;
 5219|       |
 5220|    826|	while (1) {
  ------------------
  |  Branch (5220:9): [Folded - Ignored]
  ------------------
 5221|    826|	  switch (c) {
 5222|    413|	  case ':':
  ------------------
  |  Branch (5222:4): [True: 413, False: 413]
  ------------------
 5223|    413|	  case ')':
  ------------------
  |  Branch (5223:4): [True: 0, False: 826]
  ------------------
 5224|    413|	  break;
 5225|       |
 5226|      0|	  case '-':  neg = 1; break;
  ------------------
  |  Branch (5226:4): [True: 0, False: 826]
  ------------------
 5227|    413|	  case 'x':  ONOFF(option, ONIG_OPTION_EXTEND,     neg); break;
  ------------------
  |  |  160|    413|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [True: 0, False: 413]
  |  |  ------------------
  ------------------
  |  Branch (5227:4): [True: 413, False: 413]
  ------------------
 5228|      0|	  case 'i':  ONOFF(option, ONIG_OPTION_IGNORECASE, neg); break;
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5228:4): [True: 0, False: 826]
  ------------------
 5229|      0|	  case 's':
  ------------------
  |  Branch (5229:4): [True: 0, False: 826]
  ------------------
 5230|      0|	    if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5231|      0|	      ONOFF(option, ONIG_OPTION_MULTILINE,  neg);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5232|      0|	    }
 5233|      0|	    else
 5234|      0|	      return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5235|      0|	    break;
 5236|       |
 5237|      0|	  case 'm':
  ------------------
  |  Branch (5237:4): [True: 0, False: 826]
  ------------------
 5238|      0|	    if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5239|      0|	      ONOFF(option, ONIG_OPTION_SINGLELINE, (neg == 0 ? 1 : 0));
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [True: 0, False: 0]
  |  |  |  Branch (160:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5240|      0|	    }
 5241|      0|	    else if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_RUBY)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5242|      0|	      ONOFF(option, ONIG_OPTION_MULTILINE,  neg);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5243|      0|	    }
 5244|      0|	    else
 5245|      0|	      return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5246|      0|	    break;
 5247|       |#ifdef USE_POSIXLINE_OPTION
 5248|       |	  case 'p':
 5249|       |	    ONOFF(option, ONIG_OPTION_MULTILINE|ONIG_OPTION_SINGLELINE, neg);
 5250|       |	    break;
 5251|       |#endif
 5252|       |
 5253|      0|	  case 'a':     /* limits \d, \s, \w and POSIX brackets to ASCII range */
  ------------------
  |  Branch (5253:4): [True: 0, False: 826]
  ------------------
 5254|      0|	    if ((IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL) ||
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5255|      0|		 IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_RUBY)) &&
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5256|      0|		(neg == 0)) {
  ------------------
  |  Branch (5256:3): [True: 0, False: 0]
  ------------------
 5257|      0|	      ONOFF(option, ONIG_OPTION_ASCII_RANGE, 0);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5258|      0|	      ONOFF(option, ONIG_OPTION_POSIX_BRACKET_ALL_RANGE, 1);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5259|      0|	      ONOFF(option, ONIG_OPTION_WORD_BOUND_ALL_RANGE, 1);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5260|      0|	    }
 5261|      0|	    else
 5262|      0|	      return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5263|      0|	    break;
 5264|       |
 5265|      0|	  case 'u':
  ------------------
  |  Branch (5265:4): [True: 0, False: 826]
  ------------------
 5266|      0|	    if ((IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL) ||
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5267|      0|		 IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_RUBY)) &&
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5268|      0|		(neg == 0)) {
  ------------------
  |  Branch (5268:3): [True: 0, False: 0]
  ------------------
 5269|      0|	      ONOFF(option, ONIG_OPTION_ASCII_RANGE, 1);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5270|      0|	      ONOFF(option, ONIG_OPTION_POSIX_BRACKET_ALL_RANGE, 1);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5271|      0|	      ONOFF(option, ONIG_OPTION_WORD_BOUND_ALL_RANGE, 1);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5272|      0|	    }
 5273|      0|	    else
 5274|      0|	      return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5275|      0|	    break;
 5276|       |
 5277|      0|	  case 'd':
  ------------------
  |  Branch (5277:4): [True: 0, False: 826]
  ------------------
 5278|      0|	    if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL) &&
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5279|      0|		(neg == 0)) {
  ------------------
  |  Branch (5279:3): [True: 0, False: 0]
  ------------------
 5280|      0|	      ONOFF(option, ONIG_OPTION_ASCII_RANGE, 1);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5281|      0|	    }
 5282|      0|	    else if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_RUBY) &&
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5283|      0|		(neg == 0)) {
  ------------------
  |  Branch (5283:3): [True: 0, False: 0]
  ------------------
 5284|      0|	      ONOFF(option, ONIG_OPTION_ASCII_RANGE, 0);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5285|      0|	      ONOFF(option, ONIG_OPTION_POSIX_BRACKET_ALL_RANGE, 0);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5286|      0|	      ONOFF(option, ONIG_OPTION_WORD_BOUND_ALL_RANGE, 0);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5287|      0|	    }
 5288|      0|	    else
 5289|      0|	      return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5290|      0|	    break;
 5291|       |
 5292|      0|	  case 'l':
  ------------------
  |  Branch (5292:4): [True: 0, False: 826]
  ------------------
 5293|      0|	    if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL) && (neg == 0)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5293:66): [True: 0, False: 0]
  ------------------
 5294|      0|	      ONOFF(option, ONIG_OPTION_ASCII_RANGE, 1);
  ------------------
  |  |  160|      0|#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))
  |  |  ------------------
  |  |  |  Branch (160:32): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5295|      0|	    }
 5296|      0|	    else
 5297|      0|	      return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5298|      0|	    break;
 5299|       |
 5300|      0|	  default:
  ------------------
  |  Branch (5300:4): [True: 0, False: 826]
  ------------------
 5301|      0|	    return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5302|    826|	  }
 5303|       |
 5304|    826|	  if (c == ')') {
  ------------------
  |  Branch (5304:8): [True: 0, False: 826]
  ------------------
 5305|      0|	    *np = node_new_option(option);
 5306|      0|	    CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 5307|      0|	    *src = p;
 5308|      0|	    return 2; /* option only */
 5309|      0|	  }
 5310|    826|	  else if (c == ':') {
  ------------------
  |  Branch (5310:13): [True: 413, False: 413]
  ------------------
 5311|    413|	    OnigOptionType prev = env->option;
 5312|       |
 5313|    413|	    env->option = option;
 5314|    413|	    r = fetch_token(tok, &p, end, env);
 5315|    413|	    if (r < 0) {
  ------------------
  |  Branch (5315:10): [True: 0, False: 413]
  ------------------
 5316|      0|	      env->option = prev;
 5317|      0|	      return r;
 5318|      0|	    }
 5319|    413|	    r = parse_subexp(&target, tok, term, &p, end, env);
 5320|    413|	    env->option = prev;
 5321|    413|	    if (r < 0) return r;
  ------------------
  |  Branch (5321:10): [True: 0, False: 413]
  ------------------
 5322|    413|	    *np = node_new_option(option);
 5323|    413|	    CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|    413|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|    413|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 413]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 5324|    413|	    NENCLOSE(*np)->target = target;
  ------------------
  |  |   81|    413|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 5325|    413|	    *src = p;
 5326|    413|	    return 0;
 5327|    413|	  }
 5328|       |
 5329|    413|	  if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
  ------------------
  |  |  299|    413|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 413]
  |  |  |  Branch (299:23): [True: 413, False: 0]
  |  |  ------------------
  ------------------
              	  if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
  ------------------
  |  |  662|      0|#define ONIGERR_END_PATTERN_IN_GROUP                         -118
  ------------------
 5330|    413|	  PFETCH(c);
  ------------------
  |  |  305|    413|#define PFETCH(c)  do { \
  |  |  306|    413|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|    413|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 413]
  |  |  ------------------
  |  |  307|    413|  pfetch_prev = p; \
  |  |  308|    413|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|    413|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|    413|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 413]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|    413|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5331|    413|	}
 5332|    413|      }
 5333|      0|      break;
 5334|       |
 5335|      0|    default:
  ------------------
  |  Branch (5335:5): [True: 0, False: 4.54k]
  ------------------
 5336|      0|      return ONIGERR_UNDEFINED_GROUP_OPTION;
  ------------------
  |  |  663|      0|#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
  ------------------
 5337|  4.54k|    }
 5338|  4.54k|  }
 5339|    413|  else {
 5340|    413|    if (ONIG_IS_OPTION_ON(env->option, ONIG_OPTION_DONT_CAPTURE_GROUP))
  ------------------
  |  |  479|    413|#define ONIG_IS_OPTION_ON(options,option)   ((options) & (option))
  |  |  ------------------
  |  |  |  Branch (479:45): [True: 0, False: 413]
  |  |  ------------------
  ------------------
 5341|      0|      goto group;
 5342|       |
 5343|    413|    *np = node_new_enclose_memory(env->option, 0);
 5344|    413|    CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|    413|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|    413|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 413]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 5345|    413|    num = scan_env_add_mem_entry(env);
 5346|    413|    if (num < 0) return num;
  ------------------
  |  Branch (5346:9): [True: 0, False: 413]
  ------------------
 5347|    413|    NENCLOSE(*np)->regnum = num;
  ------------------
  |  |   81|    413|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 5348|    413|  }
 5349|       |
 5350|  2.06k|  CHECK_NULL_RETURN_MEMERR(*np);
  ------------------
  |  |  314|  2.06k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  2.06k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 5351|  2.06k|  r = fetch_token(tok, &p, end, env);
 5352|  2.06k|  if (r < 0) return r;
  ------------------
  |  Branch (5352:7): [True: 0, False: 2.06k]
  ------------------
 5353|  2.06k|  r = parse_subexp(&target, tok, term, &p, end, env);
 5354|  2.06k|  if (r < 0) {
  ------------------
  |  Branch (5354:7): [True: 0, False: 2.06k]
  ------------------
 5355|      0|    onig_node_free(target);
 5356|      0|    return r;
 5357|      0|  }
 5358|       |
 5359|  2.06k|  if (NTYPE(*np) == NT_ANCHOR)
  ------------------
  |  |   69|  2.06k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
                if (NTYPE(*np) == NT_ANCHOR)
  ------------------
  |  |   45|  2.06k|#define NT_ANCHOR      7
  ------------------
  |  Branch (5359:7): [True: 0, False: 2.06k]
  ------------------
 5360|      0|    NANCHOR(*np)->target = target;
  ------------------
  |  |   82|      0|#define NANCHOR(node)      (&((node)->u.anchor))
  ------------------
 5361|  2.06k|  else {
 5362|  2.06k|    NENCLOSE(*np)->target = target;
  ------------------
  |  |   81|  2.06k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 5363|  2.06k|    if (NENCLOSE(*np)->type == ENCLOSE_MEMORY) {
  ------------------
  |  |   81|  2.06k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
                  if (NENCLOSE(*np)->type == ENCLOSE_MEMORY) {
  ------------------
  |  |   94|  2.06k|#define ENCLOSE_MEMORY           (1<<0)
  ------------------
  |  Branch (5363:9): [True: 2.06k, False: 0]
  ------------------
 5364|       |      /* Don't move this to previous of parse_subexp() */
 5365|  2.06k|      r = scan_env_set_mem_node(env, NENCLOSE(*np)->regnum, *np);
  ------------------
  |  |   81|  2.06k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 5366|  2.06k|      if (r != 0) return r;
  ------------------
  |  Branch (5366:11): [True: 0, False: 2.06k]
  ------------------
 5367|  2.06k|    }
 5368|      0|    else if (NENCLOSE(*np)->type == ENCLOSE_CONDITION) {
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
                  else if (NENCLOSE(*np)->type == ENCLOSE_CONDITION) {
  ------------------
  |  |   97|      0|#define ENCLOSE_CONDITION        (1<<3)
  ------------------
  |  Branch (5368:14): [True: 0, False: 0]
  ------------------
 5369|      0|      if (NTYPE(target) != NT_ALT) {
  ------------------
  |  |   69|      0|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
                    if (NTYPE(target) != NT_ALT) {
  ------------------
  |  |   47|      0|#define NT_ALT         9
  ------------------
  |  Branch (5369:11): [True: 0, False: 0]
  ------------------
 5370|       |	/* convert (?(cond)yes) to (?(cond)yes|empty) */
 5371|      0|	work1 = node_new_empty();
 5372|      0|	if (IS_NULL(work1)) goto err;
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5373|      0|	work2 = onig_node_new_alt(work1, NULL_NODE);
  ------------------
  |  |  283|      0|#define NULL_NODE  ((Node* )0)
  ------------------
 5374|      0|	if (IS_NULL(work2)) goto err;
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5375|      0|	work1 = onig_node_new_alt(target, work2);
 5376|      0|	if (IS_NULL(work1)) goto err;
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5377|      0|	NENCLOSE(*np)->target = work1;
  ------------------
  |  |   81|      0|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 5378|      0|      }
 5379|      0|    }
 5380|  2.06k|  }
 5381|       |
 5382|  2.06k|  *src = p;
 5383|  2.06k|  return 0;
 5384|       |
 5385|      0| err:
 5386|      0|  onig_node_free(work1);
 5387|      0|  onig_node_free(work2);
 5388|      0|  onig_node_free(*np);
 5389|      0|  *np = NULL;
 5390|      0|  return ONIGERR_MEMORY;
  ------------------
  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  ------------------
 5391|  2.06k|}
regparse.c:scan_env_add_mem_entry:
 1016|  2.06k|{
 1017|  2.06k|  int i, need, alloc;
 1018|  2.06k|  Node** p;
 1019|       |
 1020|  2.06k|  need = env->num_mem + 1;
 1021|  2.06k|  if (need > ONIG_MAX_CAPTURE_GROUP_NUM)
  ------------------
  |  |  441|  2.06k|#define ONIG_MAX_CAPTURE_GROUP_NUM         32767
  ------------------
  |  Branch (1021:7): [True: 0, False: 2.06k]
  ------------------
 1022|      0|    return ONIGERR_TOO_MANY_CAPTURE_GROUPS;
  ------------------
  |  |  679|      0|#define ONIGERR_TOO_MANY_CAPTURE_GROUPS                      -210
  ------------------
 1023|  2.06k|  if (need >= SCANENV_MEMNODES_SIZE) {
  ------------------
  |  |  285|  2.06k|#define SCANENV_MEMNODES_SIZE               8
  ------------------
  |  Branch (1023:7): [True: 0, False: 2.06k]
  ------------------
 1024|      0|    if (env->mem_alloc <= need) {
  ------------------
  |  Branch (1024:9): [True: 0, False: 0]
  ------------------
 1025|      0|      if (IS_NULL(env->mem_nodes_dynamic)) {
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1026|      0|	alloc = INIT_SCANENV_MEMNODES_ALLOC_SIZE;
  ------------------
  |  |  980|      0|#define INIT_SCANENV_MEMNODES_ALLOC_SIZE   16
  ------------------
 1027|      0|	p = (Node** )xmalloc(sizeof(Node*) * alloc);
  ------------------
  |  |  142|      0|# define xmalloc     malloc
  ------------------
 1028|      0|	CHECK_NULL_RETURN_MEMERR(p);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 1029|      0|	xmemcpy(p, env->mem_nodes_static,
  ------------------
  |  |  215|      0|#define xmemcpy     memcpy
  ------------------
 1030|      0|		sizeof(Node*) * SCANENV_MEMNODES_SIZE);
  ------------------
  |  |  285|      0|#define SCANENV_MEMNODES_SIZE               8
  ------------------
 1031|      0|      }
 1032|      0|      else {
 1033|      0|	alloc = env->mem_alloc * 2;
 1034|      0|	p = (Node** )xrealloc(env->mem_nodes_dynamic, sizeof(Node*) * alloc);
  ------------------
  |  |  143|      0|# define xrealloc    realloc
  ------------------
 1035|      0|	CHECK_NULL_RETURN_MEMERR(p);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 1036|      0|      }
 1037|       |
 1038|      0|      for (i = env->num_mem + 1; i < alloc; i++)
  ------------------
  |  Branch (1038:34): [True: 0, False: 0]
  ------------------
 1039|      0|	p[i] = NULL_NODE;
  ------------------
  |  |  283|      0|#define NULL_NODE  ((Node* )0)
  ------------------
 1040|       |
 1041|      0|      env->mem_nodes_dynamic = p;
 1042|      0|      env->mem_alloc = alloc;
 1043|      0|    }
 1044|      0|  }
 1045|       |
 1046|  2.06k|  env->num_mem++;
 1047|  2.06k|  return env->num_mem;
 1048|  2.06k|}
regparse.c:name_add:
  773|  1.65k|{
  774|  1.65k|  int alloc;
  775|  1.65k|  NameEntry* e;
  776|  1.65k|  NameTable* t = (NameTable* )reg->name_table;
  777|       |
  778|  1.65k|  if (name_end - name <= 0)
  ------------------
  |  Branch (778:7): [True: 0, False: 1.65k]
  ------------------
  779|      0|    return ONIGERR_EMPTY_GROUP_NAME;
  ------------------
  |  |  682|      0|#define ONIGERR_EMPTY_GROUP_NAME                             -214
  ------------------
  780|       |
  781|  1.65k|  e = name_find(reg, name, name_end);
  782|  1.65k|  if (IS_NULL(e)) {
  ------------------
  |  |  311|  1.65k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 1.65k, False: 0]
  |  |  ------------------
  ------------------
  783|  1.65k|# ifdef USE_ST_LIBRARY
  784|  1.65k|    if (IS_NULL(t)) {
  ------------------
  |  |  311|  1.65k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 413, False: 1.23k]
  |  |  ------------------
  ------------------
  785|    413|      t = onig_st_init_strend_table_with_size(5);
  786|    413|      reg->name_table = (void* )t;
  787|    413|    }
  788|  1.65k|    e = (NameEntry* )xmalloc(sizeof(NameEntry));
  ------------------
  |  |  142|  1.65k|# define xmalloc     malloc
  ------------------
  789|  1.65k|    CHECK_NULL_RETURN_MEMERR(e);
  ------------------
  |  |  314|  1.65k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  1.65k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
  790|       |
  791|  1.65k|    e->name = strdup_with_null(reg->enc, name, name_end);
  792|  1.65k|    if (IS_NULL(e->name)) {
  ------------------
  |  |  311|  1.65k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
  793|      0|      xfree(e);
  ------------------
  |  |  145|      0|# define xfree       free
  ------------------
  794|      0|      return ONIGERR_MEMORY;
  ------------------
  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  ------------------
  795|      0|    }
  796|  1.65k|    onig_st_insert_strend(t, e->name, (e->name + (name_end - name)),
  797|  1.65k|                          (HashDataType )e);
  798|       |
  799|  1.65k|    e->name_len   = name_end - name;
  800|  1.65k|    e->back_num   = 0;
  801|  1.65k|    e->back_alloc = 0;
  802|  1.65k|    e->back_refs  = (int* )NULL;
  803|       |
  804|       |# else
  805|       |
  806|       |    if (IS_NULL(t)) {
  807|       |      alloc = INIT_NAMES_ALLOC_NUM;
  808|       |      t = (NameTable* )xmalloc(sizeof(NameTable));
  809|       |      CHECK_NULL_RETURN_MEMERR(t);
  810|       |      t->e     = NULL;
  811|       |      t->alloc = 0;
  812|       |      t->num   = 0;
  813|       |
  814|       |      t->e = (NameEntry* )xmalloc(sizeof(NameEntry) * alloc);
  815|       |      if (IS_NULL(t->e)) {
  816|       |	xfree(t);
  817|       |	return ONIGERR_MEMORY;
  818|       |      }
  819|       |      t->alloc = alloc;
  820|       |      reg->name_table = t;
  821|       |      goto clear;
  822|       |    }
  823|       |    else if (t->num == t->alloc) {
  824|       |      int i;
  825|       |      NameEntry* p;
  826|       |
  827|       |      alloc = t->alloc * 2;
  828|       |      p = (NameEntry* )xrealloc(t->e, sizeof(NameEntry) * alloc);
  829|       |      CHECK_NULL_RETURN_MEMERR(p);
  830|       |      t->e = p;
  831|       |      t->alloc = alloc;
  832|       |
  833|       |    clear:
  834|       |      for (i = t->num; i < t->alloc; i++) {
  835|       |	t->e[i].name       = NULL;
  836|       |	t->e[i].name_len   = 0;
  837|       |	t->e[i].back_num   = 0;
  838|       |	t->e[i].back_alloc = 0;
  839|       |	t->e[i].back_refs  = (int* )NULL;
  840|       |      }
  841|       |    }
  842|       |    e = &(t->e[t->num]);
  843|       |    t->num++;
  844|       |    e->name = strdup_with_null(reg->enc, name, name_end);
  845|       |    if (IS_NULL(e->name)) return ONIGERR_MEMORY;
  846|       |    e->name_len = name_end - name;
  847|       |# endif
  848|  1.65k|  }
  849|       |
  850|  1.65k|  if (e->back_num >= 1 &&
  ------------------
  |  Branch (850:7): [True: 0, False: 1.65k]
  ------------------
  851|  1.65k|      ! IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME)) {
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  ------------------
  |  Branch (851:7): [True: 0, False: 0]
  ------------------
  852|      0|    onig_scan_env_set_error_string(env, ONIGERR_MULTIPLEX_DEFINED_NAME,
  ------------------
  |  |  687|      0|#define ONIGERR_MULTIPLEX_DEFINED_NAME                       -219
  ------------------
  853|      0|				    name, name_end);
  854|      0|    return ONIGERR_MULTIPLEX_DEFINED_NAME;
  ------------------
  |  |  687|      0|#define ONIGERR_MULTIPLEX_DEFINED_NAME                       -219
  ------------------
  855|      0|  }
  856|       |
  857|  1.65k|  e->back_num++;
  858|  1.65k|  if (e->back_num == 1) {
  ------------------
  |  Branch (858:7): [True: 1.65k, False: 0]
  ------------------
  859|  1.65k|    e->back_ref1 = backref;
  860|  1.65k|  }
  861|      0|  else {
  862|      0|    if (e->back_num == 2) {
  ------------------
  |  Branch (862:9): [True: 0, False: 0]
  ------------------
  863|      0|      alloc = INIT_NAME_BACKREFS_ALLOC_NUM;
  ------------------
  |  |  451|      0|# define INIT_NAME_BACKREFS_ALLOC_NUM   8
  ------------------
  864|      0|      e->back_refs = (int* )xmalloc(sizeof(int) * alloc);
  ------------------
  |  |  142|      0|# define xmalloc     malloc
  ------------------
  865|      0|      CHECK_NULL_RETURN_MEMERR(e->back_refs);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
  866|      0|      e->back_alloc = alloc;
  867|      0|      e->back_refs[0] = e->back_ref1;
  868|      0|      e->back_refs[1] = backref;
  869|      0|    }
  870|      0|    else {
  871|      0|      if (e->back_num > e->back_alloc) {
  ------------------
  |  Branch (871:11): [True: 0, False: 0]
  ------------------
  872|      0|	int* p;
  873|      0|	alloc = e->back_alloc * 2;
  874|      0|	p = (int* )xrealloc(e->back_refs, sizeof(int) * alloc);
  ------------------
  |  |  143|      0|# define xrealloc    realloc
  ------------------
  875|      0|	CHECK_NULL_RETURN_MEMERR(p);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
  876|      0|	e->back_refs = p;
  877|      0|	e->back_alloc = alloc;
  878|      0|      }
  879|      0|      e->back_refs[e->back_num - 1] = backref;
  880|      0|    }
  881|      0|  }
  882|       |
  883|  1.65k|  return 0;
  884|  1.65k|}
regparse.c:strdup_with_null:
  271|  1.65k|{
  272|  1.65k|  ptrdiff_t slen;
  273|  1.65k|  int term_len, i;
  274|  1.65k|  UChar *r;
  ------------------
  |  |   76|  1.65k|# define UChar OnigUChar
  ------------------
  275|       |
  276|  1.65k|  slen = end - s;
  277|  1.65k|  term_len = ONIGENC_MBC_MINLEN(enc);
  ------------------
  |  |  367|  1.65k|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  ------------------
  278|       |
  279|  1.65k|  r = (UChar* )xmalloc(slen + term_len);
  ------------------
  |  |  142|  1.65k|# define xmalloc     malloc
  ------------------
  280|  1.65k|  CHECK_NULL_RETURN(r);
  ------------------
  |  |  313|  1.65k|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|  1.65k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  281|  1.65k|  xmemcpy(r, s, slen);
  ------------------
  |  |  215|  1.65k|#define xmemcpy     memcpy
  ------------------
  282|       |
  283|  3.30k|  for (i = 0; i < term_len; i++)
  ------------------
  |  Branch (283:15): [True: 1.65k, False: 1.65k]
  ------------------
  284|  1.65k|    r[slen + i] = (UChar )0;
  285|       |
  286|  1.65k|  return r;
  287|  1.65k|}
regparse.c:node_new_option:
 1368|    413|{
 1369|    413|  Node* node = node_new_enclose(ENCLOSE_OPTION);
  ------------------
  |  |   95|    413|#define ENCLOSE_OPTION           (1<<1)
  ------------------
 1370|    413|  CHECK_NULL_RETURN(node);
  ------------------
  |  |  313|    413|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|    413|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 413]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1371|    413|  NENCLOSE(node)->option = option;
  ------------------
  |  |   81|    413|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 1372|    413|  return node;
 1373|    413|}
regparse.c:add_code_range_to_buf0:
 1672|   133k|{
 1673|   133k|  int r, inc_n, pos;
 1674|   133k|  OnigCodePoint low, high, bound, x;
 1675|   133k|  OnigCodePoint n, *data;
 1676|   133k|  BBuf* bbuf;
 1677|       |
 1678|   133k|  if (from > to) {
  ------------------
  |  Branch (1678:7): [True: 0, False: 133k]
  ------------------
 1679|      0|    n = from; from = to; to = n;
 1680|      0|  }
 1681|       |
 1682|   133k|  if (IS_NULL(*pbuf)) {
  ------------------
  |  |  311|   133k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 5.36k, False: 128k]
  |  |  ------------------
  ------------------
 1683|  5.36k|    r = new_code_range(pbuf);
 1684|  5.36k|    if (r) return r;
  ------------------
  |  Branch (1684:9): [True: 0, False: 5.36k]
  ------------------
 1685|  5.36k|    bbuf = *pbuf;
 1686|  5.36k|    n = 0;
 1687|  5.36k|  }
 1688|   128k|  else {
 1689|   128k|    bbuf = *pbuf;
 1690|   128k|    GET_CODE_POINT(n, bbuf->p);
  ------------------
  |  |  710|   128k|#define GET_CODE_POINT(code,p)   code = *((OnigCodePoint* )(p))
  ------------------
 1691|   128k|  }
 1692|   133k|  data = (OnigCodePoint* )(bbuf->p);
 1693|   133k|  data++;
 1694|       |
 1695|   133k|  bound = (from == 0) ? 0 : n;
  ------------------
  |  Branch (1695:11): [True: 0, False: 133k]
  ------------------
 1696|   608k|  for (low = 0; low < bound; ) {
  ------------------
  |  Branch (1696:17): [True: 474k, False: 133k]
  ------------------
 1697|   474k|    x = (low + bound) >> 1;
 1698|   474k|    if (from - 1 > data[x*2 + 1])
  ------------------
  |  Branch (1698:9): [True: 474k, False: 0]
  ------------------
 1699|   474k|      low = x + 1;
 1700|      0|    else
 1701|      0|      bound = x;
 1702|   474k|  }
 1703|       |
 1704|   133k|  high = (to == ONIG_LAST_CODE_POINT) ? n : low;
  ------------------
  |  |  317|   133k|#define ONIG_LAST_CODE_POINT    (~((OnigCodePoint )0))
  ------------------
  |  Branch (1704:10): [True: 0, False: 133k]
  ------------------
 1705|   133k|  for (bound = n; high < bound; ) {
  ------------------
  |  Branch (1705:19): [True: 0, False: 133k]
  ------------------
 1706|      0|    x = (high + bound) >> 1;
 1707|      0|    if (to + 1 >= data[x*2])
  ------------------
  |  Branch (1707:9): [True: 0, False: 0]
  ------------------
 1708|      0|      high = x + 1;
 1709|      0|    else
 1710|      0|      bound = x;
 1711|      0|  }
 1712|       |  /* data[(low-1)*2+1] << from <= data[low*2]
 1713|       |   * data[(high-1)*2+1] <= to << data[high*2]
 1714|       |   */
 1715|       |
 1716|   133k|  inc_n = low + 1 - high;
 1717|   133k|  if (n + inc_n > ONIG_MAX_MULTI_BYTE_RANGES_NUM)
  ------------------
  |  |  444|   133k|#define ONIG_MAX_MULTI_BYTE_RANGES_NUM     10000
  ------------------
  |  Branch (1717:7): [True: 0, False: 133k]
  ------------------
 1718|      0|    return ONIGERR_TOO_MANY_MULTI_BYTE_RANGES;
  ------------------
  |  |  674|      0|#define ONIGERR_TOO_MANY_MULTI_BYTE_RANGES                   -205
  ------------------
 1719|       |
 1720|   133k|  if (inc_n != 1) {
  ------------------
  |  Branch (1720:7): [True: 0, False: 133k]
  ------------------
 1721|      0|    if (checkdup && from <= data[low*2+1]
  ------------------
  |  Branch (1721:9): [True: 0, False: 0]
  |  Branch (1721:21): [True: 0, False: 0]
  ------------------
 1722|      0|	&& (data[low*2] <= from || data[low*2+1] <= to))
  ------------------
  |  Branch (1722:6): [True: 0, False: 0]
  |  Branch (1722:29): [True: 0, False: 0]
  ------------------
 1723|      0|      CC_DUP_WARN(env, from, to);
 1724|      0|    if (from > data[low*2])
  ------------------
  |  Branch (1724:9): [True: 0, False: 0]
  ------------------
 1725|      0|      from = data[low*2];
 1726|      0|    if (to < data[(high - 1)*2 + 1])
  ------------------
  |  Branch (1726:9): [True: 0, False: 0]
  ------------------
 1727|      0|      to = data[(high - 1)*2 + 1];
 1728|      0|  }
 1729|       |
 1730|   133k|  if (inc_n != 0) {
  ------------------
  |  Branch (1730:7): [True: 133k, False: 0]
  ------------------
 1731|   133k|    int from_pos = SIZE_CODE_POINT * (1 + high * 2);
  ------------------
  |  |  696|   133k|#define SIZE_CODE_POINT       (int )sizeof(OnigCodePoint)
  ------------------
 1732|   133k|    int to_pos   = SIZE_CODE_POINT * (1 + (low + 1) * 2);
  ------------------
  |  |  696|   133k|#define SIZE_CODE_POINT       (int )sizeof(OnigCodePoint)
  ------------------
 1733|       |
 1734|   133k|    if (inc_n > 0) {
  ------------------
  |  Branch (1734:9): [True: 133k, False: 0]
  ------------------
 1735|   133k|      if (high < n) {
  ------------------
  |  Branch (1735:11): [True: 0, False: 133k]
  ------------------
 1736|      0|	int size = (n - high) * 2 * SIZE_CODE_POINT;
  ------------------
  |  |  696|      0|#define SIZE_CODE_POINT       (int )sizeof(OnigCodePoint)
  ------------------
 1737|      0|	BBUF_MOVE_RIGHT(bbuf, from_pos, to_pos, size);
  ------------------
  |  |  510|      0|#define BBUF_MOVE_RIGHT(buf,from,to,n) do {\
  |  |  511|      0|  if ((unsigned int )((to)+(n)) > (buf)->alloc) BBUF_EXPAND((buf),(to) + (n));\
  |  |  ------------------
  |  |  |  |  470|      0|#define BBUF_EXPAND(buf,low) do{\
  |  |  |  |  471|      0|  UChar *tmp;\
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|      0|# define UChar OnigUChar
  |  |  |  |  ------------------
  |  |  |  |  472|      0|  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  473|      0|  tmp = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  143|      0|# define xrealloc    realloc
  |  |  |  |  ------------------
  |  |  |  |  474|      0|  if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                 if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  |  |  ------------------
  |  |  |  |  475|      0|  (buf)->p = tmp;\
  |  |  |  |  476|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (511:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  512|      0|  xmemmove((buf)->p + (to), (buf)->p + (from), (n));\
  |  |  ------------------
  |  |  |  |  216|      0|#define xmemmove    memmove
  |  |  ------------------
  |  |  513|      0|  if ((unsigned int )((to)+(n)) > (buf)->used) (buf)->used = (to) + (n);\
  |  |  ------------------
  |  |  |  Branch (513:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  514|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (514:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1738|      0|      }
 1739|   133k|    }
 1740|      0|    else {
 1741|      0|      BBUF_MOVE_LEFT_REDUCE(bbuf, from_pos, to_pos);
  ------------------
  |  |  522|      0|#define BBUF_MOVE_LEFT_REDUCE(buf,from,to) do {\
  |  |  523|      0|  xmemmove((buf)->p + (to), (buf)->p + (from), (buf)->used - (from));\
  |  |  ------------------
  |  |  |  |  216|      0|#define xmemmove    memmove
  |  |  ------------------
  |  |  524|      0|  (buf)->used -= (from - to);\
  |  |  525|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (525:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1742|      0|    }
 1743|   133k|  }
 1744|       |
 1745|   133k|  pos = SIZE_CODE_POINT * (1 + low * 2);
  ------------------
  |  |  696|   133k|#define SIZE_CODE_POINT       (int )sizeof(OnigCodePoint)
  ------------------
 1746|   133k|  BBUF_ENSURE_SIZE(bbuf, pos + SIZE_CODE_POINT * 2);
  ------------------
  |  |  478|   133k|#define BBUF_ENSURE_SIZE(buf,size) do{\
  |  |  479|   133k|  unsigned int new_alloc = (buf)->alloc;\
  |  |  480|   149k|  while (new_alloc < (unsigned int )(size)) { new_alloc *= 2; }\
  |  |  ------------------
  |  |  |  Branch (480:10): [True: 15.6k, False: 133k]
  |  |  ------------------
  |  |  481|   133k|  if ((buf)->alloc != new_alloc) {\
  |  |  ------------------
  |  |  |  Branch (481:7): [True: 15.6k, False: 118k]
  |  |  ------------------
  |  |  482|  15.6k|    UChar *tmp;\
  |  |  ------------------
  |  |  |  |   76|  15.6k|# define UChar OnigUChar
  |  |  ------------------
  |  |  483|  15.6k|    tmp = (UChar* )xrealloc((buf)->p, new_alloc);\
  |  |  ------------------
  |  |  |  |  143|  15.6k|# define xrealloc    realloc
  |  |  ------------------
  |  |  484|  15.6k|    if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  ------------------
  |  |  |  |  311|  15.6k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 15.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  |  |  485|  15.6k|    (buf)->p = tmp;\
  |  |  486|  15.6k|    (buf)->alloc = new_alloc;\
  |  |  487|  15.6k|  }\
  |  |  488|   133k|} while (0)
  |  |  ------------------
  |  |  |  Branch (488:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1747|   133k|  BBUF_WRITE_CODE_POINT(bbuf, pos, from);
  ------------------
  |  | 1645|   133k|    BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT)
  |  |  ------------------
  |  |  |  |  490|   133k|#define BBUF_WRITE(buf,pos,bytes,n) do{\
  |  |  |  |  491|   133k|  int used = (pos) + (int )(n);\
  |  |  |  |  492|   133k|  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  470|      0|#define BBUF_EXPAND(buf,low) do{\
  |  |  |  |  |  |  471|      0|  UChar *tmp;\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   76|      0|# define UChar OnigUChar
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (472:36): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  473|      0|  tmp = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|# define xrealloc    realloc
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  474|      0|  if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  475|      0|  (buf)->p = tmp;\
  |  |  |  |  |  |  476|      0|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (476:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (492:7): [True: 0, False: 133k]
  |  |  |  |  ------------------
  |  |  |  |  493|   133k|  xmemcpy((buf)->p + (pos), (bytes), (n));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  215|   133k|#define xmemcpy     memcpy
  |  |  |  |  ------------------
  |  |  |  |  494|   133k|  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (494:7): [True: 133k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  495|   133k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (495:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1748|   133k|  BBUF_WRITE_CODE_POINT(bbuf, pos + SIZE_CODE_POINT, to);
  ------------------
  |  | 1645|   133k|    BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT)
  |  |  ------------------
  |  |  |  |  490|   133k|#define BBUF_WRITE(buf,pos,bytes,n) do{\
  |  |  |  |  491|   133k|  int used = (pos) + (int )(n);\
  |  |  |  |  492|   133k|  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  470|      0|#define BBUF_EXPAND(buf,low) do{\
  |  |  |  |  |  |  471|      0|  UChar *tmp;\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   76|      0|# define UChar OnigUChar
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (472:36): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  473|      0|  tmp = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|# define xrealloc    realloc
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  474|      0|  if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  475|      0|  (buf)->p = tmp;\
  |  |  |  |  |  |  476|      0|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (476:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (492:7): [True: 0, False: 133k]
  |  |  |  |  ------------------
  |  |  |  |  493|   133k|  xmemcpy((buf)->p + (pos), (bytes), (n));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  215|   133k|#define xmemcpy     memcpy
  |  |  |  |  ------------------
  |  |  |  |  494|   133k|  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (494:7): [True: 133k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  495|   133k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (495:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1749|   133k|  n += inc_n;
 1750|   133k|  BBUF_WRITE_CODE_POINT(bbuf, 0, n);
  ------------------
  |  | 1645|   133k|    BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT)
  |  |  ------------------
  |  |  |  |  490|   133k|#define BBUF_WRITE(buf,pos,bytes,n) do{\
  |  |  |  |  491|   133k|  int used = (pos) + (int )(n);\
  |  |  |  |  492|   133k|  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  470|      0|#define BBUF_EXPAND(buf,low) do{\
  |  |  |  |  |  |  471|      0|  UChar *tmp;\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   76|      0|# define UChar OnigUChar
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (472:36): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  473|      0|  tmp = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|# define xrealloc    realloc
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  474|      0|  if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  475|      0|  (buf)->p = tmp;\
  |  |  |  |  |  |  476|      0|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (476:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (492:7): [True: 0, False: 133k]
  |  |  |  |  ------------------
  |  |  |  |  493|   133k|  xmemcpy((buf)->p + (pos), (bytes), (n));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  215|   133k|#define xmemcpy     memcpy
  |  |  |  |  ------------------
  |  |  |  |  494|   133k|  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (494:7): [True: 0, False: 133k]
  |  |  |  |  ------------------
  |  |  |  |  495|   133k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (495:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1751|       |
 1752|   133k|  return 0;
 1753|   133k|}
regparse.c:new_code_range:
 1653|  5.36k|{
 1654|  5.36k|#define INIT_MULTI_BYTE_RANGE_SIZE  (SIZE_CODE_POINT * 5)
 1655|  5.36k|  int r;
 1656|  5.36k|  OnigCodePoint n;
 1657|  5.36k|  BBuf* bbuf;
 1658|       |
 1659|  5.36k|  bbuf = *pbuf = (BBuf* )xmalloc(sizeof(BBuf));
  ------------------
  |  |  142|  5.36k|# define xmalloc     malloc
  ------------------
 1660|  5.36k|  CHECK_NULL_RETURN_MEMERR(*pbuf);
  ------------------
  |  |  314|  5.36k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  5.36k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 5.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 1661|  5.36k|  r = BBUF_INIT(*pbuf, INIT_MULTI_BYTE_RANGE_SIZE);
  ------------------
  |  |  460|  5.36k|#define BBUF_INIT(buf,size)    onig_bbuf_init((BBuf* )(buf), (size))
  ------------------
 1662|  5.36k|  if (r) return r;
  ------------------
  |  Branch (1662:7): [True: 0, False: 5.36k]
  ------------------
 1663|       |
 1664|  5.36k|  n = 0;
 1665|  5.36k|  BBUF_WRITE_CODE_POINT(bbuf, 0, n);
  ------------------
  |  | 1645|  5.36k|    BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT)
  |  |  ------------------
  |  |  |  |  490|  5.36k|#define BBUF_WRITE(buf,pos,bytes,n) do{\
  |  |  |  |  491|  5.36k|  int used = (pos) + (int )(n);\
  |  |  |  |  492|  5.36k|  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  470|      0|#define BBUF_EXPAND(buf,low) do{\
  |  |  |  |  |  |  471|      0|  UChar *tmp;\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   76|      0|# define UChar OnigUChar
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (472:36): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  473|      0|  tmp = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|# define xrealloc    realloc
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  474|      0|  if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  475|      0|  (buf)->p = tmp;\
  |  |  |  |  |  |  476|      0|} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (476:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (492:7): [True: 0, False: 5.36k]
  |  |  |  |  ------------------
  |  |  |  |  493|  5.36k|  xmemcpy((buf)->p + (pos), (bytes), (n));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  215|  5.36k|#define xmemcpy     memcpy
  |  |  |  |  ------------------
  |  |  |  |  494|  5.36k|  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (494:7): [True: 5.36k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  495|  5.36k|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (495:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|  5.36k|  return 0;
 1667|  5.36k|}
regparse.c:bitset_set_range:
  193|  5.36k|{
  194|  5.36k|  int i;
  195|   692k|  for (i = from; i <= to && i < SINGLE_BYTE_SIZE; i++) {
  ------------------
  |  |  426|   687k|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|   687k|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (195:18): [True: 687k, False: 5.36k]
  |  Branch (195:29): [True: 687k, False: 0]
  ------------------
  196|   687k|    BITSET_SET_BIT_CHKDUP(bs, i);
  ------------------
  |  |  176|   687k|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|   687k|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|   687k|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|   687k|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|   687k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|   687k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|   687k|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|   687k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|   687k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 687k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|   687k|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|   687k|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|   687k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|   687k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|   687k|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|   687k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|   687k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|   687k|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  197|   687k|  }
  198|  5.36k|}
regparse.c:add_code_range_to_buf:
 1757|   133k|{
 1758|   133k|  return add_code_range_to_buf0(pbuf, env, from, to, 1);
 1759|   133k|}
regparse.c:node_new_cclass:
 1141|  9.91k|{
 1142|  9.91k|  Node* node = node_new();
 1143|  9.91k|  CHECK_NULL_RETURN(node);
  ------------------
  |  |  313|  9.91k|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|  9.91k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 9.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1144|       |
 1145|  9.91k|  SET_NTYPE(node, NT_CCLASS);
  ------------------
  |  |   71|  9.91k|    do { \
  |  |   72|  9.91k|	int value = ntype; \
  |  |   73|  9.91k|	memcpy(&((node)->u.base.type), &value, sizeof(int)); \
  |  |   74|  9.91k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (74:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1146|  9.91k|  initialize_cclass(NCCLASS(node));
  ------------------
  |  |   77|  9.91k|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 1147|  9.91k|  return node;
 1148|  9.91k|}
regparse.c:initialize_cclass:
 1132|  20.6k|{
 1133|  20.6k|  BITSET_CLEAR(cc->bs);
  ------------------
  |  |  440|  20.6k|#define BITSET_CLEAR(bs) do {\
  |  |  441|  20.6k|  int i;\
  |  |  442|   185k|  for (i = 0; i < BITSET_SIZE; i++) { (bs)[i] = 0; }	\
  |  |  ------------------
  |  |  |  |  428|   185k|#define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|   185k|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|   185k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|   185k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|   185k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (442:15): [True: 165k, False: 20.6k]
  |  |  ------------------
  |  |  443|  20.6k|} while (0)
  |  |  ------------------
  |  |  |  Branch (443:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1134|       |  /* cc->base.flags = 0; */
 1135|  20.6k|  cc->flags = 0;
 1136|  20.6k|  cc->mbuf  = NULL;
 1137|  20.6k|}
regparse.c:add_ctype_to_cc:
 4138|  5.36k|{
 4139|  5.36k|  int maxcode;
 4140|  5.36k|  int c, r;
 4141|  5.36k|  const OnigCodePoint *ranges;
 4142|  5.36k|  OnigCodePoint sb_out;
 4143|  5.36k|  OnigEncoding enc = env->enc;
 4144|       |
 4145|  5.36k|  r = ONIGENC_GET_CTYPE_CODE_RANGE(enc, ctype, &sb_out, &ranges);
  ------------------
  |  |  407|  5.36k|        (enc)->get_ctype_code_range(ctype,sbout,ranges,enc)
  ------------------
 4146|  5.36k|  if (r == 0) {
  ------------------
  |  Branch (4146:7): [True: 5.36k, False: 0]
  ------------------
 4147|  5.36k|    if (ascii_range) {
  ------------------
  |  Branch (4147:9): [True: 5.36k, False: 0]
  ------------------
 4148|  5.36k|      CClassNode ccwork;
 4149|  5.36k|      initialize_cclass(&ccwork);
 4150|  5.36k|      r = add_ctype_to_cc_by_range(&ccwork, ctype, not, env, sb_out,
 4151|  5.36k|				   ranges);
 4152|  5.36k|      if (r == 0) {
  ------------------
  |  Branch (4152:11): [True: 5.36k, False: 0]
  ------------------
 4153|  5.36k|	if (not) {
  ------------------
  |  Branch (4153:6): [True: 0, False: 5.36k]
  ------------------
 4154|      0|	  r = add_code_range_to_buf0(&(ccwork.mbuf), env, 0x80, ONIG_LAST_CODE_POINT, FALSE);
  ------------------
  |  |  317|      0|#define ONIG_LAST_CODE_POINT    (~((OnigCodePoint )0))
  ------------------
              	  r = add_code_range_to_buf0(&(ccwork.mbuf), env, 0x80, ONIG_LAST_CODE_POINT, FALSE);
  ------------------
  |  |   77|      0|# define FALSE   0
  ------------------
 4155|      0|	}
 4156|  5.36k|	else {
 4157|  5.36k|	  CClassNode ccascii;
 4158|  5.36k|	  initialize_cclass(&ccascii);
 4159|  5.36k|	  if (ONIGENC_MBC_MINLEN(env->enc) > 1) {
  ------------------
  |  |  367|  5.36k|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  ------------------
  |  Branch (4159:8): [True: 0, False: 5.36k]
  ------------------
 4160|      0|	    r = add_code_range(&(ccascii.mbuf), env, 0x00, 0x7F);
 4161|      0|	  }
 4162|  5.36k|	  else {
 4163|  5.36k|	    bitset_set_range(env, ccascii.bs, 0x00, 0x7F);
 4164|  5.36k|	    r = 0;
 4165|  5.36k|	  }
 4166|  5.36k|	  if (r == 0) {
  ------------------
  |  Branch (4166:8): [True: 5.36k, False: 0]
  ------------------
 4167|  5.36k|	    r = and_cclass(&ccwork, &ccascii, env);
 4168|  5.36k|	  }
 4169|  5.36k|	  if (IS_NOT_NULL(ccascii.mbuf)) bbuf_free(ccascii.mbuf);
  ------------------
  |  |  312|  5.36k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 5.36k]
  |  |  ------------------
  ------------------
 4170|  5.36k|	}
 4171|  5.36k|	if (r == 0) {
  ------------------
  |  Branch (4171:6): [True: 5.36k, False: 0]
  ------------------
 4172|  5.36k|	  r = or_cclass(cc, &ccwork, env);
 4173|  5.36k|	}
 4174|  5.36k|	if (IS_NOT_NULL(ccwork.mbuf)) bbuf_free(ccwork.mbuf);
  ------------------
  |  |  312|  5.36k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 5.36k]
  |  |  ------------------
  ------------------
 4175|  5.36k|      }
 4176|  5.36k|    }
 4177|      0|    else {
 4178|      0|      r = add_ctype_to_cc_by_range(cc, ctype, not, env, sb_out, ranges);
 4179|      0|    }
 4180|  5.36k|    return r;
 4181|  5.36k|  }
 4182|      0|  else if (r != ONIG_NO_SUPPORT_CONFIG) {
  ------------------
  |  |  629|      0|#define ONIG_NO_SUPPORT_CONFIG                                -2
  ------------------
  |  Branch (4182:12): [True: 0, False: 0]
  ------------------
 4183|      0|    return r;
 4184|      0|  }
 4185|       |
 4186|      0|  maxcode = ascii_range ? 0x80 : SINGLE_BYTE_SIZE;
  ------------------
  |  |  426|      0|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (4186:13): [True: 0, False: 0]
  ------------------
 4187|      0|  r = 0;
 4188|      0|  switch (ctype) {
 4189|      0|  case ONIGENC_CTYPE_ALPHA:
  ------------------
  |  |  295|      0|#define ONIGENC_CTYPE_ALPHA     1
  ------------------
  |  Branch (4189:3): [True: 0, False: 0]
  ------------------
 4190|      0|  case ONIGENC_CTYPE_BLANK:
  ------------------
  |  |  296|      0|#define ONIGENC_CTYPE_BLANK     2
  ------------------
  |  Branch (4190:3): [True: 0, False: 0]
  ------------------
 4191|      0|  case ONIGENC_CTYPE_CNTRL:
  ------------------
  |  |  297|      0|#define ONIGENC_CTYPE_CNTRL     3
  ------------------
  |  Branch (4191:3): [True: 0, False: 0]
  ------------------
 4192|      0|  case ONIGENC_CTYPE_DIGIT:
  ------------------
  |  |  298|      0|#define ONIGENC_CTYPE_DIGIT     4
  ------------------
  |  Branch (4192:3): [True: 0, False: 0]
  ------------------
 4193|      0|  case ONIGENC_CTYPE_LOWER:
  ------------------
  |  |  300|      0|#define ONIGENC_CTYPE_LOWER     6
  ------------------
  |  Branch (4193:3): [True: 0, False: 0]
  ------------------
 4194|      0|  case ONIGENC_CTYPE_PUNCT:
  ------------------
  |  |  302|      0|#define ONIGENC_CTYPE_PUNCT     8
  ------------------
  |  Branch (4194:3): [True: 0, False: 0]
  ------------------
 4195|      0|  case ONIGENC_CTYPE_SPACE:
  ------------------
  |  |  303|      0|#define ONIGENC_CTYPE_SPACE     9
  ------------------
  |  Branch (4195:3): [True: 0, False: 0]
  ------------------
 4196|      0|  case ONIGENC_CTYPE_UPPER:
  ------------------
  |  |  304|      0|#define ONIGENC_CTYPE_UPPER    10
  ------------------
  |  Branch (4196:3): [True: 0, False: 0]
  ------------------
 4197|      0|  case ONIGENC_CTYPE_XDIGIT:
  ------------------
  |  |  305|      0|#define ONIGENC_CTYPE_XDIGIT   11
  ------------------
  |  Branch (4197:3): [True: 0, False: 0]
  ------------------
 4198|      0|  case ONIGENC_CTYPE_ASCII:
  ------------------
  |  |  308|      0|#define ONIGENC_CTYPE_ASCII    14
  ------------------
  |  Branch (4198:3): [True: 0, False: 0]
  ------------------
 4199|      0|  case ONIGENC_CTYPE_ALNUM:
  ------------------
  |  |  307|      0|#define ONIGENC_CTYPE_ALNUM    13  /* alpha || digit */
  ------------------
  |  Branch (4199:3): [True: 0, False: 0]
  ------------------
 4200|      0|    if (not != 0) {
  ------------------
  |  Branch (4200:9): [True: 0, False: 0]
  ------------------
 4201|      0|      for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
  ------------------
  |  |  426|      0|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (4201:19): [True: 0, False: 0]
  ------------------
 4202|      0|	if (! ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
  ------------------
  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  ------------------
  |  Branch (4202:6): [True: 0, False: 0]
  ------------------
 4203|      0|	  BITSET_SET_BIT_CHKDUP(cc->bs, c);
  ------------------
  |  |  176|      0|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|      0|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|      0|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4204|      0|      }
 4205|      0|      ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf);
  ------------------
  |  |  168|      0|#define ADD_ALL_MULTI_BYTE_RANGE(enc, mbuf) do {\
  |  |  169|      0|  if (! ONIGENC_IS_SINGLEBYTE(enc)) {\
  |  |  ------------------
  |  |  |  |  318|      0|#define ONIGENC_IS_SINGLEBYTE(enc)     (ONIGENC_MBC_MAXLEN(enc) == 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  365|      0|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (169:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  170|      0|    r = SET_ALL_MULTI_BYTE_RANGE(enc, &(mbuf));\
  |  |  ------------------
  |  |  |  |  166|      0|  add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  163|      0|  (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:20): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                 add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  317|      0|#define ONIG_LAST_CODE_POINT    (~((OnigCodePoint )0))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    if (r) return r;\
  |  |  ------------------
  |  |  |  Branch (171:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  172|      0|  }\
  |  |  173|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (173:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4206|      0|    }
 4207|      0|    else {
 4208|      0|      for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
  ------------------
  |  |  426|      0|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (4208:19): [True: 0, False: 0]
  ------------------
 4209|      0|	if (ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
  ------------------
  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  ------------------
  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4210|      0|	  BITSET_SET_BIT_CHKDUP(cc->bs, c);
  ------------------
  |  |  176|      0|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|      0|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|      0|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4211|      0|      }
 4212|      0|    }
 4213|      0|    break;
 4214|       |
 4215|      0|  case ONIGENC_CTYPE_GRAPH:
  ------------------
  |  |  299|      0|#define ONIGENC_CTYPE_GRAPH     5
  ------------------
  |  Branch (4215:3): [True: 0, False: 0]
  ------------------
 4216|      0|  case ONIGENC_CTYPE_PRINT:
  ------------------
  |  |  301|      0|#define ONIGENC_CTYPE_PRINT     7
  ------------------
  |  Branch (4216:3): [True: 0, False: 0]
  ------------------
 4217|      0|    if (not != 0) {
  ------------------
  |  Branch (4217:9): [True: 0, False: 0]
  ------------------
 4218|      0|      for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
  ------------------
  |  |  426|      0|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (4218:19): [True: 0, False: 0]
  ------------------
 4219|      0|	if (! ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype)
  ------------------
  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  ------------------
  |  Branch (4219:6): [True: 0, False: 0]
  ------------------
 4220|      0|	    || c >= maxcode)
  ------------------
  |  Branch (4220:9): [True: 0, False: 0]
  ------------------
 4221|      0|	  BITSET_SET_BIT_CHKDUP(cc->bs, c);
  ------------------
  |  |  176|      0|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|      0|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|      0|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4222|      0|      }
 4223|      0|      if (ascii_range)
  ------------------
  |  Branch (4223:11): [True: 0, False: 0]
  ------------------
 4224|      0|	ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf);
  ------------------
  |  |  168|      0|#define ADD_ALL_MULTI_BYTE_RANGE(enc, mbuf) do {\
  |  |  169|      0|  if (! ONIGENC_IS_SINGLEBYTE(enc)) {\
  |  |  ------------------
  |  |  |  |  318|      0|#define ONIGENC_IS_SINGLEBYTE(enc)     (ONIGENC_MBC_MAXLEN(enc) == 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  365|      0|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (169:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  170|      0|    r = SET_ALL_MULTI_BYTE_RANGE(enc, &(mbuf));\
  |  |  ------------------
  |  |  |  |  166|      0|  add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  163|      0|  (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:20): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                 add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  317|      0|#define ONIG_LAST_CODE_POINT    (~((OnigCodePoint )0))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    if (r) return r;\
  |  |  ------------------
  |  |  |  Branch (171:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  172|      0|  }\
  |  |  173|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (173:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4225|      0|    }
 4226|      0|    else {
 4227|      0|      for (c = 0; c < maxcode; c++) {
  ------------------
  |  Branch (4227:19): [True: 0, False: 0]
  ------------------
 4228|      0|	if (ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
  ------------------
  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  ------------------
  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4229|      0|	  BITSET_SET_BIT_CHKDUP(cc->bs, c);
  ------------------
  |  |  176|      0|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|      0|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|      0|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4230|      0|      }
 4231|      0|      if (! ascii_range)
  ------------------
  |  Branch (4231:11): [True: 0, False: 0]
  ------------------
 4232|      0|	ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf);
  ------------------
  |  |  168|      0|#define ADD_ALL_MULTI_BYTE_RANGE(enc, mbuf) do {\
  |  |  169|      0|  if (! ONIGENC_IS_SINGLEBYTE(enc)) {\
  |  |  ------------------
  |  |  |  |  318|      0|#define ONIGENC_IS_SINGLEBYTE(enc)     (ONIGENC_MBC_MAXLEN(enc) == 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  365|      0|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (169:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  170|      0|    r = SET_ALL_MULTI_BYTE_RANGE(enc, &(mbuf));\
  |  |  ------------------
  |  |  |  |  166|      0|  add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  163|      0|  (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:20): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                 add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  317|      0|#define ONIG_LAST_CODE_POINT    (~((OnigCodePoint )0))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    if (r) return r;\
  |  |  ------------------
  |  |  |  Branch (171:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  172|      0|  }\
  |  |  173|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (173:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4233|      0|    }
 4234|      0|    break;
 4235|       |
 4236|      0|  case ONIGENC_CTYPE_WORD:
  ------------------
  |  |  306|      0|#define ONIGENC_CTYPE_WORD     12
  ------------------
  |  Branch (4236:3): [True: 0, False: 0]
  ------------------
 4237|      0|    if (not == 0) {
  ------------------
  |  Branch (4237:9): [True: 0, False: 0]
  ------------------
 4238|      0|      for (c = 0; c < maxcode; c++) {
  ------------------
  |  Branch (4238:19): [True: 0, False: 0]
  ------------------
 4239|      0|	if (ONIGENC_IS_CODE_WORD(enc, c)) BITSET_SET_BIT_CHKDUP(cc->bs, c);
  ------------------
  |  |  404|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
              	if (ONIGENC_IS_CODE_WORD(enc, c)) BITSET_SET_BIT_CHKDUP(cc->bs, c);
  ------------------
  |  |  176|      0|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|      0|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|      0|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4240|      0|      }
 4241|      0|      if (! ascii_range)
  ------------------
  |  Branch (4241:11): [True: 0, False: 0]
  ------------------
 4242|      0|	ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf);
  ------------------
  |  |  168|      0|#define ADD_ALL_MULTI_BYTE_RANGE(enc, mbuf) do {\
  |  |  169|      0|  if (! ONIGENC_IS_SINGLEBYTE(enc)) {\
  |  |  ------------------
  |  |  |  |  318|      0|#define ONIGENC_IS_SINGLEBYTE(enc)     (ONIGENC_MBC_MAXLEN(enc) == 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  365|      0|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (169:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  170|      0|    r = SET_ALL_MULTI_BYTE_RANGE(enc, &(mbuf));\
  |  |  ------------------
  |  |  |  |  166|      0|  add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  163|      0|  (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:20): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                 add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  317|      0|#define ONIG_LAST_CODE_POINT    (~((OnigCodePoint )0))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    if (r) return r;\
  |  |  ------------------
  |  |  |  Branch (171:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  172|      0|  }\
  |  |  173|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (173:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4243|      0|    }
 4244|      0|    else {
 4245|      0|      for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
  ------------------
  |  |  426|      0|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (4245:19): [True: 0, False: 0]
  ------------------
 4246|      0|	if ((ONIGENC_CODE_TO_MBCLEN(enc, c) > 0) /* check invalid code point */
  ------------------
  |  |  370|      0|#define ONIGENC_CODE_TO_MBCLEN(enc,code)       (enc)->code_to_mbclen(code,enc)
  ------------------
  |  Branch (4246:6): [True: 0, False: 0]
  ------------------
 4247|      0|	    && (! ONIGENC_IS_CODE_WORD(enc, c) || c >= maxcode))
  ------------------
  |  |  404|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  ------------------
  ------------------
  |  Branch (4247:10): [True: 0, False: 0]
  |  Branch (4247:44): [True: 0, False: 0]
  ------------------
 4248|      0|	  BITSET_SET_BIT_CHKDUP(cc->bs, c);
  ------------------
  |  |  176|      0|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|      0|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|      0|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4249|      0|      }
 4250|      0|      if (ascii_range)
  ------------------
  |  Branch (4250:11): [True: 0, False: 0]
  ------------------
 4251|      0|	ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf);
  ------------------
  |  |  168|      0|#define ADD_ALL_MULTI_BYTE_RANGE(enc, mbuf) do {\
  |  |  169|      0|  if (! ONIGENC_IS_SINGLEBYTE(enc)) {\
  |  |  ------------------
  |  |  |  |  318|      0|#define ONIGENC_IS_SINGLEBYTE(enc)     (ONIGENC_MBC_MAXLEN(enc) == 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  365|      0|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (169:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  170|      0|    r = SET_ALL_MULTI_BYTE_RANGE(enc, &(mbuf));\
  |  |  ------------------
  |  |  |  |  166|      0|  add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  163|      0|  (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:20): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                 add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  317|      0|#define ONIG_LAST_CODE_POINT    (~((OnigCodePoint )0))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    if (r) return r;\
  |  |  ------------------
  |  |  |  Branch (171:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  172|      0|  }\
  |  |  173|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (173:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4252|      0|    }
 4253|      0|    break;
 4254|       |
 4255|      0|  default:
  ------------------
  |  Branch (4255:3): [True: 0, False: 0]
  ------------------
 4256|      0|    return ONIGERR_PARSER_BUG;
  ------------------
  |  |  634|      0|#define ONIGERR_PARSER_BUG                                    -11
  ------------------
 4257|      0|    break;
 4258|      0|  }
 4259|       |
 4260|      0|  return r;
 4261|      0|}
regparse.c:add_ctype_to_cc_by_range:
 4067|  5.36k|{
 4068|  5.36k|  int i, r;
 4069|  5.36k|  OnigCodePoint j;
 4070|       |
 4071|  5.36k|  int n = ONIGENC_CODE_RANGE_NUM(mbr);
  ------------------
  |  |  139|  5.36k|#define ONIGENC_CODE_RANGE_NUM(range)     ((int )range[0])
  ------------------
 4072|       |
 4073|  5.36k|  if (not == 0) {
  ------------------
  |  Branch (4073:7): [True: 5.36k, False: 0]
  ------------------
 4074|  14.4k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (4074:17): [True: 14.4k, False: 0]
  ------------------
 4075|  14.4k|      for (j = ONIGENC_CODE_RANGE_FROM(mbr, i);
  ------------------
  |  |  140|  14.4k|#define ONIGENC_CODE_RANGE_FROM(range,i)  range[((i)*2) + 1]
  ------------------
 4076|  53.2k|	  j <= ONIGENC_CODE_RANGE_TO(mbr, i); j++) {
  ------------------
  |  |  141|  53.2k|#define ONIGENC_CODE_RANGE_TO(range,i)    range[((i)*2) + 2]
  ------------------
  |  Branch (4076:4): [True: 44.1k, False: 9.08k]
  ------------------
 4077|  44.1k|	if (j >= sb_out) {
  ------------------
  |  Branch (4077:6): [True: 5.36k, False: 38.8k]
  ------------------
 4078|  5.36k|	  if (j > ONIGENC_CODE_RANGE_FROM(mbr, i)) {
  ------------------
  |  |  140|  5.36k|#define ONIGENC_CODE_RANGE_FROM(range,i)  range[((i)*2) + 1]
  ------------------
  |  Branch (4078:8): [True: 0, False: 5.36k]
  ------------------
 4079|      0|	    r = add_code_range_to_buf(&(cc->mbuf), env, j,
 4080|      0|				      ONIGENC_CODE_RANGE_TO(mbr, i));
  ------------------
  |  |  141|      0|#define ONIGENC_CODE_RANGE_TO(range,i)    range[((i)*2) + 2]
  ------------------
 4081|      0|	    if (r != 0) return r;
  ------------------
  |  Branch (4081:10): [True: 0, False: 0]
  ------------------
 4082|      0|	    i++;
 4083|      0|	  }
 4084|       |
 4085|  5.36k|	  goto sb_end;
 4086|  5.36k|	}
 4087|  38.8k|	BITSET_SET_BIT_CHKDUP(cc->bs, j);
  ------------------
  |  |  176|  38.8k|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|  38.8k|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|  38.8k|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|  38.8k|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|  38.8k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|  38.8k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|  38.8k|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|  38.8k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|  38.8k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 38.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|  38.8k|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|  38.8k|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|  38.8k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|  38.8k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|  38.8k|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|  38.8k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|  38.8k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|  38.8k|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4088|  38.8k|      }
 4089|  14.4k|    }
 4090|       |
 4091|  5.36k|  sb_end:
 4092|   139k|    for ( ; i < n; i++) {
  ------------------
  |  Branch (4092:13): [True: 133k, False: 5.36k]
  ------------------
 4093|   133k|      r = add_code_range_to_buf(&(cc->mbuf), env,
 4094|   133k|                                ONIGENC_CODE_RANGE_FROM(mbr, i),
  ------------------
  |  |  140|   133k|#define ONIGENC_CODE_RANGE_FROM(range,i)  range[((i)*2) + 1]
  ------------------
 4095|   133k|                                ONIGENC_CODE_RANGE_TO(mbr, i));
  ------------------
  |  |  141|   133k|#define ONIGENC_CODE_RANGE_TO(range,i)    range[((i)*2) + 2]
  ------------------
 4096|   133k|      if (r != 0) return r;
  ------------------
  |  Branch (4096:11): [True: 0, False: 133k]
  ------------------
 4097|   133k|    }
 4098|  5.36k|  }
 4099|      0|  else {
 4100|      0|    OnigCodePoint prev = 0;
 4101|       |
 4102|      0|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (4102:17): [True: 0, False: 0]
  ------------------
 4103|      0|      for (j = prev;
 4104|      0|	   j < ONIGENC_CODE_RANGE_FROM(mbr, i); j++) {
  ------------------
  |  |  140|      0|#define ONIGENC_CODE_RANGE_FROM(range,i)  range[((i)*2) + 1]
  ------------------
  |  Branch (4104:5): [True: 0, False: 0]
  ------------------
 4105|      0|	if (j >= sb_out) {
  ------------------
  |  Branch (4105:6): [True: 0, False: 0]
  ------------------
 4106|      0|	  goto sb_end2;
 4107|      0|	}
 4108|      0|	BITSET_SET_BIT_CHKDUP(cc->bs, j);
  ------------------
  |  |  176|      0|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|      0|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|      0|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4109|      0|      }
 4110|      0|      prev = ONIGENC_CODE_RANGE_TO(mbr, i) + 1;
  ------------------
  |  |  141|      0|#define ONIGENC_CODE_RANGE_TO(range,i)    range[((i)*2) + 2]
  ------------------
 4111|      0|    }
 4112|      0|    for (j = prev; j < sb_out; j++) {
  ------------------
  |  Branch (4112:20): [True: 0, False: 0]
  ------------------
 4113|      0|      BITSET_SET_BIT_CHKDUP(cc->bs, j);
  ------------------
  |  |  176|      0|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|      0|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|      0|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4114|      0|    }
 4115|       |
 4116|      0|  sb_end2:
 4117|      0|    prev = sb_out;
 4118|       |
 4119|      0|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (4119:17): [True: 0, False: 0]
  ------------------
 4120|      0|      if (prev < ONIGENC_CODE_RANGE_FROM(mbr, i)) {
  ------------------
  |  |  140|      0|#define ONIGENC_CODE_RANGE_FROM(range,i)  range[((i)*2) + 1]
  ------------------
  |  Branch (4120:11): [True: 0, False: 0]
  ------------------
 4121|      0|	r = add_code_range_to_buf(&(cc->mbuf), env, prev,
 4122|      0|                                  ONIGENC_CODE_RANGE_FROM(mbr, i) - 1);
  ------------------
  |  |  140|      0|#define ONIGENC_CODE_RANGE_FROM(range,i)  range[((i)*2) + 1]
  ------------------
 4123|      0|	if (r != 0) return r;
  ------------------
  |  Branch (4123:6): [True: 0, False: 0]
  ------------------
 4124|      0|      }
 4125|      0|      prev = ONIGENC_CODE_RANGE_TO(mbr, i) + 1;
  ------------------
  |  |  141|      0|#define ONIGENC_CODE_RANGE_TO(range,i)    range[((i)*2) + 2]
  ------------------
 4126|      0|    }
 4127|      0|    if (prev < 0x7fffffff) {
  ------------------
  |  Branch (4127:9): [True: 0, False: 0]
  ------------------
 4128|      0|      r = add_code_range_to_buf(&(cc->mbuf), env, prev, 0x7fffffff);
 4129|      0|      if (r != 0) return r;
  ------------------
  |  Branch (4129:11): [True: 0, False: 0]
  ------------------
 4130|      0|    }
 4131|      0|  }
 4132|       |
 4133|  5.36k|  return 0;
 4134|  5.36k|}
regparse.c:and_cclass:
 1978|  5.36k|{
 1979|  5.36k|  OnigEncoding enc = env->enc;
 1980|  5.36k|  int r, not1, not2;
 1981|  5.36k|  BBuf *buf1, *buf2, *pbuf = 0;
 1982|  5.36k|  BitSetRef bsr1, bsr2;
 1983|  5.36k|  BitSet bs1, bs2;
 1984|       |
 1985|  5.36k|  not1 = IS_NCCLASS_NOT(dest);
  ------------------
  |  |  809|  5.36k|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|  5.36k|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  5.36k|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1986|  5.36k|  bsr1 = dest->bs;
 1987|  5.36k|  buf1 = dest->mbuf;
 1988|  5.36k|  not2 = IS_NCCLASS_NOT(cc);
  ------------------
  |  |  809|  5.36k|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|  5.36k|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  5.36k|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1989|  5.36k|  bsr2 = cc->bs;
 1990|  5.36k|  buf2 = cc->mbuf;
 1991|       |
 1992|  5.36k|  if (not1 != 0) {
  ------------------
  |  Branch (1992:7): [True: 0, False: 5.36k]
  ------------------
 1993|      0|    bitset_invert_to(bsr1, bs1);
 1994|      0|    bsr1 = bs1;
 1995|      0|  }
 1996|  5.36k|  if (not2 != 0) {
  ------------------
  |  Branch (1996:7): [True: 0, False: 5.36k]
  ------------------
 1997|      0|    bitset_invert_to(bsr2, bs2);
 1998|      0|    bsr2 = bs2;
 1999|      0|  }
 2000|  5.36k|  bitset_and(bsr1, bsr2);
 2001|  5.36k|  if (bsr1 != dest->bs) {
  ------------------
  |  Branch (2001:7): [True: 0, False: 5.36k]
  ------------------
 2002|      0|    bitset_copy(dest->bs, bsr1);
 2003|      0|    bsr1 = dest->bs;
 2004|      0|  }
 2005|  5.36k|  if (not1 != 0) {
  ------------------
  |  Branch (2005:7): [True: 0, False: 5.36k]
  ------------------
 2006|      0|    bitset_invert(dest->bs);
 2007|      0|  }
 2008|       |
 2009|  5.36k|  if (! ONIGENC_IS_SINGLEBYTE(enc)) {
  ------------------
  |  |  318|  5.36k|#define ONIGENC_IS_SINGLEBYTE(enc)     (ONIGENC_MBC_MAXLEN(enc) == 1)
  |  |  ------------------
  |  |  |  |  365|  5.36k|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  |  |  ------------------
  ------------------
  |  Branch (2009:7): [True: 5.36k, False: 0]
  ------------------
 2010|  5.36k|    if (not1 != 0 && not2 != 0) {
  ------------------
  |  Branch (2010:9): [True: 0, False: 5.36k]
  |  Branch (2010:22): [True: 0, False: 0]
  ------------------
 2011|      0|      r = or_code_range_buf(enc, buf1, 0, buf2, 0, &pbuf, env);
 2012|      0|    }
 2013|  5.36k|    else {
 2014|  5.36k|      r = and_code_range_buf(buf1, not1, buf2, not2, &pbuf, env);
 2015|  5.36k|      if (r == 0 && not1 != 0) {
  ------------------
  |  Branch (2015:11): [True: 5.36k, False: 0]
  |  Branch (2015:21): [True: 0, False: 5.36k]
  ------------------
 2016|      0|	BBuf *tbuf = 0;
 2017|      0|	r = not_code_range_buf(enc, pbuf, &tbuf, env);
 2018|      0|	bbuf_free(pbuf);
 2019|      0|	pbuf = tbuf;
 2020|      0|      }
 2021|  5.36k|    }
 2022|  5.36k|    if (r != 0) {
  ------------------
  |  Branch (2022:9): [True: 0, False: 5.36k]
  ------------------
 2023|      0|      bbuf_free(pbuf);
 2024|      0|      return r;
 2025|      0|    }
 2026|       |
 2027|  5.36k|    dest->mbuf = pbuf;
 2028|  5.36k|    bbuf_free(buf1);
 2029|  5.36k|    return r;
 2030|  5.36k|  }
 2031|      0|  return 0;
 2032|  5.36k|}
regparse.c:bitset_and:
  225|  5.36k|{
  226|  5.36k|  int i;
  227|  48.3k|  for (i = 0; i < BITSET_SIZE; i++) { dest[i] &= bs[i]; }
  ------------------
  |  |  428|  48.3k|#define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
  |  |  ------------------
  |  |  |  |  426|  48.3k|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  425|  48.3k|#define BITS_PER_BYTE      8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
  |  |  ------------------
  |  |  |  |  427|  48.3k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  425|  48.3k|#define BITS_PER_BYTE      8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (227:15): [True: 42.9k, False: 5.36k]
  ------------------
  228|  5.36k|}
regparse.c:or_code_range_buf:
 1825|  5.36k|{
 1826|  5.36k|  int r;
 1827|  5.36k|  OnigCodePoint i, n1, *data1;
 1828|  5.36k|  OnigCodePoint from, to;
 1829|       |
 1830|  5.36k|  *pbuf = (BBuf* )NULL;
 1831|  5.36k|  if (IS_NULL(bbuf1) && IS_NULL(bbuf2)) {
  ------------------
  |  |  311|  10.7k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 5.36k, False: 0]
  |  |  ------------------
  ------------------
                if (IS_NULL(bbuf1) && IS_NULL(bbuf2)) {
  ------------------
  |  |  311|  5.36k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 5.36k, False: 0]
  |  |  ------------------
  ------------------
 1832|  5.36k|    if (not1 != 0 || not2 != 0)
  ------------------
  |  Branch (1832:9): [True: 0, False: 5.36k]
  |  Branch (1832:22): [True: 0, False: 5.36k]
  ------------------
 1833|      0|      return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf);
  ------------------
  |  |  166|      0|  add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  ------------------
  |  |  |  |  163|      0|  (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80)
  |  |  |  |  ------------------
  |  |  |  |  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (163:20): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  ------------------
  |  |  |  |  317|      0|#define ONIG_LAST_CODE_POINT    (~((OnigCodePoint )0))
  |  |  ------------------
  ------------------
 1834|  5.36k|    return 0;
 1835|  5.36k|  }
 1836|       |
 1837|      0|  r = 0;
 1838|      0|  if (IS_NULL(bbuf2))
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1839|      0|    SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2);
  ------------------
  |  | 1815|      0|#define SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2) do {\
  |  | 1816|      0|  BBuf *tbuf; \
  |  | 1817|      0|  int  tnot; \
  |  | 1818|      0|  tnot = not1;  not1  = not2;  not2  = tnot; \
  |  | 1819|      0|  tbuf = bbuf1; bbuf1 = bbuf2; bbuf2 = tbuf; \
  |  | 1820|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (1820:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1840|       |
 1841|      0|  if (IS_NULL(bbuf1)) {
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1842|      0|    if (not1 != 0) {
  ------------------
  |  Branch (1842:9): [True: 0, False: 0]
  ------------------
 1843|      0|      return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf);
  ------------------
  |  |  166|      0|  add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  ------------------
  |  |  |  |  163|      0|  (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80)
  |  |  |  |  ------------------
  |  |  |  |  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (163:20): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT)
  |  |  ------------------
  |  |  |  |  317|      0|#define ONIG_LAST_CODE_POINT    (~((OnigCodePoint )0))
  |  |  ------------------
  ------------------
 1844|      0|    }
 1845|      0|    else {
 1846|      0|      if (not2 == 0) {
  ------------------
  |  Branch (1846:11): [True: 0, False: 0]
  ------------------
 1847|      0|	return bbuf_clone(pbuf, bbuf2);
 1848|      0|      }
 1849|      0|      else {
 1850|      0|	return not_code_range_buf(enc, bbuf2, pbuf, env);
 1851|      0|      }
 1852|      0|    }
 1853|      0|  }
 1854|       |
 1855|      0|  if (not1 != 0)
  ------------------
  |  Branch (1855:7): [True: 0, False: 0]
  ------------------
 1856|      0|    SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2);
  ------------------
  |  | 1815|      0|#define SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2) do {\
  |  | 1816|      0|  BBuf *tbuf; \
  |  | 1817|      0|  int  tnot; \
  |  | 1818|      0|  tnot = not1;  not1  = not2;  not2  = tnot; \
  |  | 1819|      0|  tbuf = bbuf1; bbuf1 = bbuf2; bbuf2 = tbuf; \
  |  | 1820|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (1820:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1857|       |
 1858|      0|  data1 = (OnigCodePoint* )(bbuf1->p);
 1859|      0|  GET_CODE_POINT(n1, data1);
  ------------------
  |  |  710|      0|#define GET_CODE_POINT(code,p)   code = *((OnigCodePoint* )(p))
  ------------------
 1860|      0|  data1++;
 1861|       |
 1862|      0|  if (not2 == 0 && not1 == 0) { /* 1 OR 2 */
  ------------------
  |  Branch (1862:7): [True: 0, False: 0]
  |  Branch (1862:20): [True: 0, False: 0]
  ------------------
 1863|      0|    r = bbuf_clone(pbuf, bbuf2);
 1864|      0|  }
 1865|      0|  else if (not1 == 0) { /* 1 OR (not 2) */
  ------------------
  |  Branch (1865:12): [True: 0, False: 0]
  ------------------
 1866|      0|    r = not_code_range_buf(enc, bbuf2, pbuf, env);
 1867|      0|  }
 1868|      0|  if (r != 0) return r;
  ------------------
  |  Branch (1868:7): [True: 0, False: 0]
  ------------------
 1869|       |
 1870|      0|  for (i = 0; i < n1; i++) {
  ------------------
  |  Branch (1870:15): [True: 0, False: 0]
  ------------------
 1871|      0|    from = data1[i*2];
 1872|      0|    to   = data1[i*2+1];
 1873|      0|    r = add_code_range_to_buf(pbuf, env, from, to);
 1874|      0|    if (r != 0) return r;
  ------------------
  |  Branch (1874:9): [True: 0, False: 0]
  ------------------
 1875|      0|  }
 1876|      0|  return 0;
 1877|      0|}
regparse.c:and_code_range_buf:
 1921|  5.36k|{
 1922|  5.36k|  int r;
 1923|  5.36k|  OnigCodePoint i, j, n1, n2, *data1, *data2;
 1924|  5.36k|  OnigCodePoint from, to, from1, to1, from2, to2;
 1925|       |
 1926|  5.36k|  *pbuf = (BBuf* )NULL;
 1927|  5.36k|  if (IS_NULL(bbuf1)) {
  ------------------
  |  |  311|  5.36k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 5.36k]
  |  |  ------------------
  ------------------
 1928|      0|    if (not1 != 0 && IS_NOT_NULL(bbuf2)) /* not1 != 0 -> not2 == 0 */
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1928:9): [True: 0, False: 0]
  ------------------
 1929|      0|      return bbuf_clone(pbuf, bbuf2);
 1930|      0|    return 0;
 1931|      0|  }
 1932|  5.36k|  else if (IS_NULL(bbuf2)) {
  ------------------
  |  |  311|  5.36k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 5.36k, False: 0]
  |  |  ------------------
  ------------------
 1933|  5.36k|    if (not2 != 0)
  ------------------
  |  Branch (1933:9): [True: 0, False: 5.36k]
  ------------------
 1934|      0|      return bbuf_clone(pbuf, bbuf1);
 1935|  5.36k|    return 0;
 1936|  5.36k|  }
 1937|       |
 1938|      0|  if (not1 != 0)
  ------------------
  |  Branch (1938:7): [True: 0, False: 0]
  ------------------
 1939|      0|    SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2);
  ------------------
  |  | 1815|      0|#define SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2) do {\
  |  | 1816|      0|  BBuf *tbuf; \
  |  | 1817|      0|  int  tnot; \
  |  | 1818|      0|  tnot = not1;  not1  = not2;  not2  = tnot; \
  |  | 1819|      0|  tbuf = bbuf1; bbuf1 = bbuf2; bbuf2 = tbuf; \
  |  | 1820|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (1820:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1940|       |
 1941|      0|  data1 = (OnigCodePoint* )(bbuf1->p);
 1942|      0|  data2 = (OnigCodePoint* )(bbuf2->p);
 1943|      0|  GET_CODE_POINT(n1, data1);
  ------------------
  |  |  710|      0|#define GET_CODE_POINT(code,p)   code = *((OnigCodePoint* )(p))
  ------------------
 1944|      0|  GET_CODE_POINT(n2, data2);
  ------------------
  |  |  710|      0|#define GET_CODE_POINT(code,p)   code = *((OnigCodePoint* )(p))
  ------------------
 1945|      0|  data1++;
 1946|      0|  data2++;
 1947|       |
 1948|      0|  if (not2 == 0 && not1 == 0) { /* 1 AND 2 */
  ------------------
  |  Branch (1948:7): [True: 0, False: 0]
  |  Branch (1948:20): [True: 0, False: 0]
  ------------------
 1949|      0|    for (i = 0; i < n1; i++) {
  ------------------
  |  Branch (1949:17): [True: 0, False: 0]
  ------------------
 1950|      0|      from1 = data1[i*2];
 1951|      0|      to1   = data1[i*2+1];
 1952|      0|      for (j = 0; j < n2; j++) {
  ------------------
  |  Branch (1952:19): [True: 0, False: 0]
  ------------------
 1953|      0|	from2 = data2[j*2];
 1954|      0|	to2   = data2[j*2+1];
 1955|      0|	if (from2 > to1) break;
  ------------------
  |  Branch (1955:6): [True: 0, False: 0]
  ------------------
 1956|      0|	if (to2 < from1) continue;
  ------------------
  |  Branch (1956:6): [True: 0, False: 0]
  ------------------
 1957|      0|	from = MAX(from1, from2);
  ------------------
  |  |  309|      0|#define MAX(a,b) (((a)<(b))?(b):(a))
  |  |  ------------------
  |  |  |  Branch (309:19): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1958|      0|	to   = MIN(to1, to2);
  ------------------
  |  |  308|      0|#define MIN(a,b) (((a)>(b))?(b):(a))
  |  |  ------------------
  |  |  |  Branch (308:19): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1959|      0|	r = add_code_range_to_buf(pbuf, env, from, to);
 1960|      0|	if (r != 0) return r;
  ------------------
  |  Branch (1960:6): [True: 0, False: 0]
  ------------------
 1961|      0|      }
 1962|      0|    }
 1963|      0|  }
 1964|      0|  else if (not1 == 0) { /* 1 AND (not 2) */
  ------------------
  |  Branch (1964:12): [True: 0, False: 0]
  ------------------
 1965|      0|    for (i = 0; i < n1; i++) {
  ------------------
  |  Branch (1965:17): [True: 0, False: 0]
  ------------------
 1966|      0|      from1 = data1[i*2];
 1967|      0|      to1   = data1[i*2+1];
 1968|      0|      r = and_code_range1(pbuf, env, from1, to1, data2, n2);
 1969|      0|      if (r != 0) return r;
  ------------------
  |  Branch (1969:11): [True: 0, False: 0]
  ------------------
 1970|      0|    }
 1971|      0|  }
 1972|       |
 1973|      0|  return 0;
 1974|      0|}
regparse.c:or_cclass:
 2036|  5.36k|{
 2037|  5.36k|  OnigEncoding enc = env->enc;
 2038|  5.36k|  int r, not1, not2;
 2039|  5.36k|  BBuf *buf1, *buf2, *pbuf = 0;
 2040|  5.36k|  BitSetRef bsr1, bsr2;
 2041|  5.36k|  BitSet bs1, bs2;
 2042|       |
 2043|  5.36k|  not1 = IS_NCCLASS_NOT(dest);
  ------------------
  |  |  809|  5.36k|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|  5.36k|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  5.36k|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2044|  5.36k|  bsr1 = dest->bs;
 2045|  5.36k|  buf1 = dest->mbuf;
 2046|  5.36k|  not2 = IS_NCCLASS_NOT(cc);
  ------------------
  |  |  809|  5.36k|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|  5.36k|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  5.36k|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2047|  5.36k|  bsr2 = cc->bs;
 2048|  5.36k|  buf2 = cc->mbuf;
 2049|       |
 2050|  5.36k|  if (not1 != 0) {
  ------------------
  |  Branch (2050:7): [True: 0, False: 5.36k]
  ------------------
 2051|      0|    bitset_invert_to(bsr1, bs1);
 2052|      0|    bsr1 = bs1;
 2053|      0|  }
 2054|  5.36k|  if (not2 != 0) {
  ------------------
  |  Branch (2054:7): [True: 0, False: 5.36k]
  ------------------
 2055|      0|    bitset_invert_to(bsr2, bs2);
 2056|      0|    bsr2 = bs2;
 2057|      0|  }
 2058|  5.36k|  bitset_or(bsr1, bsr2);
 2059|  5.36k|  if (bsr1 != dest->bs) {
  ------------------
  |  Branch (2059:7): [True: 0, False: 5.36k]
  ------------------
 2060|      0|    bitset_copy(dest->bs, bsr1);
 2061|      0|    bsr1 = dest->bs;
 2062|      0|  }
 2063|  5.36k|  if (not1 != 0) {
  ------------------
  |  Branch (2063:7): [True: 0, False: 5.36k]
  ------------------
 2064|      0|    bitset_invert(dest->bs);
 2065|      0|  }
 2066|       |
 2067|  5.36k|  if (! ONIGENC_IS_SINGLEBYTE(enc)) {
  ------------------
  |  |  318|  5.36k|#define ONIGENC_IS_SINGLEBYTE(enc)     (ONIGENC_MBC_MAXLEN(enc) == 1)
  |  |  ------------------
  |  |  |  |  365|  5.36k|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  |  |  ------------------
  ------------------
  |  Branch (2067:7): [True: 5.36k, False: 0]
  ------------------
 2068|  5.36k|    if (not1 != 0 && not2 != 0) {
  ------------------
  |  Branch (2068:9): [True: 0, False: 5.36k]
  |  Branch (2068:22): [True: 0, False: 0]
  ------------------
 2069|      0|      r = and_code_range_buf(buf1, 0, buf2, 0, &pbuf, env);
 2070|      0|    }
 2071|  5.36k|    else {
 2072|  5.36k|      r = or_code_range_buf(enc, buf1, not1, buf2, not2, &pbuf, env);
 2073|  5.36k|      if (r == 0 && not1 != 0) {
  ------------------
  |  Branch (2073:11): [True: 5.36k, False: 0]
  |  Branch (2073:21): [True: 0, False: 5.36k]
  ------------------
 2074|      0|	BBuf *tbuf = 0;
 2075|      0|	r = not_code_range_buf(enc, pbuf, &tbuf, env);
 2076|      0|	bbuf_free(pbuf);
 2077|      0|	pbuf = tbuf;
 2078|      0|      }
 2079|  5.36k|    }
 2080|  5.36k|    if (r != 0) {
  ------------------
  |  Branch (2080:9): [True: 0, False: 5.36k]
  ------------------
 2081|      0|      bbuf_free(pbuf);
 2082|      0|      return r;
 2083|      0|    }
 2084|       |
 2085|  5.36k|    dest->mbuf = pbuf;
 2086|  5.36k|    bbuf_free(buf1);
 2087|  5.36k|    return r;
 2088|  5.36k|  }
 2089|      0|  else
 2090|      0|    return 0;
 2091|  5.36k|}
regparse.c:bitset_or:
  232|  5.36k|{
  233|  5.36k|  int i;
  234|  48.3k|  for (i = 0; i < BITSET_SIZE; i++) { dest[i] |= bs[i]; }
  ------------------
  |  |  428|  48.3k|#define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
  |  |  ------------------
  |  |  |  |  426|  48.3k|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  425|  48.3k|#define BITS_PER_BYTE      8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
  |  |  ------------------
  |  |  |  |  427|  48.3k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  425|  48.3k|#define BITS_PER_BYTE      8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (234:15): [True: 42.9k, False: 5.36k]
  ------------------
  235|  5.36k|}
regparse.c:parse_char_class:
 4562|  6.19k|{
 4563|  6.19k|  int r, neg, len, fetched, and_start;
 4564|  6.19k|  OnigCodePoint v, vs;
 4565|  6.19k|  UChar *p;
  ------------------
  |  |   76|  6.19k|# define UChar OnigUChar
  ------------------
 4566|  6.19k|  Node* node;
 4567|  6.19k|  Node* asc_node;
 4568|  6.19k|  CClassNode *cc, *prev_cc;
 4569|  6.19k|  CClassNode *asc_cc, *asc_prev_cc;
 4570|  6.19k|  CClassNode work_cc, asc_work_cc;
 4571|       |
 4572|  6.19k|  enum CCSTATE state;
 4573|  6.19k|  enum CCVALTYPE val_type, in_type;
 4574|  6.19k|  int val_israw, in_israw;
 4575|       |
 4576|  6.19k|  *np = *asc_np = NULL_NODE;
  ------------------
  |  |  283|  6.19k|#define NULL_NODE  ((Node* )0)
  ------------------
 4577|  6.19k|  env->parse_depth++;
 4578|  6.19k|  if (env->parse_depth > ParseDepthLimit)
  ------------------
  |  Branch (4578:7): [True: 0, False: 6.19k]
  ------------------
 4579|      0|    return ONIGERR_PARSE_DEPTH_LIMIT_OVER;
  ------------------
  |  |  639|      0|#define ONIGERR_PARSE_DEPTH_LIMIT_OVER                        -16
  ------------------
 4580|  6.19k|  prev_cc = asc_prev_cc = (CClassNode* )NULL;
 4581|  6.19k|  r = fetch_token_in_cc(tok, src, end, env);
 4582|  6.19k|  if (r == TK_CHAR && tok->u.c == '^' && tok->escaped == 0) {
  ------------------
  |  Branch (4582:7): [True: 2.89k, False: 3.30k]
  |  Branch (4582:23): [True: 2.47k, False: 413]
  |  Branch (4582:42): [True: 2.47k, False: 0]
  ------------------
 4583|  2.47k|    neg = 1;
 4584|  2.47k|    r = fetch_token_in_cc(tok, src, end, env);
 4585|  2.47k|  }
 4586|  3.71k|  else {
 4587|  3.71k|    neg = 0;
 4588|  3.71k|  }
 4589|       |
 4590|  6.19k|  if (r < 0) return r;
  ------------------
  |  Branch (4590:7): [True: 0, False: 6.19k]
  ------------------
 4591|  6.19k|  if (r == TK_CC_CLOSE) {
  ------------------
  |  Branch (4591:7): [True: 0, False: 6.19k]
  ------------------
 4592|      0|    if (! code_exist_check((OnigCodePoint )']',
  ------------------
  |  Branch (4592:9): [True: 0, False: 0]
  ------------------
 4593|      0|                           *src, env->pattern_end, 1, env))
 4594|      0|      return ONIGERR_EMPTY_CHAR_CLASS;
  ------------------
  |  |  647|      0|#define ONIGERR_EMPTY_CHAR_CLASS                             -102
  ------------------
 4595|       |
 4596|      0|    CC_ESC_WARN(env, (UChar* )"]");
 4597|      0|    r = tok->type = TK_CHAR;  /* allow []...] */
 4598|      0|  }
 4599|       |
 4600|  6.19k|  *np = node = node_new_cclass();
 4601|  6.19k|  CHECK_NULL_RETURN_MEMERR(node);
  ------------------
  |  |  314|  6.19k|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|  6.19k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 6.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 4602|  6.19k|  cc = NCCLASS(node);
  ------------------
  |  |   77|  6.19k|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 4603|       |
 4604|  6.19k|  if (IS_IGNORECASE(env->option)) {
  ------------------
  |  |  396|  6.19k|#define IS_IGNORECASE(option)     ((option) & ONIG_OPTION_IGNORECASE)
  |  |  ------------------
  |  |  |  |  454|  6.19k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  ------------------
  |  |  |  Branch (396:35): [True: 0, False: 6.19k]
  |  |  ------------------
  ------------------
 4605|      0|    *asc_np = asc_node = node_new_cclass();
 4606|      0|    CHECK_NULL_RETURN_MEMERR(asc_node);
  ------------------
  |  |  314|      0|#define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK_NULL_RETURN_MEMERR(p)   if (IS_NULL(p)) return ONIGERR_MEMORY
  |  |  ------------------
  |  |  |  |  632|      0|#define ONIGERR_MEMORY                                         -5
  |  |  ------------------
  ------------------
 4607|      0|    asc_cc = NCCLASS(asc_node);
  ------------------
  |  |   77|      0|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 4608|      0|  }
 4609|  6.19k|  else {
 4610|  6.19k|    asc_node = NULL_NODE;
  ------------------
  |  |  283|  6.19k|#define NULL_NODE  ((Node* )0)
  ------------------
 4611|  6.19k|    asc_cc = NULL;
 4612|  6.19k|  }
 4613|       |
 4614|  6.19k|  and_start = 0;
 4615|  6.19k|  state = CCS_START;
 4616|  6.19k|  p = *src;
 4617|  22.7k|  while (r != TK_CC_CLOSE) {
  ------------------
  |  Branch (4617:10): [True: 16.5k, False: 6.19k]
  ------------------
 4618|  16.5k|    fetched = 0;
 4619|  16.5k|    switch (r) {
 4620|  9.91k|    case TK_CHAR:
  ------------------
  |  Branch (4620:5): [True: 9.91k, False: 6.60k]
  ------------------
 4621|  9.91k|      if ((tok->u.code >= SINGLE_BYTE_SIZE) ||
  ------------------
  |  |  426|  9.91k|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|  9.91k|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
  |  Branch (4621:11): [True: 0, False: 9.91k]
  ------------------
 4622|  9.91k|	  (len = ONIGENC_CODE_TO_MBCLEN(env->enc, tok->u.c)) > 1) {
  ------------------
  |  |  370|  9.91k|#define ONIGENC_CODE_TO_MBCLEN(enc,code)       (enc)->code_to_mbclen(code,enc)
  ------------------
  |  Branch (4622:4): [True: 0, False: 9.91k]
  ------------------
 4623|      0|	in_type = CCV_CODE_POINT;
 4624|      0|      }
 4625|  9.91k|      else if (len < 0) {
  ------------------
  |  Branch (4625:16): [True: 0, False: 9.91k]
  ------------------
 4626|      0|	r = len;
 4627|      0|	goto err;
 4628|      0|      }
 4629|  9.91k|      else {
 4630|  9.91k|      sb_char:
 4631|  9.91k|	in_type = CCV_SB;
 4632|  9.91k|      }
 4633|  9.91k|      v = (OnigCodePoint )tok->u.c;
 4634|  9.91k|      in_israw = 0;
 4635|  9.91k|      goto val_entry2;
 4636|      0|      break;
 4637|       |
 4638|      0|    case TK_RAW_BYTE:
  ------------------
  |  Branch (4638:5): [True: 0, False: 16.5k]
  ------------------
 4639|       |      /* tok->base != 0 : octal or hexadec. */
 4640|      0|      if (! ONIGENC_IS_SINGLEBYTE(env->enc) && tok->base != 0) {
  ------------------
  |  |  318|      0|#define ONIGENC_IS_SINGLEBYTE(enc)     (ONIGENC_MBC_MAXLEN(enc) == 1)
  |  |  ------------------
  |  |  |  |  365|      0|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  |  |  ------------------
  ------------------
  |  Branch (4640:11): [True: 0, False: 0]
  |  Branch (4640:48): [True: 0, False: 0]
  ------------------
 4641|      0|	UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 4642|      0|	UChar* bufe = buf + ONIGENC_CODE_TO_MBC_MAXLEN;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
              	UChar* bufe = buf + ONIGENC_CODE_TO_MBC_MAXLEN;
  ------------------
  |  |  289|      0|#define ONIGENC_CODE_TO_MBC_MAXLEN       7
  ------------------
 4643|      0|	UChar* psave = p;
  ------------------
  |  |   76|      0|# define UChar OnigUChar
  ------------------
 4644|      0|	int i, base = tok->base;
 4645|       |
 4646|      0|	buf[0] = (UChar )tok->u.c;
 4647|      0|	for (i = 1; i < ONIGENC_MBC_MAXLEN(env->enc); i++) {
  ------------------
  |  |  365|      0|#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
  ------------------
  |  Branch (4647:14): [True: 0, False: 0]
  ------------------
 4648|      0|	  r = fetch_token_in_cc(tok, &p, end, env);
 4649|      0|	  if (r < 0) goto err;
  ------------------
  |  Branch (4649:8): [True: 0, False: 0]
  ------------------
 4650|      0|	  if (r != TK_RAW_BYTE || tok->base != base) {
  ------------------
  |  Branch (4650:8): [True: 0, False: 0]
  |  Branch (4650:28): [True: 0, False: 0]
  ------------------
 4651|      0|	    fetched = 1;
 4652|      0|	    break;
 4653|      0|	  }
 4654|      0|	  buf[i] = (UChar )tok->u.c;
 4655|      0|	}
 4656|       |
 4657|      0|	if (i < ONIGENC_MBC_MINLEN(env->enc)) {
  ------------------
  |  |  367|      0|#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
  ------------------
  |  Branch (4657:6): [True: 0, False: 0]
  ------------------
 4658|      0|	  r = ONIGERR_TOO_SHORT_MULTI_BYTE_STRING;
  ------------------
  |  |  675|      0|#define ONIGERR_TOO_SHORT_MULTI_BYTE_STRING                  -206
  ------------------
 4659|      0|	  goto err;
 4660|      0|	}
 4661|       |
 4662|      0|	if (env->enc == ONIG_ENCODING_EUC_JP ||
  ------------------
  |  |  247|      0|# define ONIG_ENCODING_EUC_JP       (&OnigEncodingEUC_JP)
  ------------------
  |  Branch (4662:6): [True: 0, False: 0]
  ------------------
 4663|      0|		env->enc == ONIG_ENCODING_SJIS) {
  ------------------
  |  |  266|      0|# define ONIG_ENCODING_SJIS         ONIG_ENCODING_SHIFT_JIS
  |  |  ------------------
  |  |  |  |  251|      0|# define ONIG_ENCODING_SHIFT_JIS    (&OnigEncodingShift_JIS)
  |  |  ------------------
  ------------------
  |  Branch (4663:3): [True: 0, False: 0]
  ------------------
 4664|       |	  /* Strict version of enclen does not handle invalid single code
 4665|       |	   * point for SJIS and EUC-JP...*/
 4666|      0|	  len = enclen_approximate(env->enc, buf, buf + i);
  ------------------
  |  |   94|      0|#define enclen_approximate(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN_APPROX(enc,p,e))
  |  |  ------------------
  |  |  |  |  363|      0|#define ONIGENC_MBC_ENC_LEN_APPROX(enc,p,e)   onigenc_mbclen_approximate(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (94:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4667|      0|	}
 4668|      0|	else {
 4669|      0|	  len = enclen(env->enc, buf, buf + i);
  ------------------
  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4670|      0|	}
 4671|      0|	if (i < len) {
  ------------------
  |  Branch (4671:6): [True: 0, False: 0]
  ------------------
 4672|      0|	  r = ONIGERR_TOO_SHORT_MULTI_BYTE_STRING;
  ------------------
  |  |  675|      0|#define ONIGERR_TOO_SHORT_MULTI_BYTE_STRING                  -206
  ------------------
 4673|      0|	  goto err;
 4674|      0|	}
 4675|      0|	else if (i > len) { /* fetch back */
  ------------------
  |  Branch (4675:11): [True: 0, False: 0]
  ------------------
 4676|      0|	  p = psave;
 4677|      0|	  for (i = 1; i < len; i++) {
  ------------------
  |  Branch (4677:16): [True: 0, False: 0]
  ------------------
 4678|      0|	    (void)fetch_token_in_cc(tok, &p, end, env);
 4679|       |	    /* no need to check the retun value (already checked above) */
 4680|      0|	  }
 4681|      0|	  fetched = 0;
 4682|      0|	}
 4683|       |
 4684|      0|	if (i == 1) {
  ------------------
  |  Branch (4684:6): [True: 0, False: 0]
  ------------------
 4685|      0|	  v = (OnigCodePoint )buf[0];
 4686|      0|	  goto raw_single;
 4687|      0|	}
 4688|      0|	else {
 4689|      0|	  v = ONIGENC_MBC_TO_CODE(env->enc, buf, bufe);
  ------------------
  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  ------------------
 4690|      0|	  in_type = CCV_CODE_POINT;
 4691|      0|	}
 4692|      0|      }
 4693|      0|      else {
 4694|      0|	v = (OnigCodePoint )tok->u.c;
 4695|      0|      raw_single:
 4696|      0|	in_type = CCV_SB;
 4697|      0|      }
 4698|      0|      in_israw = 1;
 4699|      0|      goto val_entry2;
 4700|      0|      break;
 4701|       |
 4702|  4.95k|    case TK_CODE_POINT:
  ------------------
  |  Branch (4702:5): [True: 4.95k, False: 11.5k]
  ------------------
 4703|  4.95k|      v = tok->u.code;
 4704|  4.95k|      in_israw = 1;
 4705|  4.95k|    val_entry:
 4706|  4.95k|      len = ONIGENC_CODE_TO_MBCLEN(env->enc, v);
  ------------------
  |  |  370|  4.95k|#define ONIGENC_CODE_TO_MBCLEN(enc,code)       (enc)->code_to_mbclen(code,enc)
  ------------------
 4707|  4.95k|      if (len < 0) {
  ------------------
  |  Branch (4707:11): [True: 0, False: 4.95k]
  ------------------
 4708|      0|	r = len;
 4709|      0|	goto err;
 4710|      0|      }
 4711|  4.95k|      in_type = (len == 1 ? CCV_SB : CCV_CODE_POINT);
  ------------------
  |  Branch (4711:18): [True: 4.95k, False: 0]
  ------------------
 4712|  14.8k|    val_entry2:
 4713|  14.8k|      r = next_state_val(cc, asc_cc, &vs, v, &val_israw, in_israw, in_type, &val_type,
 4714|  14.8k|			 &state, env);
 4715|  14.8k|      if (r != 0) goto err;
  ------------------
  |  Branch (4715:11): [True: 0, False: 14.8k]
  ------------------
 4716|  14.8k|      break;
 4717|       |
 4718|  14.8k|    case TK_POSIX_BRACKET_OPEN:
  ------------------
  |  Branch (4718:5): [True: 0, False: 16.5k]
  ------------------
 4719|      0|      r = parse_posix_bracket(cc, asc_cc, &p, end, env);
 4720|      0|      if (r < 0) goto err;
  ------------------
  |  Branch (4720:11): [True: 0, False: 0]
  ------------------
 4721|      0|      if (r == 1) {  /* is not POSIX bracket */
  ------------------
  |  Branch (4721:11): [True: 0, False: 0]
  ------------------
 4722|      0|	CC_ESC_WARN(env, (UChar* )"[");
 4723|      0|	p = tok->backp;
 4724|      0|	v = (OnigCodePoint )tok->u.c;
 4725|      0|	in_israw = 0;
 4726|      0|	goto val_entry;
 4727|      0|      }
 4728|      0|      goto next_class;
 4729|      0|      break;
 4730|       |
 4731|  1.65k|    case TK_CHAR_TYPE:
  ------------------
  |  Branch (4731:5): [True: 1.65k, False: 14.8k]
  ------------------
 4732|  1.65k|      r = add_ctype_to_cc(cc, tok->u.prop.ctype, tok->u.prop.not,
 4733|  1.65k|			  IS_ASCII_RANGE(env->option), env);
  ------------------
  |  |  406|  1.65k|#define IS_ASCII_RANGE(option)    ((option) & ONIG_OPTION_ASCII_RANGE)
  |  |  ------------------
  |  |  |  |  470|  1.65k|#define ONIG_OPTION_ASCII_RANGE          (ONIG_OPTION_NOTEOS << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  468|  1.65k|#define ONIG_OPTION_NOTEOS               (ONIG_OPTION_NOTBOS << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  467|  1.65k|#define ONIG_OPTION_NOTBOS               (ONIG_OPTION_NOTEOL << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  466|  1.65k|#define ONIG_OPTION_NOTEOL               (ONIG_OPTION_NOTBOL << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  465|  1.65k|#define ONIG_OPTION_NOTBOL               (ONIG_OPTION_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  463|  1.65k|#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  462|  1.65k|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  461|  1.65k|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  460|  1.65k|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  459|  1.65k|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  458|  1.65k|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  456|  1.65k|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|  1.65k|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|  1.65k|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4734|  1.65k|      if (r != 0) return r;
  ------------------
  |  Branch (4734:11): [True: 0, False: 1.65k]
  ------------------
 4735|  1.65k|      if (IS_NOT_NULL(asc_cc)) {
  ------------------
  |  |  312|  1.65k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
 4736|      0|	if (tok->u.prop.ctype != ONIGENC_CTYPE_WORD)
  ------------------
  |  |  306|      0|#define ONIGENC_CTYPE_WORD     12
  ------------------
  |  Branch (4736:6): [True: 0, False: 0]
  ------------------
 4737|      0|	  r = add_ctype_to_cc(asc_cc, tok->u.prop.ctype, tok->u.prop.not,
 4738|      0|			      IS_ASCII_RANGE(env->option), env);
  ------------------
  |  |  406|      0|#define IS_ASCII_RANGE(option)    ((option) & ONIG_OPTION_ASCII_RANGE)
  |  |  ------------------
  |  |  |  |  470|      0|#define ONIG_OPTION_ASCII_RANGE          (ONIG_OPTION_NOTEOS << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  468|      0|#define ONIG_OPTION_NOTEOS               (ONIG_OPTION_NOTBOS << 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  467|      0|#define ONIG_OPTION_NOTBOS               (ONIG_OPTION_NOTEOL << 1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  466|      0|#define ONIG_OPTION_NOTEOL               (ONIG_OPTION_NOTBOL << 1)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  465|      0|#define ONIG_OPTION_NOTBOL               (ONIG_OPTION_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  463|      0|#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  462|      0|#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  461|      0|#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  460|      0|#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  459|      0|#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  458|      0|#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  456|      0|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  455|      0|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4739|      0|	if (r != 0) return r;
  ------------------
  |  Branch (4739:6): [True: 0, False: 0]
  ------------------
 4740|      0|      }
 4741|       |
 4742|  1.65k|    next_class:
 4743|  1.65k|      r = next_state_class(cc, asc_cc, &vs, &val_type, &state, env);
 4744|  1.65k|      if (r != 0) goto err;
  ------------------
  |  Branch (4744:11): [True: 0, False: 1.65k]
  ------------------
 4745|  1.65k|      break;
 4746|       |
 4747|  1.65k|    case TK_CHAR_PROPERTY:
  ------------------
  |  Branch (4747:5): [True: 0, False: 16.5k]
  ------------------
 4748|      0|      {
 4749|      0|	int ctype;
 4750|       |
 4751|      0|	ctype = fetch_char_property_to_ctype(&p, end, env);
 4752|      0|	if (ctype < 0) return ctype;
  ------------------
  |  Branch (4752:6): [True: 0, False: 0]
  ------------------
 4753|      0|	r = add_ctype_to_cc(cc, ctype, tok->u.prop.not, 0, env);
 4754|      0|	if (r != 0) return r;
  ------------------
  |  Branch (4754:6): [True: 0, False: 0]
  ------------------
 4755|      0|	if (IS_NOT_NULL(asc_cc)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4756|      0|	  if (ctype != ONIGENC_CTYPE_ASCII)
  ------------------
  |  |  308|      0|#define ONIGENC_CTYPE_ASCII    14
  ------------------
  |  Branch (4756:8): [True: 0, False: 0]
  ------------------
 4757|      0|	    r = add_ctype_to_cc(asc_cc, ctype, tok->u.prop.not, 0, env);
 4758|      0|	  if (r != 0) return r;
  ------------------
  |  Branch (4758:8): [True: 0, False: 0]
  ------------------
 4759|      0|	}
 4760|      0|	goto next_class;
 4761|      0|      }
 4762|      0|      break;
 4763|       |
 4764|      0|    case TK_CC_RANGE:
  ------------------
  |  Branch (4764:5): [True: 0, False: 16.5k]
  ------------------
 4765|      0|      if (state == CCS_VALUE) {
  ------------------
  |  Branch (4765:11): [True: 0, False: 0]
  ------------------
 4766|      0|	r = fetch_token_in_cc(tok, &p, end, env);
 4767|      0|	if (r < 0) goto err;
  ------------------
  |  Branch (4767:6): [True: 0, False: 0]
  ------------------
 4768|      0|	fetched = 1;
 4769|      0|	if (r == TK_CC_CLOSE) { /* allow [x-] */
  ------------------
  |  Branch (4769:6): [True: 0, False: 0]
  ------------------
 4770|      0|	range_end_val:
 4771|      0|	  v = (OnigCodePoint )'-';
 4772|      0|	  in_israw = 0;
 4773|      0|	  goto val_entry;
 4774|      0|	}
 4775|      0|	else if (r == TK_CC_AND) {
  ------------------
  |  Branch (4775:11): [True: 0, False: 0]
  ------------------
 4776|      0|	  CC_ESC_WARN(env, (UChar* )"-");
 4777|      0|	  goto range_end_val;
 4778|      0|	}
 4779|       |
 4780|      0|	if (val_type == CCV_CLASS) {
  ------------------
  |  Branch (4780:6): [True: 0, False: 0]
  ------------------
 4781|      0|	  r = ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS;
  ------------------
  |  |  656|      0|#define ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS      -112
  ------------------
 4782|      0|	  goto err;
 4783|      0|	}
 4784|       |
 4785|      0|	state = CCS_RANGE;
 4786|      0|      }
 4787|      0|      else if (state == CCS_START) {
  ------------------
  |  Branch (4787:16): [True: 0, False: 0]
  ------------------
 4788|       |	/* [-xa] is allowed */
 4789|      0|	v = (OnigCodePoint )tok->u.c;
 4790|      0|	in_israw = 0;
 4791|       |
 4792|      0|	r = fetch_token_in_cc(tok, &p, end, env);
 4793|      0|	if (r < 0) goto err;
  ------------------
  |  Branch (4793:6): [True: 0, False: 0]
  ------------------
 4794|      0|	fetched = 1;
 4795|       |	/* [--x] or [a&&-x] is warned. */
 4796|      0|	if (r == TK_CC_RANGE || and_start != 0)
  ------------------
  |  Branch (4796:6): [True: 0, False: 0]
  |  Branch (4796:26): [True: 0, False: 0]
  ------------------
 4797|      0|	  CC_ESC_WARN(env, (UChar* )"-");
 4798|       |
 4799|      0|	goto val_entry;
 4800|      0|      }
 4801|      0|      else if (state == CCS_RANGE) {
  ------------------
  |  Branch (4801:16): [True: 0, False: 0]
  ------------------
 4802|      0|	CC_ESC_WARN(env, (UChar* )"-");
 4803|      0|	goto sb_char;  /* [!--x] is allowed */
 4804|      0|      }
 4805|      0|      else { /* CCS_COMPLETE */
 4806|      0|	r = fetch_token_in_cc(tok, &p, end, env);
 4807|      0|	if (r < 0) goto err;
  ------------------
  |  Branch (4807:6): [True: 0, False: 0]
  ------------------
 4808|      0|	fetched = 1;
 4809|      0|	if (r == TK_CC_CLOSE) goto range_end_val; /* allow [a-b-] */
  ------------------
  |  Branch (4809:6): [True: 0, False: 0]
  ------------------
 4810|      0|	else if (r == TK_CC_AND) {
  ------------------
  |  Branch (4810:11): [True: 0, False: 0]
  ------------------
 4811|      0|	  CC_ESC_WARN(env, (UChar* )"-");
 4812|      0|	  goto range_end_val;
 4813|      0|	}
 4814|       |
 4815|      0|	if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC)) {
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4816|      0|	  CC_ESC_WARN(env, (UChar* )"-");
 4817|      0|	  goto range_end_val;   /* [0-9-a] is allowed as [0-9\-a] */
 4818|      0|	}
 4819|      0|	r = ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS;
  ------------------
  |  |  656|      0|#define ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS      -112
  ------------------
 4820|      0|	goto err;
 4821|      0|      }
 4822|      0|      break;
 4823|       |
 4824|      0|    case TK_CC_CC_OPEN: /* [ */
  ------------------
  |  Branch (4824:5): [True: 0, False: 16.5k]
  ------------------
 4825|      0|      {
 4826|      0|	Node *anode, *aasc_node;
 4827|      0|	CClassNode* acc;
 4828|       |
 4829|      0|	r = parse_char_class(&anode, &aasc_node, tok, &p, end, env);
 4830|      0|	if (r == 0) {
  ------------------
  |  Branch (4830:6): [True: 0, False: 0]
  ------------------
 4831|      0|	  acc = NCCLASS(anode);
  ------------------
  |  |   77|      0|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 4832|      0|	  r = or_cclass(cc, acc, env);
 4833|      0|	}
 4834|      0|	if (r == 0 && IS_NOT_NULL(aasc_node)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4834:6): [True: 0, False: 0]
  ------------------
 4835|      0|	  acc = NCCLASS(aasc_node);
  ------------------
  |  |   77|      0|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
 4836|      0|	  r = or_cclass(asc_cc, acc, env);
 4837|      0|	}
 4838|      0|	onig_node_free(anode);
 4839|      0|	onig_node_free(aasc_node);
 4840|      0|	if (r != 0) goto err;
  ------------------
  |  Branch (4840:6): [True: 0, False: 0]
  ------------------
 4841|      0|      }
 4842|      0|      break;
 4843|       |
 4844|      0|    case TK_CC_AND: /* && */
  ------------------
  |  Branch (4844:5): [True: 0, False: 16.5k]
  ------------------
 4845|      0|      {
 4846|      0|	if (state == CCS_VALUE) {
  ------------------
  |  Branch (4846:6): [True: 0, False: 0]
  ------------------
 4847|      0|	  r = next_state_val(cc, asc_cc, &vs, 0, &val_israw, 0, val_type,
 4848|      0|			     &val_type, &state, env);
 4849|      0|	  if (r != 0) goto err;
  ------------------
  |  Branch (4849:8): [True: 0, False: 0]
  ------------------
 4850|      0|	}
 4851|       |	/* initialize local variables */
 4852|      0|	and_start = 1;
 4853|      0|	state = CCS_START;
 4854|       |
 4855|      0|	if (IS_NOT_NULL(prev_cc)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4856|      0|	  r = and_cclass(prev_cc, cc, env);
 4857|      0|	  if (r != 0) goto err;
  ------------------
  |  Branch (4857:8): [True: 0, False: 0]
  ------------------
 4858|      0|	  bbuf_free(cc->mbuf);
 4859|      0|	  if (IS_NOT_NULL(asc_cc)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4860|      0|	    r = and_cclass(asc_prev_cc, asc_cc, env);
 4861|      0|	    if (r != 0) goto err;
  ------------------
  |  Branch (4861:10): [True: 0, False: 0]
  ------------------
 4862|      0|	    bbuf_free(asc_cc->mbuf);
 4863|      0|	  }
 4864|      0|	}
 4865|      0|	else {
 4866|      0|	  prev_cc = cc;
 4867|      0|	  cc = &work_cc;
 4868|      0|	  if (IS_NOT_NULL(asc_cc)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4869|      0|	    asc_prev_cc = asc_cc;
 4870|      0|	    asc_cc = &asc_work_cc;
 4871|      0|	  }
 4872|      0|	}
 4873|      0|	initialize_cclass(cc);
 4874|      0|	if (IS_NOT_NULL(asc_cc))
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4875|      0|	  initialize_cclass(asc_cc);
 4876|      0|      }
 4877|      0|      break;
 4878|       |
 4879|      0|    case TK_EOT:
  ------------------
  |  Branch (4879:5): [True: 0, False: 16.5k]
  ------------------
 4880|      0|      r = ONIGERR_PREMATURE_END_OF_CHAR_CLASS;
  ------------------
  |  |  648|      0|#define ONIGERR_PREMATURE_END_OF_CHAR_CLASS                  -103
  ------------------
 4881|      0|      goto err;
 4882|      0|      break;
 4883|      0|    default:
  ------------------
  |  Branch (4883:5): [True: 0, False: 16.5k]
  ------------------
 4884|      0|      r = ONIGERR_PARSER_BUG;
  ------------------
  |  |  634|      0|#define ONIGERR_PARSER_BUG                                    -11
  ------------------
 4885|      0|      goto err;
 4886|      0|      break;
 4887|  16.5k|    }
 4888|       |
 4889|  16.5k|    if (fetched)
  ------------------
  |  Branch (4889:9): [True: 0, False: 16.5k]
  ------------------
 4890|      0|      r = tok->type;
 4891|  16.5k|    else {
 4892|  16.5k|      r = fetch_token_in_cc(tok, &p, end, env);
 4893|  16.5k|      if (r < 0) goto err;
  ------------------
  |  Branch (4893:11): [True: 0, False: 16.5k]
  ------------------
 4894|  16.5k|    }
 4895|  16.5k|  }
 4896|       |
 4897|  6.19k|  if (state == CCS_VALUE) {
  ------------------
  |  Branch (4897:7): [True: 6.19k, False: 0]
  ------------------
 4898|  6.19k|    r = next_state_val(cc, asc_cc, &vs, 0, &val_israw, 0, val_type,
 4899|  6.19k|		       &val_type, &state, env);
 4900|  6.19k|    if (r != 0) goto err;
  ------------------
  |  Branch (4900:9): [True: 0, False: 6.19k]
  ------------------
 4901|  6.19k|  }
 4902|       |
 4903|  6.19k|  if (IS_NOT_NULL(prev_cc)) {
  ------------------
  |  |  312|  6.19k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 6.19k]
  |  |  ------------------
  ------------------
 4904|      0|    r = and_cclass(prev_cc, cc, env);
 4905|      0|    if (r != 0) goto err;
  ------------------
  |  Branch (4905:9): [True: 0, False: 0]
  ------------------
 4906|      0|    bbuf_free(cc->mbuf);
 4907|      0|    cc = prev_cc;
 4908|      0|    if (IS_NOT_NULL(asc_cc)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4909|      0|      r = and_cclass(asc_prev_cc, asc_cc, env);
 4910|      0|      if (r != 0) goto err;
  ------------------
  |  Branch (4910:11): [True: 0, False: 0]
  ------------------
 4911|      0|      bbuf_free(asc_cc->mbuf);
 4912|      0|      asc_cc = asc_prev_cc;
 4913|      0|    }
 4914|      0|  }
 4915|       |
 4916|  6.19k|  if (neg != 0) {
  ------------------
  |  Branch (4916:7): [True: 2.47k, False: 3.71k]
  ------------------
 4917|  2.47k|    NCCLASS_SET_NOT(cc);
  ------------------
  |  |  807|  2.47k|#define NCCLASS_SET_NOT(nd)     NCCLASS_FLAG_SET(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  800|  2.47k|#define NCCLASS_FLAG_SET(cc,flag)    (NCCLASS_FLAGS(cc) |= (flag))
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  2.47k|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4918|  2.47k|    if (IS_NOT_NULL(asc_cc))
  ------------------
  |  |  312|  2.47k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 2.47k]
  |  |  ------------------
  ------------------
 4919|  2.47k|      NCCLASS_SET_NOT(asc_cc);
  ------------------
  |  |  807|      0|#define NCCLASS_SET_NOT(nd)     NCCLASS_FLAG_SET(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  800|      0|#define NCCLASS_FLAG_SET(cc,flag)    (NCCLASS_FLAGS(cc) |= (flag))
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4920|  2.47k|  }
 4921|  3.71k|  else {
 4922|  3.71k|    NCCLASS_CLEAR_NOT(cc);
  ------------------
  |  |  808|  3.71k|#define NCCLASS_CLEAR_NOT(nd)   NCCLASS_FLAG_CLEAR(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  801|  3.71k|#define NCCLASS_FLAG_CLEAR(cc,flag)  (NCCLASS_FLAGS(cc) &= ~(flag))
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  3.71k|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4923|  3.71k|    if (IS_NOT_NULL(asc_cc))
  ------------------
  |  |  312|  3.71k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 3.71k]
  |  |  ------------------
  ------------------
 4924|  3.71k|      NCCLASS_CLEAR_NOT(asc_cc);
  ------------------
  |  |  808|      0|#define NCCLASS_CLEAR_NOT(nd)   NCCLASS_FLAG_CLEAR(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  801|      0|#define NCCLASS_FLAG_CLEAR(cc,flag)  (NCCLASS_FLAGS(cc) &= ~(flag))
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|      0|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4925|  3.71k|  }
 4926|  6.19k|  if (IS_NCCLASS_NOT(cc) &&
  ------------------
  |  |  809|  6.19k|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|  12.3k|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  6.19k|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (802:37): [True: 2.47k, False: 3.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4927|  6.19k|      IS_SYNTAX_BV(env->syntax, ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC)) {
  ------------------
  |  |  332|  2.47k|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 2.47k]
  |  |  ------------------
  ------------------
 4928|      0|    int is_empty;
 4929|       |
 4930|      0|    is_empty = (IS_NULL(cc->mbuf) ? 1 : 0);
  ------------------
  |  |  311|      0|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  ------------------
  |  |  |  Branch (311:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4931|      0|    if (is_empty != 0)
  ------------------
  |  Branch (4931:9): [True: 0, False: 0]
  ------------------
 4932|      0|      BITSET_IS_EMPTY(cc->bs, is_empty);
  ------------------
  |  |  181|      0|#define BITSET_IS_EMPTY(bs,empty) do {\
  |  |  182|      0|  int i;\
  |  |  183|      0|  empty = 1;\
  |  |  184|      0|  for (i = 0; i < BITSET_SIZE; i++) {\
  |  |  ------------------
  |  |  |  |  428|      0|#define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (184:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|    if ((bs)[i] != 0) {\
  |  |  ------------------
  |  |  |  Branch (185:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  186|      0|      empty = 0; break;\
  |  |  187|      0|    }\
  |  |  188|      0|  }\
  |  |  189|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (189:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4933|       |
 4934|      0|    if (is_empty == 0) {
  ------------------
  |  Branch (4934:9): [True: 0, False: 0]
  ------------------
 4935|      0|#define NEWLINE_CODE    0x0a
 4936|       |
 4937|      0|      if (ONIGENC_IS_CODE_NEWLINE(env->enc, NEWLINE_CODE)) {
  ------------------
  |  |  378|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_NEWLINE)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4938|      0|	if (ONIGENC_CODE_TO_MBCLEN(env->enc, NEWLINE_CODE) == 1)
  ------------------
  |  |  370|      0|#define ONIGENC_CODE_TO_MBCLEN(enc,code)       (enc)->code_to_mbclen(code,enc)
  ------------------
  |  Branch (4938:6): [True: 0, False: 0]
  ------------------
 4939|      0|	  BITSET_SET_BIT_CHKDUP(cc->bs, NEWLINE_CODE);
  ------------------
  |  |  176|      0|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|      0|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|      0|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4940|      0|	else {
 4941|      0|	  r = add_code_range(&(cc->mbuf), env, NEWLINE_CODE, NEWLINE_CODE);
  ------------------
  |  | 4935|      0|#define NEWLINE_CODE    0x0a
  ------------------
              	  r = add_code_range(&(cc->mbuf), env, NEWLINE_CODE, NEWLINE_CODE);
  ------------------
  |  | 4935|      0|#define NEWLINE_CODE    0x0a
  ------------------
 4942|      0|	  if (r < 0) goto err;
  ------------------
  |  Branch (4942:8): [True: 0, False: 0]
  ------------------
 4943|      0|	}
 4944|      0|      }
 4945|      0|    }
 4946|      0|  }
 4947|  6.19k|  *src = p;
 4948|  6.19k|  env->parse_depth--;
 4949|  6.19k|  return 0;
 4950|       |
 4951|      0| err:
 4952|      0|  if (cc != NCCLASS(*np))
  ------------------
  |  |   77|      0|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
  |  Branch (4952:7): [True: 0, False: 0]
  ------------------
 4953|      0|    bbuf_free(cc->mbuf);
 4954|      0|  if (IS_NOT_NULL(asc_cc) && (asc_cc != NCCLASS(*asc_np)))
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                if (IS_NOT_NULL(asc_cc) && (asc_cc != NCCLASS(*asc_np)))
  ------------------
  |  |   77|      0|#define NCCLASS(node)      (&((node)->u.cclass))
  ------------------
  |  Branch (4954:30): [True: 0, False: 0]
  ------------------
 4955|      0|    bbuf_free(asc_cc->mbuf);
 4956|      0|  return r;
 4957|  6.19k|}
regparse.c:fetch_token_in_cc:
 2980|  25.1k|{
 2981|  25.1k|  int num;
 2982|  25.1k|  OnigCodePoint c, c2;
 2983|  25.1k|  const OnigSyntaxType* syn = env->syntax;
 2984|  25.1k|  OnigEncoding enc = env->enc;
 2985|  25.1k|  UChar* prev;
  ------------------
  |  |   76|  25.1k|# define UChar OnigUChar
  ------------------
 2986|  25.1k|  UChar* p = *src;
  ------------------
  |  |   76|  25.1k|# define UChar OnigUChar
  ------------------
 2987|  25.1k|  PFETCH_READY;
  ------------------
  |  |  295|  25.1k|# define PFETCH_READY  UChar* pfetch_prev = NULL; (void)pfetch_prev
  |  |  ------------------
  |  |  |  |   76|  25.1k|# define UChar OnigUChar
  |  |  ------------------
  ------------------
 2988|       |
 2989|  25.1k|  if (PEND) {
  ------------------
  |  |  299|  25.1k|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 25.1k]
  |  |  |  Branch (299:23): [True: 25.1k, False: 0]
  |  |  ------------------
  ------------------
 2990|      0|    tok->type = TK_EOT;
 2991|      0|    return tok->type;
 2992|      0|  }
 2993|       |
 2994|  25.1k|  PFETCH(c);
  ------------------
  |  |  305|  25.1k|#define PFETCH(c)  do { \
  |  |  306|  25.1k|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|  25.1k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 25.1k]
  |  |  ------------------
  |  |  307|  25.1k|  pfetch_prev = p; \
  |  |  308|  25.1k|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|  25.1k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|  25.1k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 25.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|  25.1k|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2995|  25.1k|  tok->type = TK_CHAR;
 2996|  25.1k|  tok->base = 0;
 2997|  25.1k|  tok->u.c  = c;
 2998|  25.1k|  tok->escaped = 0;
 2999|       |
 3000|  25.1k|  if (c == ']') {
  ------------------
  |  Branch (3000:7): [True: 6.19k, False: 18.9k]
  ------------------
 3001|  6.19k|    tok->type = TK_CC_CLOSE;
 3002|  6.19k|  }
 3003|  18.9k|  else if (c == '-') {
  ------------------
  |  Branch (3003:12): [True: 0, False: 18.9k]
  ------------------
 3004|      0|    tok->type = TK_CC_RANGE;
 3005|      0|  }
 3006|  18.9k|  else if (c == MC_ESC(syn)) {
  ------------------
  |  |  761|  18.9k|#define MC_ESC(syn)               (syn)->meta_char_table.esc
  ------------------
  |  Branch (3006:12): [True: 7.02k, False: 11.9k]
  ------------------
 3007|  7.02k|    if (! IS_SYNTAX_BV(syn, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC))
  ------------------
  |  |  332|  7.02k|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  ------------------
  |  Branch (3007:9): [True: 0, False: 7.02k]
  ------------------
 3008|      0|      goto end;
 3009|       |
 3010|  7.02k|    if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
  ------------------
  |  |  299|  7.02k|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 7.02k]
  |  |  |  Branch (299:23): [True: 7.02k, False: 0]
  |  |  ------------------
  ------------------
                  if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
  ------------------
  |  |  649|      0|#define ONIGERR_END_PATTERN_AT_ESCAPE                        -104
  ------------------
 3011|       |
 3012|  7.02k|    PFETCH(c);
  ------------------
  |  |  305|  7.02k|#define PFETCH(c)  do { \
  |  |  306|  7.02k|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|  7.02k|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 7.02k]
  |  |  ------------------
  |  |  307|  7.02k|  pfetch_prev = p; \
  |  |  308|  7.02k|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|  7.02k|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|  7.02k|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 7.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|  7.02k|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3013|  7.02k|    tok->escaped = 1;
 3014|  7.02k|    tok->u.c = c;
 3015|  7.02k|    switch (c) {
 3016|      0|    case 'w':
  ------------------
  |  Branch (3016:5): [True: 0, False: 7.02k]
  ------------------
 3017|      0|      tok->type = TK_CHAR_TYPE;
 3018|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_WORD;
  ------------------
  |  |  306|      0|#define ONIGENC_CTYPE_WORD     12
  ------------------
 3019|      0|      tok->u.prop.not   = 0;
 3020|      0|      break;
 3021|      0|    case 'W':
  ------------------
  |  Branch (3021:5): [True: 0, False: 7.02k]
  ------------------
 3022|      0|      tok->type = TK_CHAR_TYPE;
 3023|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_WORD;
  ------------------
  |  |  306|      0|#define ONIGENC_CTYPE_WORD     12
  ------------------
 3024|      0|      tok->u.prop.not   = 1;
 3025|      0|      break;
 3026|      0|    case 'd':
  ------------------
  |  Branch (3026:5): [True: 0, False: 7.02k]
  ------------------
 3027|      0|      tok->type = TK_CHAR_TYPE;
 3028|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT;
  ------------------
  |  |  298|      0|#define ONIGENC_CTYPE_DIGIT     4
  ------------------
 3029|      0|      tok->u.prop.not   = 0;
 3030|      0|      break;
 3031|      0|    case 'D':
  ------------------
  |  Branch (3031:5): [True: 0, False: 7.02k]
  ------------------
 3032|      0|      tok->type = TK_CHAR_TYPE;
 3033|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT;
  ------------------
  |  |  298|      0|#define ONIGENC_CTYPE_DIGIT     4
  ------------------
 3034|      0|      tok->u.prop.not   = 1;
 3035|      0|      break;
 3036|  1.65k|    case 's':
  ------------------
  |  Branch (3036:5): [True: 1.65k, False: 5.36k]
  ------------------
 3037|  1.65k|      tok->type = TK_CHAR_TYPE;
 3038|  1.65k|      tok->u.prop.ctype = ONIGENC_CTYPE_SPACE;
  ------------------
  |  |  303|  1.65k|#define ONIGENC_CTYPE_SPACE     9
  ------------------
 3039|  1.65k|      tok->u.prop.not   = 0;
 3040|  1.65k|      break;
 3041|      0|    case 'S':
  ------------------
  |  Branch (3041:5): [True: 0, False: 7.02k]
  ------------------
 3042|      0|      tok->type = TK_CHAR_TYPE;
 3043|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_SPACE;
  ------------------
  |  |  303|      0|#define ONIGENC_CTYPE_SPACE     9
  ------------------
 3044|      0|      tok->u.prop.not   = 1;
 3045|      0|      break;
 3046|      0|    case 'h':
  ------------------
  |  Branch (3046:5): [True: 0, False: 7.02k]
  ------------------
 3047|      0|      if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  ------------------
  |  Branch (3047:11): [True: 0, False: 0]
  ------------------
 3048|      0|      tok->type = TK_CHAR_TYPE;
 3049|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT;
  ------------------
  |  |  305|      0|#define ONIGENC_CTYPE_XDIGIT   11
  ------------------
 3050|      0|      tok->u.prop.not   = 0;
 3051|      0|      break;
 3052|      0|    case 'H':
  ------------------
  |  Branch (3052:5): [True: 0, False: 7.02k]
  ------------------
 3053|      0|      if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  ------------------
  |  Branch (3053:11): [True: 0, False: 0]
  ------------------
 3054|      0|      tok->type = TK_CHAR_TYPE;
 3055|      0|      tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT;
  ------------------
  |  |  305|      0|#define ONIGENC_CTYPE_XDIGIT   11
  ------------------
 3056|      0|      tok->u.prop.not   = 1;
 3057|      0|      break;
 3058|       |
 3059|      0|    case 'p':
  ------------------
  |  Branch (3059:5): [True: 0, False: 7.02k]
  ------------------
 3060|      0|    case 'P':
  ------------------
  |  Branch (3060:5): [True: 0, False: 7.02k]
  ------------------
 3061|      0|      if (PEND) break;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3062|       |
 3063|      0|      c2 = PPEEK;
  ------------------
  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  ------------------
  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3064|      0|      if (c2 == '{' &&
  ------------------
  |  Branch (3064:11): [True: 0, False: 0]
  ------------------
 3065|      0|	  IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3066|      0|	PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3067|      0|	tok->type = TK_CHAR_PROPERTY;
 3068|      0|	tok->u.prop.not = (c == 'P' ? 1 : 0);
  ------------------
  |  Branch (3068:21): [True: 0, False: 0]
  ------------------
 3069|       |
 3070|      0|	if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3070:6): [True: 0, False: 0]
  ------------------
 3071|      0|	  PFETCH(c2);
  ------------------
  |  |  305|      0|#define PFETCH(c)  do { \
  |  |  306|      0|  c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |  |  Branch (306:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  307|      0|  pfetch_prev = p; \
  |  |  308|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  309|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (309:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3072|      0|	  if (c2 == '^') {
  ------------------
  |  Branch (3072:8): [True: 0, False: 0]
  ------------------
 3073|      0|	    tok->u.prop.not = (tok->u.prop.not == 0 ? 1 : 0);
  ------------------
  |  Branch (3073:25): [True: 0, False: 0]
  ------------------
 3074|      0|	  }
 3075|      0|	  else
 3076|      0|	    PUNFETCH;
  ------------------
  |  |  300|      0|#define PUNFETCH     p = pfetch_prev
  ------------------
 3077|      0|	}
 3078|      0|      }
 3079|      0|      else {
 3080|      0|	onig_syntax_warn(env, "invalid Unicode Property \\%c", c);
 3081|      0|      }
 3082|      0|      break;
 3083|       |
 3084|      0|    case 'x':
  ------------------
  |  Branch (3084:5): [True: 0, False: 7.02k]
  ------------------
 3085|      0|      if (PEND) break;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3086|       |
 3087|      0|      prev = p;
 3088|      0|      if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) {
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) {
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3089|      0|	PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3090|      0|	num = scan_unsigned_hexadecimal_number(&p, end, 0, 8, enc);
 3091|      0|	if (num < 0) return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE;
  ------------------
  |  |  694|      0|#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE                      -401
  ------------------
  |  Branch (3091:6): [True: 0, False: 0]
  ------------------
 3092|      0|	if (!PEND) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3092:6): [True: 0, False: 0]
  ------------------
 3093|      0|	  c2 = PPEEK;
  ------------------
  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  ------------------
  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3094|      0|	  if (ONIGENC_IS_CODE_XDIGIT(enc, c2))
  ------------------
  |  |  402|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_XDIGIT)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3095|      0|	    return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE;
  ------------------
  |  |  681|      0|#define ONIGERR_TOO_LONG_WIDE_CHAR_VALUE                     -212
  ------------------
 3096|      0|	}
 3097|       |
 3098|      0|	if (p > prev + enclen(enc, prev, end) && !PEND && (PPEEK_IS('}'))) {
  ------------------
  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	if (p > prev + enclen(enc, prev, end) && !PEND && (PPEEK_IS('}'))) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	if (p > prev + enclen(enc, prev, end) && !PEND && (PPEEK_IS('}'))) {
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3098:6): [True: 0, False: 0]
  |  Branch (3098:43): [True: 0, False: 0]
  |  Branch (3098:52): [True: 0, False: 0]
  ------------------
 3099|      0|	  PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3100|      0|	  tok->type   = TK_CODE_POINT;
 3101|      0|	  tok->base   = 16;
 3102|      0|	  tok->u.code = (OnigCodePoint )num;
 3103|      0|	}
 3104|      0|	else {
 3105|       |	  /* can't read nothing or invalid format */
 3106|      0|	  p = prev;
 3107|      0|	}
 3108|      0|      }
 3109|      0|      else if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_HEX2)) {
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3110|      0|	num = scan_unsigned_hexadecimal_number(&p, end, 0, 2, enc);
 3111|      0|	if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
  ------------------
  |  |  669|      0|#define ONIGERR_TOO_BIG_NUMBER                               -200
  ------------------
  |  Branch (3111:6): [True: 0, False: 0]
  ------------------
 3112|      0|	if (p == prev) {  /* can't read nothing. */
  ------------------
  |  Branch (3112:6): [True: 0, False: 0]
  ------------------
 3113|      0|	  num = 0; /* but, it's not error */
 3114|      0|	}
 3115|      0|	tok->type = TK_RAW_BYTE;
 3116|      0|	tok->base = 16;
 3117|      0|	tok->u.c  = num;
 3118|      0|      }
 3119|      0|      break;
 3120|       |
 3121|      0|    case 'u':
  ------------------
  |  Branch (3121:5): [True: 0, False: 7.02k]
  ------------------
 3122|      0|      if (PEND) break;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3123|       |
 3124|      0|      prev = p;
 3125|      0|      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_U_HEX4)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3126|      0|	num = scan_unsigned_hexadecimal_number(&p, end, 4, 4, enc);
 3127|      0|	if (num < -1) return ONIGERR_TOO_SHORT_DIGITS;
  ------------------
  |  |  680|      0|#define ONIGERR_TOO_SHORT_DIGITS                             -211
  ------------------
  |  Branch (3127:6): [True: 0, False: 0]
  ------------------
 3128|      0|	else if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
  ------------------
  |  |  669|      0|#define ONIGERR_TOO_BIG_NUMBER                               -200
  ------------------
  |  Branch (3128:11): [True: 0, False: 0]
  ------------------
 3129|      0|	if (p == prev) {  /* can't read nothing. */
  ------------------
  |  Branch (3129:6): [True: 0, False: 0]
  ------------------
 3130|      0|	  num = 0; /* but, it's not error */
 3131|      0|	}
 3132|      0|	tok->type   = TK_CODE_POINT;
 3133|      0|	tok->base   = 16;
 3134|      0|	tok->u.code = (OnigCodePoint )num;
 3135|      0|      }
 3136|      0|      break;
 3137|       |
 3138|      0|    case 'o':
  ------------------
  |  Branch (3138:5): [True: 0, False: 7.02k]
  ------------------
 3139|      0|      if (PEND) break;
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:22): [True: 0, False: 0]
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3140|       |
 3141|      0|      prev = p;
 3142|      0|      if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_O_BRACE_OCTAL)) {
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (320:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_O_BRACE_OCTAL)) {
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3143|      0|	PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3144|      0|	num = scan_unsigned_octal_number(&p, end, 11, enc);
 3145|      0|	if (num < 0) return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE;
  ------------------
  |  |  694|      0|#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE                      -401
  ------------------
  |  Branch (3145:6): [True: 0, False: 0]
  ------------------
 3146|      0|	if (!PEND) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3146:6): [True: 0, False: 0]
  ------------------
 3147|      0|	  c2 = PPEEK;
  ------------------
  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  ------------------
  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  ------------------
  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  ------------------
  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3148|      0|	  if (ONIGENC_IS_CODE_DIGIT(enc, c2) && c2 < '8')
  ------------------
  |  |  400|      0|        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
  |  |  ------------------
  |  |  |  |  375|      0|#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (375:48): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3148:42): [True: 0, False: 0]
  ------------------
 3149|      0|	    return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE;
  ------------------
  |  |  681|      0|#define ONIGERR_TOO_LONG_WIDE_CHAR_VALUE                     -212
  ------------------
 3150|      0|	}
 3151|       |
 3152|      0|	if (p > prev + enclen(enc, prev, end) && !PEND && (PPEEK_IS('}'))) {
  ------------------
  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  ------------------
  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  ------------------
  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	if (p > prev + enclen(enc, prev, end) && !PEND && (PPEEK_IS('}'))) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	if (p > prev + enclen(enc, prev, end) && !PEND && (PPEEK_IS('}'))) {
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3152:6): [True: 0, False: 0]
  |  Branch (3152:43): [True: 0, False: 0]
  |  Branch (3152:52): [True: 0, False: 0]
  ------------------
 3153|      0|	  PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3154|      0|	  tok->type   = TK_CODE_POINT;
 3155|      0|	  tok->base   = 8;
 3156|      0|	  tok->u.code = (OnigCodePoint )num;
 3157|      0|	}
 3158|      0|	else {
 3159|       |	  /* can't read nothing or invalid format */
 3160|      0|	  p = prev;
 3161|      0|	}
 3162|      0|      }
 3163|      0|      break;
 3164|       |
 3165|      0|    case '0':
  ------------------
  |  Branch (3165:5): [True: 0, False: 7.02k]
  ------------------
 3166|      0|    case '1': case '2': case '3': case '4': case '5': case '6': case '7':
  ------------------
  |  Branch (3166:5): [True: 0, False: 7.02k]
  |  Branch (3166:15): [True: 0, False: 7.02k]
  |  Branch (3166:25): [True: 0, False: 7.02k]
  |  Branch (3166:35): [True: 0, False: 7.02k]
  |  Branch (3166:45): [True: 0, False: 7.02k]
  |  Branch (3166:55): [True: 0, False: 7.02k]
  |  Branch (3166:65): [True: 0, False: 7.02k]
  ------------------
 3167|      0|      if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3168|      0|	PUNFETCH;
  ------------------
  |  |  300|      0|#define PUNFETCH     p = pfetch_prev
  ------------------
 3169|      0|	prev = p;
 3170|      0|	num = scan_unsigned_octal_number(&p, end, 3, enc);
 3171|      0|	if (num < 0 || 0xff < num) return ONIGERR_TOO_BIG_NUMBER;
  ------------------
  |  |  669|      0|#define ONIGERR_TOO_BIG_NUMBER                               -200
  ------------------
  |  Branch (3171:6): [True: 0, False: 0]
  |  Branch (3171:17): [True: 0, False: 0]
  ------------------
 3172|      0|	if (p == prev) {  /* can't read nothing. */
  ------------------
  |  Branch (3172:6): [True: 0, False: 0]
  ------------------
 3173|      0|	  num = 0; /* but, it's not error */
 3174|      0|	}
 3175|      0|	tok->type = TK_RAW_BYTE;
 3176|      0|	tok->base = 8;
 3177|      0|	tok->u.c  = num;
 3178|      0|      }
 3179|      0|      break;
 3180|       |
 3181|  5.36k|    default:
  ------------------
  |  Branch (3181:5): [True: 5.36k, False: 1.65k]
  ------------------
 3182|  5.36k|      PUNFETCH;
  ------------------
  |  |  300|  5.36k|#define PUNFETCH     p = pfetch_prev
  ------------------
 3183|  5.36k|      num = fetch_escaped_value(&p, end, env, &c2);
 3184|  5.36k|      if (num < 0) return num;
  ------------------
  |  Branch (3184:11): [True: 0, False: 5.36k]
  ------------------
 3185|  5.36k|      if ((OnigCodePoint )tok->u.c != c2) {
  ------------------
  |  Branch (3185:11): [True: 4.95k, False: 413]
  ------------------
 3186|  4.95k|	tok->u.code = (OnigCodePoint )c2;
 3187|  4.95k|	tok->type   = TK_CODE_POINT;
 3188|  4.95k|      }
 3189|  5.36k|      break;
 3190|  7.02k|    }
 3191|  7.02k|  }
 3192|  11.9k|  else if (c == '[') {
  ------------------
  |  Branch (3192:12): [True: 0, False: 11.9k]
  ------------------
 3193|      0|    if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_POSIX_BRACKET) && (PPEEK_IS(':'))) {
  ------------------
  |  |  330|      0|#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (330:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_POSIX_BRACKET) && (PPEEK_IS(':'))) {
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3193:57): [True: 0, False: 0]
  ------------------
 3194|      0|      OnigCodePoint send[] = { (OnigCodePoint )':', (OnigCodePoint )']' };
 3195|      0|      tok->backp = p; /* point at '[' is read */
 3196|      0|      PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3197|      0|      if (str_exist_check_with_esc(send, 2, p, end,
  ------------------
  |  Branch (3197:11): [True: 0, False: 0]
  ------------------
 3198|      0|                                   (OnigCodePoint )']', enc, syn)) {
 3199|      0|	tok->type = TK_POSIX_BRACKET_OPEN;
 3200|      0|      }
 3201|      0|      else {
 3202|      0|	PUNFETCH;
  ------------------
  |  |  300|      0|#define PUNFETCH     p = pfetch_prev
  ------------------
 3203|      0|	goto cc_in_cc;
 3204|      0|      }
 3205|      0|    }
 3206|      0|    else {
 3207|      0|    cc_in_cc:
 3208|      0|      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_CCLASS_SET_OP)) {
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3209|      0|	tok->type = TK_CC_CC_OPEN;
 3210|      0|      }
 3211|      0|      else {
 3212|      0|	CC_ESC_WARN(env, (UChar* )"[");
 3213|      0|      }
 3214|      0|    }
 3215|      0|  }
 3216|  11.9k|  else if (c == '&') {
  ------------------
  |  Branch (3216:12): [True: 0, False: 11.9k]
  ------------------
 3217|      0|    if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_CCLASS_SET_OP) &&
  ------------------
  |  |  331|      0|#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
  |  |  ------------------
  |  |  |  Branch (331:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3218|      0|	!PEND && (PPEEK_IS('&'))) {
  ------------------
  |  |  299|      0|#define PEND         (p < end ?  0 : 1)
  |  |  ------------------
  |  |  |  Branch (299:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
              	!PEND && (PPEEK_IS('&'))) {
  ------------------
  |  |  320|      0|#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
  |  |  ------------------
  |  |  |  |  319|      0|#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  369|      0|#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end),enc)
  |  |  |  |  ------------------
  |  |  |  |               #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#define PEND_VALUE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3218:2): [True: 0, False: 0]
  |  Branch (3218:11): [True: 0, False: 0]
  ------------------
 3219|      0|      PINC;
  ------------------
  |  |  301|      0|#define PINC       do { \
  |  |  302|      0|  pfetch_prev = p; \
  |  |  303|      0|  p += enclen(enc, p, end); \
  |  |  ------------------
  |  |  |  |   93|      0|#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e))
  |  |  |  |  ------------------
  |  |  |  |  |  |  364|      0|#define ONIGENC_MBC_ENC_LEN(enc,p,e)          onigenc_mbclen(p,e,enc)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (93:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  304|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (304:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3220|      0|      tok->type = TK_CC_AND;
 3221|      0|    }
 3222|      0|  }
 3223|       |
 3224|  25.1k| end:
 3225|  25.1k|  *src = p;
 3226|  25.1k|  return tok->type;
 3227|  25.1k|}
regparse.c:next_state_val:
 4456|  21.0k|{
 4457|  21.0k|  int r;
 4458|       |
 4459|  21.0k|  switch (*state) {
 4460|  16.5k|  case CCS_VALUE:
  ------------------
  |  Branch (4460:3): [True: 16.5k, False: 4.54k]
  ------------------
 4461|  16.5k|    if (*type == CCV_SB) {
  ------------------
  |  Branch (4461:9): [True: 14.8k, False: 1.65k]
  ------------------
 4462|  14.8k|      BITSET_SET_BIT_CHKDUP(cc->bs, (int )(*from));
  ------------------
  |  |  176|  14.8k|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|  14.8k|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|  14.8k|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|  14.8k|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|  14.8k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|  14.8k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|  14.8k|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|  14.8k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|  14.8k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|  14.8k|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|  14.8k|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|  14.8k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|  14.8k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|  14.8k|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|  14.8k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|  14.8k|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|  14.8k|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4463|  14.8k|      if (IS_NOT_NULL(asc_cc))
  ------------------
  |  |  312|  14.8k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 14.8k]
  |  |  ------------------
  ------------------
 4464|  14.8k|	BITSET_SET_BIT(asc_cc->bs, (int )(*from));
  ------------------
  |  |  449|      0|#define BITSET_SET_BIT(bs, pos)     BS_ROOM(bs,pos) |= BS_BIT(pos)
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_SET_BIT(bs, pos)     BS_ROOM(bs,pos) |= BS_BIT(pos)
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4465|  14.8k|    }
 4466|  1.65k|    else if (*type == CCV_CODE_POINT) {
  ------------------
  |  Branch (4466:14): [True: 0, False: 1.65k]
  ------------------
 4467|      0|      r = add_code_range(&(cc->mbuf), env, *from, *from);
 4468|      0|      if (r < 0) return r;
  ------------------
  |  Branch (4468:11): [True: 0, False: 0]
  ------------------
 4469|      0|      if (IS_NOT_NULL(asc_cc)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4470|      0|	r = add_code_range0(&(asc_cc->mbuf), env, *from, *from, 0);
 4471|      0|	if (r < 0) return r;
  ------------------
  |  Branch (4471:6): [True: 0, False: 0]
  ------------------
 4472|      0|      }
 4473|      0|    }
 4474|  16.5k|    break;
 4475|       |
 4476|  16.5k|  case CCS_RANGE:
  ------------------
  |  Branch (4476:3): [True: 0, False: 21.0k]
  ------------------
 4477|      0|    if (intype == *type) {
  ------------------
  |  Branch (4477:9): [True: 0, False: 0]
  ------------------
 4478|      0|      if (intype == CCV_SB) {
  ------------------
  |  Branch (4478:11): [True: 0, False: 0]
  ------------------
 4479|      0|	if (*from > 0xff || to > 0xff)
  ------------------
  |  Branch (4479:6): [True: 0, False: 0]
  |  Branch (4479:22): [True: 0, False: 0]
  ------------------
 4480|      0|	  return ONIGERR_INVALID_CODE_POINT_VALUE;
  ------------------
  |  |  692|      0|#define ONIGERR_INVALID_CODE_POINT_VALUE                     -400
  ------------------
 4481|       |
 4482|      0|	if (*from > to) {
  ------------------
  |  Branch (4482:6): [True: 0, False: 0]
  ------------------
 4483|      0|	  if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC))
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4484|      0|	    goto ccs_range_end;
 4485|      0|	  else
 4486|      0|	    return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS;
  ------------------
  |  |  672|      0|#define ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS                    -203
  ------------------
 4487|      0|	}
 4488|      0|	bitset_set_range(env, cc->bs, (int )*from, (int )to);
 4489|      0|	if (IS_NOT_NULL(asc_cc))
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4490|      0|	  bitset_set_range(env, asc_cc->bs, (int )*from, (int )to);
 4491|      0|      }
 4492|      0|      else {
 4493|      0|	r = add_code_range(&(cc->mbuf), env, *from, to);
 4494|      0|	if (r < 0) return r;
  ------------------
  |  Branch (4494:6): [True: 0, False: 0]
  ------------------
 4495|      0|	if (IS_NOT_NULL(asc_cc)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4496|      0|	  r = add_code_range0(&(asc_cc->mbuf), env, *from, to, 0);
 4497|      0|	  if (r < 0) return r;
  ------------------
  |  Branch (4497:8): [True: 0, False: 0]
  ------------------
 4498|      0|	}
 4499|      0|      }
 4500|      0|    }
 4501|      0|    else {
 4502|      0|      if (*from > to) {
  ------------------
  |  Branch (4502:11): [True: 0, False: 0]
  ------------------
 4503|      0|	if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC))
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4504|      0|	  goto ccs_range_end;
 4505|      0|	else
 4506|      0|	  return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS;
  ------------------
  |  |  672|      0|#define ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS                    -203
  ------------------
 4507|      0|      }
 4508|      0|      bitset_set_range(env, cc->bs, (int )*from, (int )(to < 0xff ? to : 0xff));
  ------------------
  |  Branch (4508:57): [True: 0, False: 0]
  ------------------
 4509|      0|      r = add_code_range(&(cc->mbuf), env, (OnigCodePoint )*from, to);
 4510|      0|      if (r < 0) return r;
  ------------------
  |  Branch (4510:11): [True: 0, False: 0]
  ------------------
 4511|      0|      if (IS_NOT_NULL(asc_cc)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4512|      0|	bitset_set_range(env, asc_cc->bs, (int )*from, (int )(to < 0xff ? to : 0xff));
  ------------------
  |  Branch (4512:56): [True: 0, False: 0]
  ------------------
 4513|      0|	r = add_code_range0(&(asc_cc->mbuf), env, (OnigCodePoint )*from, to, 0);
 4514|      0|	if (r < 0) return r;
  ------------------
  |  Branch (4514:6): [True: 0, False: 0]
  ------------------
 4515|      0|      }
 4516|      0|    }
 4517|      0|  ccs_range_end:
 4518|      0|    *state = CCS_COMPLETE;
 4519|      0|    break;
 4520|       |
 4521|      0|  case CCS_COMPLETE:
  ------------------
  |  Branch (4521:3): [True: 0, False: 21.0k]
  ------------------
 4522|  4.54k|  case CCS_START:
  ------------------
  |  Branch (4522:3): [True: 4.54k, False: 16.5k]
  ------------------
 4523|  4.54k|    *state = CCS_VALUE;
 4524|  4.54k|    break;
 4525|       |
 4526|      0|  default:
  ------------------
  |  Branch (4526:3): [True: 0, False: 21.0k]
  ------------------
 4527|      0|    break;
 4528|  21.0k|  }
 4529|       |
 4530|  21.0k|  *from_israw = to_israw;
 4531|  21.0k|  *from       = to;
 4532|  21.0k|  *type       = intype;
 4533|  21.0k|  return 0;
 4534|  21.0k|}
regparse.c:next_state_class:
 4423|  1.65k|{
 4424|  1.65k|  int r;
 4425|       |
 4426|  1.65k|  if (*state == CCS_RANGE)
  ------------------
  |  Branch (4426:7): [True: 0, False: 1.65k]
  ------------------
 4427|      0|    return ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE;
  ------------------
  |  |  654|      0|#define ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE             -110
  ------------------
 4428|       |
 4429|  1.65k|  if (*state == CCS_VALUE && *type != CCV_CLASS) {
  ------------------
  |  Branch (4429:7): [True: 0, False: 1.65k]
  |  Branch (4429:30): [True: 0, False: 0]
  ------------------
 4430|      0|    if (*type == CCV_SB) {
  ------------------
  |  Branch (4430:9): [True: 0, False: 0]
  ------------------
 4431|      0|      BITSET_SET_BIT_CHKDUP(cc->bs, (int )(*vs));
  ------------------
  |  |  176|      0|#define BITSET_SET_BIT_CHKDUP(bs, pos) do { \
  |  |  177|      0|  if (BITSET_AT(bs, pos)) CC_DUP_WARN(env, pos, pos); \
  |  |  ------------------
  |  |  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  |  |  ------------------
  |  |  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  178|      0|  BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 BS_ROOM(bs, pos) |= BS_BIT(pos); \
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (179:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4432|      0|      if (IS_NOT_NULL(asc_cc))
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4433|      0|	BITSET_SET_BIT(asc_cc->bs, (int )(*vs));
  ------------------
  |  |  449|      0|#define BITSET_SET_BIT(bs, pos)     BS_ROOM(bs,pos) |= BS_BIT(pos)
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_SET_BIT(bs, pos)     BS_ROOM(bs,pos) |= BS_BIT(pos)
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4434|      0|    }
 4435|      0|    else if (*type == CCV_CODE_POINT) {
  ------------------
  |  Branch (4435:14): [True: 0, False: 0]
  ------------------
 4436|      0|      r = add_code_range(&(cc->mbuf), env, *vs, *vs);
 4437|      0|      if (r < 0) return r;
  ------------------
  |  Branch (4437:11): [True: 0, False: 0]
  ------------------
 4438|      0|      if (IS_NOT_NULL(asc_cc)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4439|      0|	r = add_code_range0(&(asc_cc->mbuf), env, *vs, *vs, 0);
 4440|      0|	if (r < 0) return r;
  ------------------
  |  Branch (4440:6): [True: 0, False: 0]
  ------------------
 4441|      0|      }
 4442|      0|    }
 4443|      0|  }
 4444|       |
 4445|  1.65k|  *state = CCS_VALUE;
 4446|  1.65k|  *type  = CCV_CLASS;
 4447|  1.65k|  return 0;
 4448|  1.65k|}
regparse.c:is_onechar_cclass:
 6078|  6.19k|{
 6079|  6.19k|  const OnigCodePoint not_found = ONIG_LAST_CODE_POINT;
  ------------------
  |  |  317|  6.19k|#define ONIG_LAST_CODE_POINT    (~((OnigCodePoint )0))
  ------------------
 6080|  6.19k|  OnigCodePoint c = not_found;
 6081|  6.19k|  int i;
 6082|  6.19k|  BBuf *bbuf = cc->mbuf;
 6083|       |
 6084|  6.19k|  if (IS_NCCLASS_NOT(cc)) return 0;
  ------------------
  |  |  809|  6.19k|#define IS_NCCLASS_NOT(nd)      IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
  |  |  ------------------
  |  |  |  |  802|  6.19k|#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  799|  6.19k|#define NCCLASS_FLAGS(cc)           ((cc)->flags)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (802:37): [True: 2.47k, False: 3.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6085|       |
 6086|       |  /* check bbuf */
 6087|  3.71k|  if (IS_NOT_NULL(bbuf)) {
  ------------------
  |  |  312|  3.71k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 3.71k]
  |  |  ------------------
  ------------------
 6088|      0|    OnigCodePoint n, *data;
 6089|      0|    GET_CODE_POINT(n, bbuf->p);
  ------------------
  |  |  710|      0|#define GET_CODE_POINT(code,p)   code = *((OnigCodePoint* )(p))
  ------------------
 6090|      0|    data = (OnigCodePoint* )(bbuf->p) + 1;
 6091|      0|    if ((n == 1) && (data[0] == data[1])) {
  ------------------
  |  Branch (6091:9): [True: 0, False: 0]
  |  Branch (6091:21): [True: 0, False: 0]
  ------------------
 6092|       |      /* only one char found in the bbuf, save the code point. */
 6093|      0|      c = data[0];
 6094|      0|      if (((c < SINGLE_BYTE_SIZE) && BITSET_AT(cc->bs, c))) {
  ------------------
  |  |  426|      0|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
                    if (((c < SINGLE_BYTE_SIZE) && BITSET_AT(cc->bs, c))) {
  ------------------
  |  |  448|      0|#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  445|      0|#define BS_ROOM(bs,pos)            (bs)[(int )(pos) / BITS_IN_ROOM]
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
  |  |  ------------------
  |  |  |  |  446|      0|#define BS_BIT(pos)                (1U << ((int )(pos) % BITS_IN_ROOM))
  |  |  |  |  ------------------
  |  |  |  |  |  |  427|      0|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  425|      0|#define BITS_PER_BYTE      8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (448:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6094:12): [True: 0, False: 0]
  ------------------
 6095|       |	/* skip if c is included in the bitset */
 6096|      0|	c = not_found;
 6097|      0|      }
 6098|      0|    }
 6099|      0|    else {
 6100|      0|      return 0;  /* the bbuf contains multiple chars */
 6101|      0|    }
 6102|      0|  }
 6103|       |
 6104|       |  /* check bitset */
 6105|  6.60k|  for (i = 0; i < BITSET_SIZE; i++) {
  ------------------
  |  |  428|  6.60k|#define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
  |  |  ------------------
  |  |  |  |  426|  6.60k|#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  425|  6.60k|#define BITS_PER_BYTE      8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
  |  |  ------------------
  |  |  |  |  427|  6.60k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  425|  6.60k|#define BITS_PER_BYTE      8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6105:15): [True: 6.60k, False: 0]
  ------------------
 6106|  6.60k|    Bits b1 = cc->bs[i];
 6107|  6.60k|    if (b1 != 0) {
  ------------------
  |  Branch (6107:9): [True: 6.60k, False: 0]
  ------------------
 6108|  6.60k|      if (((b1 & (b1 - 1)) == 0) && (c == not_found)) {
  ------------------
  |  Branch (6108:11): [True: 5.78k, False: 826]
  |  Branch (6108:37): [True: 2.89k, False: 2.89k]
  ------------------
 6109|  2.89k|	c = BITS_IN_ROOM * i + countbits(b1 - 1);
  ------------------
  |  |  427|  2.89k|#define BITS_IN_ROOM       ((int )sizeof(Bits) * BITS_PER_BYTE)
  |  |  ------------------
  |  |  |  |  425|  2.89k|#define BITS_PER_BYTE      8
  |  |  ------------------
  ------------------
 6110|  3.71k|      } else {
 6111|  3.71k|	return 0;  /* the character class contains multiple chars */
 6112|  3.71k|      }
 6113|  6.60k|    }
 6114|  6.60k|  }
 6115|       |
 6116|      0|  if (c != not_found) {
  ------------------
  |  Branch (6116:7): [True: 0, False: 0]
  ------------------
 6117|      0|    *code = c;
 6118|      0|    return 1;
 6119|      0|  }
 6120|       |
 6121|       |  /* the character class contains no char. */
 6122|      0|  return 0;
 6123|      0|}
regparse.c:countbits:
 6068|  2.89k|{
 6069|  2.89k|  bits = (bits & 0x55555555) + ((bits >> 1) & 0x55555555);
 6070|  2.89k|  bits = (bits & 0x33333333) + ((bits >> 2) & 0x33333333);
 6071|  2.89k|  bits = (bits & 0x0f0f0f0f) + ((bits >> 4) & 0x0f0f0f0f);
 6072|  2.89k|  bits = (bits & 0x00ff00ff) + ((bits >> 8) & 0x00ff00ff);
 6073|  2.89k|  return (bits & 0x0000ffff) + ((bits >>16) & 0x0000ffff);
 6074|  2.89k|}
regparse.c:node_new_anychar:
 1165|  4.13k|{
 1166|  4.13k|  Node* node = node_new();
 1167|  4.13k|  CHECK_NULL_RETURN(node);
  ------------------
  |  |  313|  4.13k|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|  4.13k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 4.13k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1168|       |
 1169|  4.13k|  SET_NTYPE(node, NT_CANY);
  ------------------
  |  |   71|  4.13k|    do { \
  |  |   72|  4.13k|	int value = ntype; \
  |  |   73|  4.13k|	memcpy(&((node)->u.base.type), &value, sizeof(int)); \
  |  |   74|  4.13k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (74:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1170|  4.13k|  return node;
 1171|  4.13k|}
regparse.c:node_new_quantifier:
 1305|  12.3k|{
 1306|  12.3k|  Node* node = node_new();
 1307|  12.3k|  CHECK_NULL_RETURN(node);
  ------------------
  |  |  313|  12.3k|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|  12.3k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 12.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1308|       |
 1309|  12.3k|  SET_NTYPE(node, NT_QTFR);
  ------------------
  |  |   71|  12.3k|    do { \
  |  |   72|  12.3k|	int value = ntype; \
  |  |   73|  12.3k|	memcpy(&((node)->u.base.type), &value, sizeof(int)); \
  |  |   74|  12.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (74:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1310|  12.3k|  NQTFR(node)->state  = 0;
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 1311|  12.3k|  NQTFR(node)->target = NULL;
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 1312|  12.3k|  NQTFR(node)->lower  = lower;
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 1313|  12.3k|  NQTFR(node)->upper  = upper;
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 1314|  12.3k|  NQTFR(node)->greedy = 1;
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 1315|  12.3k|  NQTFR(node)->target_empty_info = NQ_TARGET_ISNOT_EMPTY;
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
                NQTFR(node)->target_empty_info = NQ_TARGET_ISNOT_EMPTY;
  ------------------
  |  |  122|  12.3k|#define NQ_TARGET_ISNOT_EMPTY     0
  ------------------
 1316|  12.3k|  NQTFR(node)->head_exact        = NULL_NODE;
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
                NQTFR(node)->head_exact        = NULL_NODE;
  ------------------
  |  |  283|  12.3k|#define NULL_NODE  ((Node* )0)
  ------------------
 1317|  12.3k|  NQTFR(node)->next_head_exact   = NULL_NODE;
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
                NQTFR(node)->next_head_exact   = NULL_NODE;
  ------------------
  |  |  283|  12.3k|#define NULL_NODE  ((Node* )0)
  ------------------
 1318|  12.3k|  NQTFR(node)->is_referred       = 0;
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 1319|  12.3k|  if (by_number != 0)
  ------------------
  |  Branch (1319:7): [True: 0, False: 12.3k]
  ------------------
 1320|      0|    NQTFR(node)->state |= NST_BY_NUMBER;
  ------------------
  |  |   80|      0|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
                  NQTFR(node)->state |= NST_BY_NUMBER;
  ------------------
  |  |  142|      0|#define NST_BY_NUMBER             (1<<14) /* {n,m} */
  ------------------
 1321|       |
 1322|       |#ifdef USE_COMBINATION_EXPLOSION_CHECK
 1323|       |  NQTFR(node)->comb_exp_check_num = 0;
 1324|       |#endif
 1325|       |
 1326|  12.3k|  return node;
 1327|  12.3k|}
regparse.c:set_quantifier:
 5403|  12.3k|{
 5404|  12.3k|  QtfrNode* qn;
 5405|       |
 5406|  12.3k|  qn = NQTFR(qnode);
  ------------------
  |  |   80|  12.3k|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 5407|  12.3k|  if (qn->lower == 1 && qn->upper == 1) {
  ------------------
  |  Branch (5407:7): [True: 7.43k, False: 4.95k]
  |  Branch (5407:25): [True: 0, False: 7.43k]
  ------------------
 5408|      0|    return 1;
 5409|      0|  }
 5410|       |
 5411|  12.3k|  switch (NTYPE(target)) {
  ------------------
  |  |   69|  12.3k|#define NTYPE(node)             ((node)->u.base.type)
  ------------------
 5412|    413|  case NT_STR:
  ------------------
  |  |   38|    413|#define NT_STR         0
  ------------------
  |  Branch (5412:3): [True: 413, False: 11.9k]
  ------------------
 5413|    413|    if (! group) {
  ------------------
  |  Branch (5413:9): [True: 0, False: 413]
  ------------------
 5414|      0|      StrNode* sn = NSTR(target);
  ------------------
  |  |   76|      0|#define NSTR(node)         (&((node)->u.str))
  ------------------
 5415|      0|      if (str_node_can_be_split(sn, env->enc)) {
  ------------------
  |  Branch (5415:11): [True: 0, False: 0]
  ------------------
 5416|      0|	Node* n = str_node_split_last_char(sn, env->enc);
 5417|      0|	if (IS_NOT_NULL(n)) {
  ------------------
  |  |  312|      0|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  ------------------
  |  |  |  Branch (312:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5418|      0|	  qn->target = n;
 5419|      0|	  return 2;
 5420|      0|	}
 5421|      0|      }
 5422|      0|    }
 5423|    413|    break;
 5424|       |
 5425|    413|  case NT_QTFR:
  ------------------
  |  |   43|      0|#define NT_QTFR        5
  ------------------
  |  Branch (5425:3): [True: 0, False: 12.3k]
  ------------------
 5426|      0|    { /* check redundant double repeat. */
 5427|       |      /* verbose warn (?:.?)? etc... but not warn (.?)? etc... */
 5428|      0|      QtfrNode* qnt   = NQTFR(target);
  ------------------
  |  |   80|      0|#define NQTFR(node)        (&((node)->u.qtfr))
  ------------------
 5429|      0|      int nestq_num   = popular_quantifier_num(qn);
 5430|      0|      int targetq_num = popular_quantifier_num(qnt);
 5431|       |
 5432|      0|#ifdef USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR
 5433|      0|      if (nestq_num >= 0 && targetq_num >= 0 &&
  ------------------
  |  Branch (5433:11): [True: 0, False: 0]
  |  Branch (5433:29): [True: 0, False: 0]
  ------------------
 5434|      0|	  IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT)) {
  ------------------
  |  |  332|      0|#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)
  |  |  ------------------
  |  |  |  Branch (332:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5435|      0|	switch (ReduceTypeTable[targetq_num][nestq_num]) {
 5436|      0|	case RQ_ASIS:
  ------------------
  |  Branch (5436:2): [True: 0, False: 0]
  ------------------
 5437|      0|	  break;
 5438|       |
 5439|      0|	case RQ_DEL:
  ------------------
  |  Branch (5439:2): [True: 0, False: 0]
  ------------------
 5440|      0|	  if (onig_warn != onig_null_warn) {
  ------------------
  |  Branch (5440:8): [True: 0, False: 0]
  ------------------
 5441|      0|	    onig_syntax_warn(env, "regular expression has redundant nested repeat operator '%s'",
 5442|      0|		PopularQStr[targetq_num]);
 5443|      0|	  }
 5444|      0|	  goto warn_exit;
 5445|      0|	  break;
 5446|       |
 5447|      0|	default:
  ------------------
  |  Branch (5447:2): [True: 0, False: 0]
  ------------------
 5448|      0|	  if (onig_warn != onig_null_warn) {
  ------------------
  |  Branch (5448:8): [True: 0, False: 0]
  ------------------
 5449|      0|	    onig_syntax_warn(env, "nested repeat operator '%s' and '%s' was replaced with '%s' in regular expression",
 5450|      0|		PopularQStr[targetq_num], PopularQStr[nestq_num],
 5451|      0|		ReduceQStr[ReduceTypeTable[targetq_num][nestq_num]]);
 5452|      0|	  }
 5453|      0|	  goto warn_exit;
 5454|      0|	  break;
 5455|      0|	}
 5456|      0|      }
 5457|       |
 5458|      0|    warn_exit:
 5459|      0|#endif
 5460|      0|      if (targetq_num >= 0) {
  ------------------
  |  Branch (5460:11): [True: 0, False: 0]
  ------------------
 5461|      0|	if (nestq_num >= 0) {
  ------------------
  |  Branch (5461:6): [True: 0, False: 0]
  ------------------
 5462|      0|	  onig_reduce_nested_quantifier(qnode, target);
 5463|      0|	  goto q_exit;
 5464|      0|	}
 5465|      0|	else if (targetq_num == 1 || targetq_num == 2) { /* * or + */
  ------------------
  |  Branch (5465:11): [True: 0, False: 0]
  |  Branch (5465:31): [True: 0, False: 0]
  ------------------
 5466|       |	  /* (?:a*){n,m}, (?:a+){n,m} => (?:a*){n,n}, (?:a+){n,n} */
 5467|      0|	  if (! IS_REPEAT_INFINITE(qn->upper) && qn->upper > 1 && qn->greedy) {
  ------------------
  |  |  422|      0|#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
  |  |  ------------------
  |  |  |  |  421|      0|#define REPEAT_INFINITE         -1
  |  |  ------------------
  ------------------
  |  Branch (5467:8): [True: 0, False: 0]
  |  Branch (5467:43): [True: 0, False: 0]
  |  Branch (5467:60): [True: 0, False: 0]
  ------------------
 5468|      0|	    qn->upper = (qn->lower == 0 ? 1 : qn->lower);
  ------------------
  |  Branch (5468:19): [True: 0, False: 0]
  ------------------
 5469|      0|	  }
 5470|      0|	}
 5471|      0|      }
 5472|      0|    }
 5473|      0|    break;
 5474|       |
 5475|  11.9k|  default:
  ------------------
  |  Branch (5475:3): [True: 11.9k, False: 413]
  ------------------
 5476|  11.9k|    break;
 5477|  12.3k|  }
 5478|       |
 5479|  12.3k|  qn->target = target;
 5480|  12.3k| q_exit:
 5481|  12.3k|  return 0;
 5482|  12.3k|}
regparse.c:node_new_enclose_memory:
 1354|  2.06k|{
 1355|  2.06k|  Node* node = node_new_enclose(ENCLOSE_MEMORY);
  ------------------
  |  |   94|  2.06k|#define ENCLOSE_MEMORY           (1<<0)
  ------------------
 1356|  2.06k|  CHECK_NULL_RETURN(node);
  ------------------
  |  |  313|  2.06k|#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
  |  |  ------------------
  |  |  |  |  311|  2.06k|#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:39): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1357|  2.06k|  if (is_named != 0)
  ------------------
  |  Branch (1357:7): [True: 1.65k, False: 413]
  ------------------
 1358|  1.65k|    SET_ENCLOSE_STATUS(node, NST_NAMED_GROUP);
  ------------------
  |  |  144|  1.65k|#define SET_ENCLOSE_STATUS(node,f)      (node)->u.enclose.state |=  (f)
  ------------------
 1359|       |
 1360|  2.06k|#ifdef USE_SUBEXP_CALL
 1361|  2.06k|  NENCLOSE(node)->option = option;
  ------------------
  |  |   81|  2.06k|#define NENCLOSE(node)     (&((node)->u.enclose))
  ------------------
 1362|  2.06k|#endif
 1363|  2.06k|  return node;
 1364|  2.06k|}
regparse.c:scan_env_set_mem_node:
 1052|  2.06k|{
 1053|  2.06k|  if (env->num_mem >= num)
  ------------------
  |  Branch (1053:7): [True: 2.06k, False: 0]
  ------------------
 1054|  2.06k|    SCANENV_MEM_NODES(env)[num] = node;
  ------------------
  |  |  287|  2.06k| (IS_NOT_NULL((senv)->mem_nodes_dynamic) ? \
  |  |  ------------------
  |  |  |  |  312|  2.06k|#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (312:39): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  288|  2.06k|    (senv)->mem_nodes_dynamic : (senv)->mem_nodes_static)
  ------------------
 1055|      0|  else
 1056|      0|    return ONIGERR_PARSER_BUG;
  ------------------
  |  |  634|      0|#define ONIGERR_PARSER_BUG                                    -11
  ------------------
 1057|  2.06k|  return 0;
 1058|  2.06k|}

onig_st_init_table_with_size:
  582|    413|{
  583|    413|    st_table *tab;
  584|    413|    int n;
  585|       |
  586|       |#ifdef HASH_LOG
  587|       |#if HASH_LOG+0 < 0
  588|       |    {
  589|       |        const char *e = getenv("ST_HASH_LOG");
  590|       |        if (!e || !*e) init_st = 1;
  591|       |    }
  592|       |#endif
  593|       |    if (init_st == 0) {
  594|       |        init_st = 1;
  595|       |        atexit(stat_col);
  596|       |    }
  597|       |#endif
  598|       |
  599|    413|    n = get_power2(size);
  600|    413|#ifndef RUBY
  601|    413|    if (n < 0)
  ------------------
  |  Branch (601:9): [True: 0, False: 413]
  ------------------
  602|      0|        return NULL;
  603|    413|#endif
  604|    413|    tab = (st_table *) malloc(sizeof (st_table));
  605|    413|#ifndef RUBY
  606|    413|    if (tab == NULL)
  ------------------
  |  Branch (606:9): [True: 0, False: 413]
  ------------------
  607|      0|        return NULL;
  608|    413|#endif
  609|    413|    tab->type = type;
  610|    413|    tab->entry_power = n;
  611|    413|    tab->bin_power = features[n].bin_power;
  612|    413|    tab->size_ind = features[n].size_ind;
  613|    413|    if (n <= MAX_POWER2_FOR_TABLES_WITHOUT_BINS)
  ------------------
  |  |  343|    413|#define MAX_POWER2_FOR_TABLES_WITHOUT_BINS 4
  ------------------
  |  Branch (613:9): [True: 413, False: 0]
  ------------------
  614|    413|        tab->bins = NULL;
  615|      0|    else {
  616|      0|        tab->bins = (st_index_t *) malloc(bins_size(tab));
  617|      0|#ifndef RUBY
  618|      0|        if (tab->bins == NULL) {
  ------------------
  |  Branch (618:13): [True: 0, False: 0]
  ------------------
  619|      0|            free(tab);
  620|      0|            return NULL;
  621|      0|        }
  622|      0|#endif
  623|      0|    }
  624|    413|    tab->entries = (st_table_entry *) malloc(get_allocated_entries(tab)
  625|    413|					     * sizeof(st_table_entry));
  626|    413|#ifndef RUBY
  627|    413|    if (tab->entries == NULL) {
  ------------------
  |  Branch (627:9): [True: 0, False: 413]
  ------------------
  628|      0|        st_free_table(tab);
  ------------------
  |  |  193|      0|# define st_free_table                  onig_st_free_table
  ------------------
  629|      0|        return NULL;
  630|      0|    }
  631|    413|#endif
  632|       |#ifdef ST_DEBUG
  633|       |    memset(tab->entries, ST_INIT_VAL_BYTE,
  634|       |	   get_allocated_entries(tab) * sizeof(st_table_entry));
  635|       |    if (tab->bins != NULL)
  636|       |        memset(tab->bins, ST_INIT_VAL_BYTE, bins_size(tab));
  637|       |#endif
  638|    413|    make_tab_empty(tab);
  639|    413|    tab->rebuilds_num = 0;
  640|       |#ifdef ST_DEBUG
  641|       |    st_check(tab);
  642|       |#endif
  643|    413|    return tab;
  644|    413|}
onig_st_free_table:
  716|    413|{
  717|    413|    if (tab->bins != NULL)
  ------------------
  |  Branch (717:9): [True: 0, False: 413]
  ------------------
  718|      0|        free(tab->bins);
  719|    413|    free(tab->entries);
  720|    413|    free(tab);
  721|    413|}
onig_st_lookup:
 1110|  1.23k|{
 1111|  1.23k|    st_index_t bin;
 1112|  1.23k|    st_hash_t hash = do_hash(key, tab);
 1113|       |
 1114|  1.23k| retry:
 1115|  1.23k|    if (tab->bins == NULL) {
  ------------------
  |  Branch (1115:9): [True: 1.23k, False: 0]
  ------------------
 1116|  1.23k|        bin = find_entry(tab, hash, key);
 1117|  1.23k|	if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
  ------------------
  |  |  117|  1.23k|#define EXPECT(expr, val) __builtin_expect(expr, val)
  |  |  ------------------
  |  |  |  Branch (117:27): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
 1118|      0|	    goto retry;
 1119|  1.23k|	if (bin == UNDEFINED_ENTRY_IND)
  ------------------
  |  |  399|  1.23k|#define UNDEFINED_ENTRY_IND (~(st_index_t) 0)
  ------------------
  |  Branch (1119:6): [True: 1.23k, False: 0]
  ------------------
 1120|  1.23k|	    return 0;
 1121|  1.23k|    }
 1122|      0|    else {
 1123|      0|        bin = find_table_entry_ind(tab, hash, key);
 1124|      0|	if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
  ------------------
  |  |  117|      0|#define EXPECT(expr, val) __builtin_expect(expr, val)
  |  |  ------------------
  |  |  |  Branch (117:27): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1125|      0|	    goto retry;
 1126|      0|	if (bin == UNDEFINED_ENTRY_IND)
  ------------------
  |  |  399|      0|#define UNDEFINED_ENTRY_IND (~(st_index_t) 0)
  ------------------
  |  Branch (1126:6): [True: 0, False: 0]
  ------------------
 1127|      0|	    return 0;
 1128|      0|	bin -= ENTRY_BASE;
  ------------------
  |  |  391|      0|#define ENTRY_BASE 2
  ------------------
 1129|      0|    }
 1130|      0|    if (value != 0)
  ------------------
  |  Branch (1130:9): [True: 0, False: 0]
  ------------------
 1131|      0|        *value = tab->entries[bin].record;
 1132|      0|    return 1;
 1133|  1.23k|}
onig_st_insert:
 1182|  1.65k|{
 1183|  1.65k|    st_table_entry *entry;
 1184|  1.65k|    st_index_t bin;
 1185|  1.65k|    st_index_t ind;
 1186|  1.65k|    st_hash_t hash_value;
 1187|  1.65k|    st_index_t bin_ind;
 1188|  1.65k|    int new_p;
 1189|       |
 1190|  1.65k|    hash_value = do_hash(key, tab);
 1191|  1.65k| retry:
 1192|  1.65k|    rebuild_table_if_necessary(tab);
 1193|  1.65k|    if (tab->bins == NULL) {
  ------------------
  |  Branch (1193:9): [True: 1.65k, False: 0]
  ------------------
 1194|  1.65k|        bin = find_entry(tab, hash_value, key);
 1195|  1.65k|	if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
  ------------------
  |  |  117|  1.65k|#define EXPECT(expr, val) __builtin_expect(expr, val)
  |  |  ------------------
  |  |  |  Branch (117:27): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
 1196|      0|	    goto retry;
 1197|  1.65k|	new_p = bin == UNDEFINED_ENTRY_IND;
  ------------------
  |  |  399|  1.65k|#define UNDEFINED_ENTRY_IND (~(st_index_t) 0)
  ------------------
 1198|  1.65k|	if (new_p)
  ------------------
  |  Branch (1198:6): [True: 1.65k, False: 0]
  ------------------
 1199|  1.65k|	    tab->num_entries++;
 1200|  1.65k|	bin_ind = UNDEFINED_BIN_IND;
  ------------------
  |  |  400|  1.65k|#define UNDEFINED_BIN_IND (~(st_index_t) 0)
  ------------------
 1201|  1.65k|    }
 1202|      0|    else {
 1203|      0|        bin = find_table_bin_ptr_and_reserve(tab, &hash_value,
 1204|      0|					     key, &bin_ind);
 1205|      0|	if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
  ------------------
  |  |  117|      0|#define EXPECT(expr, val) __builtin_expect(expr, val)
  |  |  ------------------
  |  |  |  Branch (117:27): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1206|      0|	    goto retry;
 1207|      0|	new_p = bin == UNDEFINED_ENTRY_IND;
  ------------------
  |  |  399|      0|#define UNDEFINED_ENTRY_IND (~(st_index_t) 0)
  ------------------
 1208|      0|	bin -= ENTRY_BASE;
  ------------------
  |  |  391|      0|#define ENTRY_BASE 2
  ------------------
 1209|      0|    }
 1210|  1.65k|    if (new_p) {
  ------------------
  |  Branch (1210:9): [True: 1.65k, False: 0]
  ------------------
 1211|  1.65k|        st_assert(tab->entries_bound < get_allocated_entries(tab));
  ------------------
  |  |  128|  1.65k|#define st_assert(cond) ((void)(0 && (cond)))
  |  |  ------------------
  |  |  |  Branch (128:33): [Folded - Ignored]
  |  |  |  Branch (128:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1212|  1.65k|	ind = tab->entries_bound++;
 1213|  1.65k|        entry = &tab->entries[ind];
 1214|  1.65k|        entry->hash = hash_value;
 1215|  1.65k|        entry->key = key;
 1216|  1.65k|        entry->record = value;
 1217|  1.65k|	if (bin_ind != UNDEFINED_BIN_IND)
  ------------------
  |  |  400|  1.65k|#define UNDEFINED_BIN_IND (~(st_index_t) 0)
  ------------------
  |  Branch (1217:6): [True: 0, False: 1.65k]
  ------------------
 1218|      0|	    set_bin(tab->bins, get_size_ind(tab), bin_ind, ind + ENTRY_BASE);
  ------------------
  |  |  391|      0|#define ENTRY_BASE 2
  ------------------
 1219|       |#ifdef ST_DEBUG
 1220|       |	st_check(tab);
 1221|       |#endif
 1222|  1.65k|        return 0;
 1223|  1.65k|    }
 1224|      0|    tab->entries[bin].record = value;
 1225|       |#ifdef ST_DEBUG
 1226|       |    st_check(tab);
 1227|       |#endif
 1228|      0|    return 1;
 1229|  1.65k|}
onig_st_foreach:
 1723|    413|{
 1724|    413|    return st_general_foreach(tab, func, NULL, arg, FALSE);
  ------------------
  |  |   77|    413|# define FALSE   0
  ------------------
 1725|    413|}
st.c:get_power2:
  348|    413|{
  349|    413|    unsigned int n;
  350|       |
  351|  1.65k|    for (n = 0; size != 0; n++)
  ------------------
  |  Branch (351:17): [True: 1.23k, False: 413]
  ------------------
  352|  1.23k|        size >>= 1;
  353|    413|    if (n <= MAX_POWER2)
  ------------------
  |  |  210|    413|#define MAX_POWER2 62
  ------------------
  |  Branch (353:9): [True: 413, False: 0]
  ------------------
  354|    413|        return n < MINIMAL_POWER2 ? MINIMAL_POWER2 : n;
  ------------------
  |  |  335|    413|#define MINIMAL_POWER2 2
  ------------------
                      return n < MINIMAL_POWER2 ? MINIMAL_POWER2 : n;
  ------------------
  |  |  335|      0|#define MINIMAL_POWER2 2
  ------------------
  |  Branch (354:16): [True: 0, False: 413]
  ------------------
  355|       |#ifdef RUBY
  356|       |    /* Ran out of the table entries */
  357|       |    rb_raise(rb_eRuntimeError, "st_table too big");
  358|       |#endif
  359|       |    /* should raise exception */
  360|      0|    return -1;
  361|    413|}
st.c:get_allocated_entries:
  466|  2.06k|{
  467|  2.06k|    return ((st_index_t) 1)<<tab->entry_power;
  468|  2.06k|}
st.c:make_tab_empty:
  487|    413|{
  488|    413|    tab->num_entries = 0;
  489|    413|    tab->entries_start = tab->entries_bound = 0;
  490|    413|    if (tab->bins != NULL)
  ------------------
  |  Branch (490:9): [True: 0, False: 413]
  ------------------
  491|      0|        initialize_bins(tab);
  492|    413|}
st.c:do_hash:
  326|  2.89k|{
  327|  2.89k|    st_hash_t hash = (st_hash_t)(tab->type->hash)(key);
  328|       |
  329|       |    /* RESERVED_HASH_VAL is used for a deleted entry.  Map it into
  330|       |       another value.  Such mapping should be extremely rare.  */
  331|  2.89k|    return hash == RESERVED_HASH_VAL ? RESERVED_HASH_SUBSTITUTION_VAL : hash;
  ------------------
  |  |  317|  2.89k|#define RESERVED_HASH_VAL (~(st_hash_t) 0)
  ------------------
                  return hash == RESERVED_HASH_VAL ? RESERVED_HASH_SUBSTITUTION_VAL : hash;
  ------------------
  |  |  318|      0|#define RESERVED_HASH_SUBSTITUTION_VAL ((st_hash_t) 0)
  ------------------
  |  Branch (331:12): [True: 0, False: 2.89k]
  ------------------
  332|  2.89k|}
st.c:find_entry:
  881|  4.54k|{
  882|  4.54k|    int eq_p, rebuilt_p;
  883|  4.54k|    st_index_t i, bound;
  884|  4.54k|    st_table_entry *entries;
  885|       |
  886|  4.54k|    bound = tab->entries_bound;
  887|  4.54k|    entries = tab->entries;
  888|  9.49k|    for (i = tab->entries_start; i < bound; i++) {
  ------------------
  |  Branch (888:34): [True: 6.60k, False: 2.89k]
  ------------------
  889|  6.60k|	DO_PTR_EQUAL_CHECK(tab, &entries[i], hash_value, key, eq_p, rebuilt_p);
  ------------------
  |  |  187|  6.60k|    do {							    \
  |  |  188|  6.60k|	unsigned int _old_rebuilds_num = (tab)->rebuilds_num;       \
  |  |  189|  6.60k|	res = PTR_EQUAL(tab, ptr, hash_val, key);		    \
  |  |  ------------------
  |  |  |  |  182|  6.60k|    ((ptr)->hash == (hash_val) && EQUAL((tab), (key_), (ptr)->key))
  |  |  |  |  ------------------
  |  |  |  |  |  |  180|  1.65k|#define EQUAL(tab,x,y) ((x) == (y) || (*(tab)->type->compare)((x),(y)) == 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (180:25): [True: 1.65k, False: 0]
  |  |  |  |  |  |  |  Branch (180:39): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:6): [True: 1.65k, False: 4.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  190|  6.60k|	rebuilt_p = _old_rebuilds_num != (tab)->rebuilds_num;	    \
  |  |  191|  6.60k|    } while (FALSE)
  |  |  ------------------
  |  |  |  |   77|  6.60k|# define FALSE   0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (77:18): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  890|  6.60k|	if (EXPECT(rebuilt_p, 0))
  ------------------
  |  |  117|  6.60k|#define EXPECT(expr, val) __builtin_expect(expr, val)
  |  |  ------------------
  |  |  |  Branch (117:27): [True: 0, False: 6.60k]
  |  |  ------------------
  ------------------
  891|      0|	    return REBUILT_TABLE_ENTRY_IND;
  ------------------
  |  |  404|      0|#define REBUILT_TABLE_ENTRY_IND (~(st_index_t) 1)
  ------------------
  892|  6.60k|	if (eq_p)
  ------------------
  |  Branch (892:6): [True: 1.65k, False: 4.95k]
  ------------------
  893|  1.65k|	    return i;
  894|  6.60k|    }
  895|  2.89k|    return UNDEFINED_ENTRY_IND;
  ------------------
  |  |  399|  2.89k|#define UNDEFINED_ENTRY_IND (~(st_index_t) 0)
  ------------------
  896|  4.54k|}
st.c:rebuild_table_if_necessary:
 1169|  1.65k|{
 1170|  1.65k|    st_index_t bound = tab->entries_bound;
 1171|       |
 1172|  1.65k|    if (bound == get_allocated_entries(tab))
  ------------------
  |  Branch (1172:9): [True: 0, False: 1.65k]
  ------------------
 1173|      0|        rebuild_table(tab);
 1174|  1.65k|    st_assert(tab->entries_bound < get_allocated_entries(tab));
  ------------------
  |  |  128|  1.65k|#define st_assert(cond) ((void)(0 && (cond)))
  |  |  ------------------
  |  |  |  Branch (128:33): [Folded - Ignored]
  |  |  |  Branch (128:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1175|  1.65k|}
st.c:st_general_foreach:
 1605|    413|{
 1606|    413|    st_index_t bin;
 1607|    413|    st_index_t bin_ind;
 1608|    413|    st_table_entry *entries, *curr_entry_ptr;
 1609|    413|    enum st_retval retval;
 1610|    413|    st_index_t i, rebuilds_num;
 1611|    413|    st_hash_t hash;
 1612|    413|    st_data_t key;
 1613|    413|    int error_p, packed_p = tab->bins == NULL;
 1614|       |
 1615|    413|    st_assert(tab->entries_start <= tab->entries_bound);
  ------------------
  |  |  128|    413|#define st_assert(cond) ((void)(0 && (cond)))
  |  |  ------------------
  |  |  |  Branch (128:33): [Folded - Ignored]
  |  |  |  Branch (128:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1616|    413|    entries = tab->entries;
 1617|       |    /* The bound can change inside the loop even without rebuilding
 1618|       |       the table, e.g. by an entry inesrtion.  */
 1619|  2.06k|    for (i = tab->entries_start; i < tab->entries_bound; i++) {
  ------------------
  |  Branch (1619:34): [True: 1.65k, False: 413]
  ------------------
 1620|  1.65k|        curr_entry_ptr = &entries[i];
 1621|  1.65k|	if (EXPECT(DELETED_ENTRY_P(curr_entry_ptr), 0))
  ------------------
  |  |  117|  1.65k|#define EXPECT(expr, val) __builtin_expect(expr, val)
  |  |  ------------------
  |  |  |  Branch (117:27): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
 1622|      0|	    continue;
 1623|  1.65k|	key = curr_entry_ptr->key;
 1624|  1.65k|	rebuilds_num = tab->rebuilds_num;
 1625|  1.65k|	hash = curr_entry_ptr->hash;
 1626|  1.65k|	retval = (*func)(key, curr_entry_ptr->record, arg, 0);
 1627|       |
 1628|  1.65k|        if (retval == ST_REPLACE && replace) {
  ------------------
  |  Branch (1628:13): [True: 0, False: 1.65k]
  |  Branch (1628:37): [True: 0, False: 0]
  ------------------
 1629|      0|            st_data_t value;
 1630|      0|            value = curr_entry_ptr->record;
 1631|      0|            retval = (*replace)(&key, &value, arg, TRUE);
  ------------------
  |  |   73|      0|# define TRUE    1
  ------------------
 1632|      0|            curr_entry_ptr->key = key;
 1633|      0|            curr_entry_ptr->record = value;
 1634|      0|        }
 1635|       |
 1636|  1.65k|	if (rebuilds_num != tab->rebuilds_num) {
  ------------------
  |  Branch (1636:6): [True: 0, False: 1.65k]
  ------------------
 1637|      0|	retry:
 1638|      0|	    entries = tab->entries;
 1639|      0|	    packed_p = tab->bins == NULL;
 1640|      0|	    if (packed_p) {
  ------------------
  |  Branch (1640:10): [True: 0, False: 0]
  ------------------
 1641|      0|	        i = find_entry(tab, hash, key);
 1642|      0|		if (EXPECT(i == REBUILT_TABLE_ENTRY_IND, 0))
  ------------------
  |  |  117|      0|#define EXPECT(expr, val) __builtin_expect(expr, val)
  |  |  ------------------
  |  |  |  Branch (117:27): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1643|      0|		    goto retry;
 1644|      0|		error_p = i == UNDEFINED_ENTRY_IND;
  ------------------
  |  |  399|      0|#define UNDEFINED_ENTRY_IND (~(st_index_t) 0)
  ------------------
 1645|      0|	    }
 1646|      0|	    else {
 1647|      0|	        i = find_table_entry_ind(tab, hash, key);
 1648|      0|		if (EXPECT(i == REBUILT_TABLE_ENTRY_IND, 0))
  ------------------
  |  |  117|      0|#define EXPECT(expr, val) __builtin_expect(expr, val)
  |  |  ------------------
  |  |  |  Branch (117:27): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1649|      0|		    goto retry;
 1650|      0|		error_p = i == UNDEFINED_ENTRY_IND;
  ------------------
  |  |  399|      0|#define UNDEFINED_ENTRY_IND (~(st_index_t) 0)
  ------------------
 1651|      0|		i -= ENTRY_BASE;
  ------------------
  |  |  391|      0|#define ENTRY_BASE 2
  ------------------
 1652|      0|	    }
 1653|      0|	    if (error_p && check_p) {
  ------------------
  |  Branch (1653:10): [True: 0, False: 0]
  |  Branch (1653:21): [True: 0, False: 0]
  ------------------
 1654|       |	        /* call func with error notice */
 1655|      0|	        retval = (*func)(0, 0, arg, 1);
 1656|       |#ifdef ST_DEBUG
 1657|       |		st_check(tab);
 1658|       |#endif
 1659|      0|		return 1;
 1660|      0|	    }
 1661|      0|	    curr_entry_ptr = &entries[i];
 1662|      0|	}
 1663|  1.65k|	switch (retval) {
  ------------------
  |  Branch (1663:10): [True: 0, False: 1.65k]
  ------------------
 1664|      0|          case ST_REPLACE:
  ------------------
  |  Branch (1664:11): [True: 0, False: 1.65k]
  ------------------
 1665|      0|            break;
 1666|      0|	  case ST_CONTINUE:
  ------------------
  |  Branch (1666:4): [True: 0, False: 1.65k]
  ------------------
 1667|      0|	    break;
 1668|      0|	  case ST_CHECK:
  ------------------
  |  Branch (1668:4): [True: 0, False: 1.65k]
  ------------------
 1669|      0|	    if (check_p)
  ------------------
  |  Branch (1669:10): [True: 0, False: 0]
  ------------------
 1670|      0|		break;
 1671|      0|	  case ST_STOP:
  ------------------
  |  Branch (1671:4): [True: 0, False: 1.65k]
  ------------------
 1672|       |#ifdef ST_DEBUG
 1673|       |	    st_check(tab);
 1674|       |#endif
 1675|      0|	    return 0;
 1676|  1.65k|	  case ST_DELETE: {
  ------------------
  |  Branch (1676:4): [True: 1.65k, False: 0]
  ------------------
 1677|  1.65k|	    st_data_t key = curr_entry_ptr->key;
 1678|       |
 1679|  1.65k|	    again:
 1680|  1.65k|	    if (packed_p) {
  ------------------
  |  Branch (1680:10): [True: 1.65k, False: 0]
  ------------------
 1681|  1.65k|		bin = find_entry(tab, hash, key);
 1682|  1.65k|		if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
  ------------------
  |  |  117|  1.65k|#define EXPECT(expr, val) __builtin_expect(expr, val)
  |  |  ------------------
  |  |  |  Branch (117:27): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
 1683|      0|		    goto again;
 1684|  1.65k|		if (bin == UNDEFINED_ENTRY_IND)
  ------------------
  |  |  399|  1.65k|#define UNDEFINED_ENTRY_IND (~(st_index_t) 0)
  ------------------
  |  Branch (1684:7): [True: 0, False: 1.65k]
  ------------------
 1685|      0|		    break;
 1686|  1.65k|	    }
 1687|      0|	    else {
 1688|      0|		bin_ind = find_table_bin_ind(tab, hash, key);
 1689|      0|		if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0))
  ------------------
  |  |  117|      0|#define EXPECT(expr, val) __builtin_expect(expr, val)
  |  |  ------------------
  |  |  |  Branch (117:27): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1690|      0|		    goto again;
 1691|      0|		if (bin_ind == UNDEFINED_BIN_IND)
  ------------------
  |  |  400|      0|#define UNDEFINED_BIN_IND (~(st_index_t) 0)
  ------------------
  |  Branch (1691:7): [True: 0, False: 0]
  ------------------
 1692|      0|		    break;
 1693|      0|		bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE;
  ------------------
  |  |  391|      0|#define ENTRY_BASE 2
  ------------------
 1694|      0|		MARK_BIN_DELETED(tab, bin_ind);
  ------------------
  |  |  411|      0|    do {                                                        \
  |  |  412|      0|        st_assert(i != UNDEFINED_BIN_IND);			\
  |  |  ------------------
  |  |  |  |  128|      0|#define st_assert(cond) ((void)(0 && (cond)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (128:33): [Folded - Ignored]
  |  |  |  |  |  Branch (128:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  413|      0|	st_assert(! IND_EMPTY_OR_DELETED_BIN_P(tab, i)); 	\
  |  |  ------------------
  |  |  |  |  128|      0|#define st_assert(cond) ((void)(0 && (cond)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (128:33): [Folded - Ignored]
  |  |  |  |  |  Branch (128:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  414|      0|        set_bin((tab)->bins, get_size_ind(tab), i, DELETED_BIN); \
  |  |  ------------------
  |  |  |  |  389|      0|#define DELETED_BIN  1
  |  |  ------------------
  |  |  415|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (415:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1695|      0|	    }
 1696|  1.65k|	    curr_entry_ptr = &entries[bin];
 1697|  1.65k|	    MARK_ENTRY_DELETED(curr_entry_ptr);
  ------------------
  |  |  431|  1.65k|#define MARK_ENTRY_DELETED(e_ptr) ((e_ptr)->hash = RESERVED_HASH_VAL)
  |  |  ------------------
  |  |  |  |  317|  1.65k|#define RESERVED_HASH_VAL (~(st_hash_t) 0)
  |  |  ------------------
  ------------------
 1698|  1.65k|	    tab->num_entries--;
 1699|  1.65k|	    update_range_for_deleted(tab, bin);
 1700|       |#ifdef ST_DEBUG
 1701|       |	    st_check(tab);
 1702|       |#endif
 1703|  1.65k|	    break;
 1704|  1.65k|	  }
 1705|  1.65k|	}
 1706|  1.65k|    }
 1707|       |#ifdef ST_DEBUG
 1708|       |    st_check(tab);
 1709|       |#endif
 1710|    413|    return 0;
 1711|    413|}
st.c:update_range_for_deleted:
 1375|  1.65k|{
 1376|       |    /* Do not update entries_bound here.  Otherwise, we can fill all
 1377|       |       bins by deleted entry value before rebuilding the table.  */
 1378|  1.65k|    if (tab->entries_start == n)
  ------------------
  |  Branch (1378:9): [True: 1.65k, False: 0]
  ------------------
 1379|  1.65k|        tab->entries_start = n + 1;
 1380|  1.65k|}

flb_cf_create:
   38|    413|{
   39|    413|    struct flb_cf *ctx;
   40|       |
   41|    413|    ctx = flb_calloc(1, sizeof(struct flb_cf));
   42|    413|    if (!ctx) {
  ------------------
  |  Branch (42:9): [True: 0, False: 413]
  ------------------
   43|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|       |
   47|       |    /* env vars */
   48|    413|    mk_list_init(&ctx->env);
   49|       |
   50|       |    /* meta commands */
   51|    413|    mk_list_init(&ctx->metas);
   52|       |
   53|       |    /* parsers */
   54|    413|    mk_list_init(&ctx->parsers);
   55|    413|    mk_list_init(&ctx->multiline_parsers);
   56|       |
   57|       |    /* custom plugins */
   58|    413|    mk_list_init(&ctx->customs);
   59|       |
   60|       |    /* pipeline */
   61|    413|    mk_list_init(&ctx->inputs);
   62|    413|    mk_list_init(&ctx->filters);
   63|    413|    mk_list_init(&ctx->outputs);
   64|       |
   65|       |    /* other sections */
   66|    413|    mk_list_init(&ctx->others);
   67|       |
   68|       |    /* general list for sections */
   69|    413|    mk_list_init(&ctx->sections);
   70|       |
   71|    413|    return ctx;
   72|    413|}
flb_cf_destroy:
   75|    413|{
   76|    413|    flb_kv_release(&cf->env);
   77|    413|    flb_kv_release(&cf->metas);
   78|    413|    flb_cf_section_destroy_all(cf);
   79|    413|    flb_free(cf);
   80|    413|}
flb_cf_section_create:
  480|    413|{
  481|    413|    int type;
  482|    413|    struct flb_cf_section *s;
  483|       |
  484|    413|    if (!name) {
  ------------------
  |  Branch (484:9): [True: 0, False: 413]
  ------------------
  485|      0|        return NULL;
  486|      0|    }
  487|       |
  488|       |    /* determinate type by name */
  489|    413|    if (len <= 0) {
  ------------------
  |  Branch (489:9): [True: 413, False: 0]
  ------------------
  490|    413|        len = strlen(name);
  491|    413|    }
  492|       |
  493|       |    /* get the section type */
  494|    413|    type = get_section_type(name, len);
  495|       |
  496|       |    /* check if 'service' already exists */
  497|    413|    if (type == FLB_CF_SERVICE && cf->service) {
  ------------------
  |  Branch (497:9): [True: 413, False: 0]
  |  Branch (497:35): [True: 0, False: 413]
  ------------------
  498|      0|        return cf->service;
  499|      0|    }
  500|       |
  501|       |    /* section context */
  502|    413|    s = flb_malloc(sizeof(struct flb_cf_section));
  503|    413|    if (!s) {
  ------------------
  |  Branch (503:9): [True: 0, False: 413]
  ------------------
  504|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  505|      0|        return NULL;
  506|      0|    }
  507|       |
  508|       |    /* initialize lists */
  509|    413|    s->properties = cfl_kvlist_create();
  510|    413|    mk_list_init(&s->groups);
  511|       |
  512|       |    /* create a NULL terminated name */
  513|    413|    s->name = flb_sds_create_len(name, len);
  514|    413|    if (!s->name) {
  ------------------
  |  Branch (514:9): [True: 0, False: 413]
  ------------------
  515|      0|        flb_free(s->properties);
  516|      0|        flb_free(s);
  517|      0|        return NULL;
  518|      0|    }
  519|    413|    s->type = type;
  520|       |
  521|    413|    if (type == FLB_CF_SERVICE && !cf->service) {
  ------------------
  |  Branch (521:9): [True: 413, False: 0]
  |  Branch (521:35): [True: 413, False: 0]
  ------------------
  522|    413|        cf->service = s;
  523|    413|    }
  524|       |
  525|       |    /* link to global section */
  526|    413|    mk_list_add(&s->_head, &cf->sections);
  527|       |
  528|       |    /* link to list per type */
  529|    413|    if (type == FLB_CF_PARSER) {
  ------------------
  |  Branch (529:9): [True: 0, False: 413]
  ------------------
  530|      0|        mk_list_add(&s->_head_section, &cf->parsers);
  531|      0|    }
  532|    413|    else if (type == FLB_CF_MULTILINE_PARSER) {
  ------------------
  |  Branch (532:14): [True: 0, False: 413]
  ------------------
  533|      0|        mk_list_add(&s->_head_section, &cf->multiline_parsers);
  534|      0|    }
  535|    413|    else if (type == FLB_CF_CUSTOM) {
  ------------------
  |  Branch (535:14): [True: 0, False: 413]
  ------------------
  536|      0|        mk_list_add(&s->_head_section, &cf->customs);
  537|      0|    }
  538|    413|    else if (type == FLB_CF_INPUT) {
  ------------------
  |  Branch (538:14): [True: 0, False: 413]
  ------------------
  539|      0|        mk_list_add(&s->_head_section, &cf->inputs);
  540|      0|    }
  541|    413|    else if (type == FLB_CF_FILTER) {
  ------------------
  |  Branch (541:14): [True: 0, False: 413]
  ------------------
  542|      0|        mk_list_add(&s->_head_section, &cf->filters);
  543|      0|    }
  544|    413|    else if (type == FLB_CF_OUTPUT) {
  ------------------
  |  Branch (544:14): [True: 0, False: 413]
  ------------------
  545|      0|        mk_list_add(&s->_head_section, &cf->outputs);
  546|      0|    }
  547|    413|    else if (type == FLB_CF_OTHER) {
  ------------------
  |  Branch (547:14): [True: 0, False: 413]
  ------------------
  548|      0|        mk_list_add(&s->_head_section, &cf->others);
  549|      0|    }
  550|       |
  551|    413|    return s;
  552|    413|}
flb_cf_section_destroy:
  571|    413|{
  572|    413|    struct mk_list *tmp;
  573|    413|    struct mk_list *head;
  574|    413|    struct flb_cf_group *g;
  575|       |
  576|    413|    if (s->name) {
  ------------------
  |  Branch (576:9): [True: 413, False: 0]
  ------------------
  577|    413|        flb_sds_destroy(s->name);
  578|    413|        s->name = NULL;
  579|    413|    }
  580|    413|    cfl_kvlist_destroy(s->properties);
  581|       |
  582|       |    /* groups */
  583|    413|    mk_list_foreach_safe(head, tmp, &s->groups) {
  ------------------
  |  |  207|    413|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 0, False: 413]
  |  |  ------------------
  ------------------
  584|      0|        g = mk_list_entry(head, struct flb_cf_group, _head);
  ------------------
  |  |  214|      0|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|      0|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  585|      0|        flb_cf_group_destroy(g);
  586|      0|    }
  587|       |
  588|       |    /* unlink */
  589|    413|    mk_list_del(&s->_head);
  590|       |
  591|    413|    if (s->type != FLB_CF_SERVICE) {
  ------------------
  |  Branch (591:9): [True: 0, False: 413]
  ------------------
  592|      0|        mk_list_del(&s->_head_section);
  593|      0|    }
  594|       |
  595|    413|    flb_free(s);
  596|    413|}
flb_cf_section_destroy_all:
  611|    413|{
  612|    413|    section_destroy_list(cf, &cf->sections);
  613|    413|}
flb_config_format.c:get_section_type:
   83|    413|{
   84|    413|    if (strncasecmp(name, "SERVICE", len) == 0) {
  ------------------
  |  Branch (84:9): [True: 413, False: 0]
  ------------------
   85|    413|        return FLB_CF_SERVICE;
   86|    413|    }
   87|      0|    else if (strncasecmp(name, "PARSER", len) == 0) {
  ------------------
  |  Branch (87:14): [True: 0, False: 0]
  ------------------
   88|      0|        return FLB_CF_PARSER;
   89|      0|    }
   90|      0|    else if (strncasecmp(name, "MULTILINE_PARSER", len) == 0) {
  ------------------
  |  Branch (90:14): [True: 0, False: 0]
  ------------------
   91|      0|        return FLB_CF_MULTILINE_PARSER;
   92|      0|    }
   93|      0|    else if (strncasecmp(name, "CUSTOM", len) == 0 ||
  ------------------
  |  Branch (93:14): [True: 0, False: 0]
  ------------------
   94|      0|             strncasecmp(name, "CUSTOMS", len) == 0) {
  ------------------
  |  Branch (94:14): [True: 0, False: 0]
  ------------------
   95|      0|        return FLB_CF_CUSTOM;
   96|      0|    }
   97|      0|    else if (strncasecmp(name, "INPUT", len) == 0 ||
  ------------------
  |  Branch (97:14): [True: 0, False: 0]
  ------------------
   98|      0|             strncasecmp(name, "INPUTS", len) == 0) {
  ------------------
  |  Branch (98:14): [True: 0, False: 0]
  ------------------
   99|      0|        return FLB_CF_INPUT;
  100|      0|    }
  101|      0|    else if (strncasecmp(name, "FILTER", len) == 0 ||
  ------------------
  |  Branch (101:14): [True: 0, False: 0]
  ------------------
  102|      0|             strncasecmp(name, "FILTERS", len) == 0) {
  ------------------
  |  Branch (102:14): [True: 0, False: 0]
  ------------------
  103|      0|        return FLB_CF_FILTER;
  104|      0|    }
  105|      0|    else if (strncasecmp(name, "OUTPUT", len) == 0 ||
  ------------------
  |  Branch (105:14): [True: 0, False: 0]
  ------------------
  106|      0|             strncasecmp(name, "OUTPUTS", len) == 0) {
  ------------------
  |  Branch (106:14): [True: 0, False: 0]
  ------------------
  107|      0|        return FLB_CF_OUTPUT;
  108|      0|    }
  109|       |
  110|      0|    return FLB_CF_OTHER;
  111|    413|}
flb_config_format.c:section_destroy_list:
  599|    413|{
  600|    413|    struct mk_list *tmp;
  601|    413|    struct mk_list *head;
  602|    413|    struct flb_cf_section *s;
  603|       |
  604|    413|    mk_list_foreach_safe(head, tmp, list) {
  ------------------
  |  |  207|    826|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 413, False: 413]
  |  |  ------------------
  ------------------
  605|    413|        s = mk_list_entry(head, struct flb_cf_section, _head);
  ------------------
  |  |  214|    413|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|    413|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|    413|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|    413|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  606|    413|        flb_cf_section_destroy(cf, s);
  607|    413|    }
  608|    413|}

flb_base64_encode:
   90|    402|{
   91|    402|    size_t i, n;
   92|    402|    int C1, C2, C3;
   93|    402|    unsigned char *p;
   94|       |
   95|    402|    if( slen == 0 )
  ------------------
  |  Branch (95:9): [True: 0, False: 402]
  ------------------
   96|      0|    {
   97|      0|        *olen = 0;
   98|      0|        return( 0 );
   99|      0|    }
  100|       |
  101|    402|    n = slen / 3 + ( slen % 3 != 0 );
  102|       |
  103|    402|    if( n > ( BASE64_SIZE_T_MAX - 1 ) / 4 )
  ------------------
  |  |   83|    402|#define BASE64_SIZE_T_MAX   ( (size_t) -1 ) /* SIZE_T_MAX is not standard */
  ------------------
  |  Branch (103:9): [True: 0, False: 402]
  ------------------
  104|      0|    {
  105|      0|        *olen = BASE64_SIZE_T_MAX;
  ------------------
  |  |   83|      0|#define BASE64_SIZE_T_MAX   ( (size_t) -1 ) /* SIZE_T_MAX is not standard */
  ------------------
  106|      0|        return( FLB_BASE64_ERR_BUFFER_TOO_SMALL );
  ------------------
  |  |   61|      0|#define FLB_BASE64_ERR_BUFFER_TOO_SMALL               -0x002A  /**< Output buffer too small. */
  ------------------
  107|      0|    }
  108|       |
  109|    402|    n *= 4;
  110|       |
  111|    402|    if( ( dlen < n + 1 ) || ( NULL == dst ) )
  ------------------
  |  Branch (111:9): [True: 0, False: 402]
  |  Branch (111:29): [True: 0, False: 402]
  ------------------
  112|      0|    {
  113|      0|        *olen = n + 1;
  114|      0|        return( FLB_BASE64_ERR_BUFFER_TOO_SMALL );
  ------------------
  |  |   61|      0|#define FLB_BASE64_ERR_BUFFER_TOO_SMALL               -0x002A  /**< Output buffer too small. */
  ------------------
  115|      0|    }
  116|       |
  117|    402|    n = ( slen / 3 ) * 3;
  118|       |
  119|  4.26k|    for( i = 0, p = dst; i < n; i += 3 )
  ------------------
  |  Branch (119:26): [True: 3.86k, False: 402]
  ------------------
  120|  3.86k|    {
  121|  3.86k|        C1 = *src++;
  122|  3.86k|        C2 = *src++;
  123|  3.86k|        C3 = *src++;
  124|       |
  125|  3.86k|        *p++ = base64_enc_map[(C1 >> 2) & 0x3F];
  126|  3.86k|        *p++ = base64_enc_map[(((C1 &  3) << 4) + (C2 >> 4)) & 0x3F];
  127|  3.86k|        *p++ = base64_enc_map[(((C2 & 15) << 2) + (C3 >> 6)) & 0x3F];
  128|  3.86k|        *p++ = base64_enc_map[C3 & 0x3F];
  129|  3.86k|    }
  130|       |
  131|    402|    if( i < slen )
  ------------------
  |  Branch (131:9): [True: 331, False: 71]
  ------------------
  132|    331|    {
  133|    331|        C1 = *src++;
  134|    331|        C2 = ( ( i + 1 ) < slen ) ? *src++ : 0;
  ------------------
  |  Branch (134:14): [True: 78, False: 253]
  ------------------
  135|       |
  136|    331|        *p++ = base64_enc_map[(C1 >> 2) & 0x3F];
  137|    331|        *p++ = base64_enc_map[(((C1 & 3) << 4) + (C2 >> 4)) & 0x3F];
  138|       |
  139|    331|        if( ( i + 1 ) < slen )
  ------------------
  |  Branch (139:13): [True: 78, False: 253]
  ------------------
  140|     78|             *p++ = base64_enc_map[((C2 & 15) << 2) & 0x3F];
  141|    253|        else *p++ = '=';
  142|       |
  143|    331|        *p++ = '=';
  144|    331|    }
  145|       |
  146|    402|    *olen = p - dst;
  147|    402|    *p = 0;
  148|       |
  149|    402|    return( 0 );
  150|    402|}

flb_config_init:
  180|    413|{
  181|    413|    int ret;
  182|    413|    struct flb_config *config;
  183|    413|    struct flb_cf *cf;
  184|    413|    struct flb_cf_section *section;
  185|       |
  186|    413|    config = flb_calloc(1, sizeof(struct flb_config));
  187|    413|    if (!config) {
  ------------------
  |  Branch (187:9): [True: 0, False: 413]
  ------------------
  188|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  189|      0|        return NULL;
  190|      0|    }
  191|       |
  192|    413|    MK_EVENT_ZERO(&config->ch_event);
  193|    413|    MK_EVENT_ZERO(&config->event_flush);
  194|    413|    MK_EVENT_ZERO(&config->event_shutdown);
  195|       |
  196|       |    /* is data ingestion active ? */
  197|    413|    config->is_ingestion_active = FLB_TRUE;
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  198|       |
  199|       |    /* Is the engine (event loop) actively running ? */
  200|    413|    config->is_running = FLB_TRUE;
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  201|       |
  202|       |    /* Initialize config_format context */
  203|    413|    cf = flb_cf_create();
  204|    413|    if (!cf) {
  ------------------
  |  Branch (204:9): [True: 0, False: 413]
  ------------------
  205|      0|        flb_free(config);
  206|      0|        return NULL;
  207|      0|    }
  208|    413|    config->cf_main = cf;
  209|       |
  210|    413|    section = flb_cf_section_create(cf, "service", 0);
  211|    413|    if (!section) {
  ------------------
  |  Branch (211:9): [True: 0, False: 413]
  ------------------
  212|      0|        flb_cf_destroy(cf);
  213|      0|        flb_free(config);
  214|      0|        return NULL;
  215|      0|    }
  216|       |
  217|       |    /* Flush */
  218|    413|    config->flush        = FLB_CONFIG_FLUSH_SECS;
  ------------------
  |  |   33|    413|#define FLB_CONFIG_FLUSH_SECS   1
  ------------------
  219|    413|    config->daemon       = FLB_FALSE;
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
  220|    413|    config->init_time    = time(NULL);
  221|    413|    config->kernel       = flb_kernel_info();
  222|    413|    config->verbose      = 3;
  223|    413|    config->grace        = 5;
  224|    413|    config->grace_count  = 0;
  225|    413|    config->exit_status_code = 0;
  226|       |
  227|       |    /* json */
  228|    413|    config->convert_nan_to_null = FLB_FALSE;
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
  229|       |
  230|    413|#ifdef FLB_HAVE_HTTP_SERVER
  231|    413|    config->http_ctx                     = NULL;
  232|    413|    config->http_server                  = FLB_FALSE;
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
  233|    413|    config->http_listen                  = flb_strdup(FLB_CONFIG_HTTP_LISTEN);
  ------------------
  |  |   34|    413|#define FLB_CONFIG_HTTP_LISTEN  "0.0.0.0"
  ------------------
  234|    413|    config->http_port                    = flb_strdup(FLB_CONFIG_HTTP_PORT);
  ------------------
  |  |   35|    413|#define FLB_CONFIG_HTTP_PORT    "2020"
  ------------------
  235|    413|    config->health_check                 = FLB_FALSE;
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
  236|    413|    config->hc_errors_count              = HC_ERRORS_COUNT_DEFAULT;
  ------------------
  |  |   36|    413|#define HC_ERRORS_COUNT_DEFAULT 5
  ------------------
  237|    413|    config->hc_retry_failure_count       = HC_RETRY_FAILURE_COUNTS_DEFAULT;
  ------------------
  |  |   37|    413|#define HC_RETRY_FAILURE_COUNTS_DEFAULT 5
  ------------------
  238|    413|    config->health_check_period          = HEALTH_CHECK_PERIOD;
  ------------------
  |  |   38|    413|#define HEALTH_CHECK_PERIOD 60
  ------------------
  239|    413|#endif
  240|       |
  241|    413|    config->http_proxy = getenv("HTTP_PROXY");
  242|    413|    if (flb_str_emptyval(config->http_proxy) == FLB_TRUE) {
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  |  Branch (242:9): [True: 0, False: 413]
  ------------------
  243|      0|        config->http_proxy = getenv("http_proxy");
  244|      0|        if (flb_str_emptyval(config->http_proxy) == FLB_TRUE) {
  ------------------
  |  |   26|      0|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      0|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  |  Branch (244:13): [True: 0, False: 0]
  ------------------
  245|       |            /* Proxy should not be set when `HTTP_PROXY` or `http_proxy` are set to "" */
  246|      0|            config->http_proxy = NULL;
  247|      0|        }
  248|      0|    }
  249|    413|    config->no_proxy = getenv("NO_PROXY");
  250|    413|    if (flb_str_emptyval(config->no_proxy) == FLB_TRUE || config->http_proxy == NULL) {
  ------------------
  |  |   26|    826|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    826|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  |  Branch (250:9): [True: 0, False: 413]
  |  Branch (250:59): [True: 413, False: 0]
  ------------------
  251|    413|        config->no_proxy = getenv("no_proxy");
  252|    413|        if (flb_str_emptyval(config->no_proxy) == FLB_TRUE || config->http_proxy == NULL) {
  ------------------
  |  |   26|    826|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    826|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  |  Branch (252:13): [True: 0, False: 413]
  |  Branch (252:63): [True: 413, False: 0]
  ------------------
  253|       |            /* NoProxy  should not be set when `NO_PROXY` or `no_proxy` are set to "" or there is no Proxy. */
  254|    413|            config->no_proxy = NULL;
  255|    413|        }
  256|    413|    }
  257|       |
  258|    413|    config->cio          = NULL;
  259|    413|    config->storage_path = NULL;
  260|    413|    config->storage_input_plugin = NULL;
  261|    413|    config->storage_metrics = FLB_TRUE;
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  262|       |
  263|    413|    config->sched_cap  = FLB_SCHED_CAP;
  ------------------
  |  |   29|    413|#define FLB_SCHED_CAP            2000
  ------------------
  264|    413|    config->sched_base = FLB_SCHED_BASE;
  ------------------
  |  |   30|    413|#define FLB_SCHED_BASE           5
  ------------------
  265|       |
  266|    413|#ifdef FLB_HAVE_SQLDB
  267|    413|    mk_list_init(&config->sqldb_list);
  268|    413|#endif
  269|       |
  270|       |#ifdef FLB_HAVE_LUAJIT
  271|       |    mk_list_init(&config->luajit_list);
  272|       |#endif
  273|       |
  274|       |#ifdef FLB_HAVE_STREAM_PROCESSOR
  275|       |    flb_slist_create(&config->stream_processor_tasks);
  276|       |#endif
  277|       |
  278|       |    /* Set default coroutines stack size */
  279|    413|    config->coro_stack_size = FLB_CORO_STACK_SIZE_BYTE;
  ------------------
  |  |   67|    413|#define FLB_CORO_STACK_SIZE_BYTE      ((3 * PTHREAD_STACK_MIN) / 2)
  ------------------
  280|    413|    if (config->coro_stack_size < getpagesize()) {
  ------------------
  |  Branch (280:9): [True: 0, False: 413]
  ------------------
  281|      0|        flb_info("[config] changing coro_stack_size from %u to %u bytes",
  ------------------
  |  |  158|      0|    if (flb_log_check(FLB_LOG_INFO))                                 \
  |  |  ------------------
  |  |  |  |   41|      0|#define FLB_LOG_INFO    3  /* default */
  |  |  ------------------
  |  |  |  Branch (158:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  159|      0|        flb_log_print(FLB_LOG_INFO, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   41|      0|#define FLB_LOG_INFO    3  /* default */
  |  |  ------------------
  ------------------
  282|      0|                 config->coro_stack_size, getpagesize());
  283|      0|        config->coro_stack_size = (unsigned int)getpagesize();
  284|      0|    }
  285|       |
  286|       |    /* collectors */
  287|    413|    pthread_mutex_init(&config->collectors_mutex, NULL);
  288|       |
  289|       |    /* Initialize linked lists */
  290|    413|    mk_list_init(&config->custom_plugins);
  291|    413|    mk_list_init(&config->custom_plugins);
  292|    413|    mk_list_init(&config->in_plugins);
  293|    413|    mk_list_init(&config->parser_plugins);
  294|    413|    mk_list_init(&config->filter_plugins);
  295|    413|    mk_list_init(&config->out_plugins);
  296|    413|    mk_list_init(&config->customs);
  297|    413|    mk_list_init(&config->inputs);
  298|    413|    mk_list_init(&config->parsers);
  299|    413|    mk_list_init(&config->filters);
  300|    413|    mk_list_init(&config->outputs);
  301|    413|    mk_list_init(&config->proxies);
  302|    413|    mk_list_init(&config->workers);
  303|    413|    mk_list_init(&config->upstreams);
  304|    413|    mk_list_init(&config->downstreams);
  305|    413|    mk_list_init(&config->cmetrics);
  306|    413|    mk_list_init(&config->cf_parsers_list);
  307|       |
  308|    413|    memset(&config->tasks_map, '\0', sizeof(config->tasks_map));
  309|       |
  310|       |    /* Initialize multiline-parser list. We need this here, because from now
  311|       |     * on we use flb_config_exit to cleanup the config, which requires
  312|       |     * the config->multiline_parsers list to be initialized. */
  313|    413|    mk_list_init(&config->multiline_parsers);
  314|       |
  315|       |    /* Environment */
  316|    413|    config->env = flb_env_create();
  317|    413|    if (config->env == NULL) {
  ------------------
  |  Branch (317:9): [True: 0, False: 413]
  ------------------
  318|      0|        flb_error("[config] environment creation failed");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  319|      0|        flb_config_exit(config);
  320|      0|        return NULL;
  321|      0|    }
  322|       |
  323|       |    /* Multiline core */
  324|    413|    ret = flb_ml_init(config);
  325|    413|    if (ret == -1) {
  ------------------
  |  Branch (325:9): [True: 0, False: 413]
  ------------------
  326|      0|        flb_error("[config] multiline core initialization failed");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  327|      0|        flb_config_exit(config);
  328|      0|        return NULL;
  329|      0|    }
  330|       |
  331|       |    /* Register static plugins */
  332|    413|    ret = flb_plugins_register(config);
  333|    413|    if (ret == -1) {
  ------------------
  |  Branch (333:9): [True: 0, False: 413]
  ------------------
  334|      0|        flb_error("[config] plugins registration failed");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  335|      0|        flb_config_exit(config);
  336|      0|        return NULL;
  337|      0|    }
  338|       |
  339|       |    /* Create environment for dynamic plugins */
  340|    413|    config->dso_plugins = flb_plugin_create();
  341|       |
  342|       |    /* Ignoring SIGPIPE on Windows (scary) */
  343|    413|#ifndef _WIN32
  344|       |    /* Ignore SIGPIPE */
  345|    413|    signal(SIGPIPE, SIG_IGN);
  346|    413|#endif
  347|       |
  348|       |    /* Prepare worker interface */
  349|    413|    flb_worker_init(config);
  350|       |
  351|    413|#ifdef FLB_HAVE_REGEX
  352|       |    /* Regex support */
  353|    413|    flb_regex_init();
  354|    413|#endif
  355|       |
  356|    413|    return config;
  357|    413|}
flb_config_exit:
  360|    413|{
  361|    413|    struct mk_list *tmp;
  362|    413|    struct mk_list *head;
  363|    413|    struct flb_cf *cf;
  364|       |
  365|    413|    if (config->log_file) {
  ------------------
  |  Branch (365:9): [True: 0, False: 413]
  ------------------
  366|      0|        flb_free(config->log_file);
  367|      0|    }
  368|       |
  369|    413|    if (config->log) {
  ------------------
  |  Branch (369:9): [True: 0, False: 413]
  ------------------
  370|      0|        flb_log_destroy(config->log, config);
  371|      0|    }
  372|       |
  373|    413|    if (config->parsers_file) {
  ------------------
  |  Branch (373:9): [True: 0, False: 413]
  ------------------
  374|      0|        flb_free(config->parsers_file);
  375|      0|    }
  376|       |
  377|    413|    if (config->plugins_file) {
  ------------------
  |  Branch (377:9): [True: 0, False: 413]
  ------------------
  378|      0|        flb_free(config->plugins_file);
  379|      0|    }
  380|       |
  381|    413|    if (config->kernel) {
  ------------------
  |  Branch (381:9): [True: 413, False: 0]
  ------------------
  382|    413|        flb_free(config->kernel->s_version.data);
  383|    413|        flb_free(config->kernel);
  384|    413|    }
  385|       |
  386|       |    /* release resources */
  387|    413|    if (config->ch_event.fd) {
  ------------------
  |  Branch (387:9): [True: 413, False: 0]
  ------------------
  388|    413|        mk_event_closesocket(config->ch_event.fd);
  ------------------
  |  |   86|    413|    #define mk_event_closesocket(s) close(s)
  ------------------
  389|    413|    }
  390|       |
  391|       |    /* Pipe */
  392|    413|    if (config->ch_data[0]) {
  ------------------
  |  Branch (392:9): [True: 0, False: 413]
  ------------------
  393|      0|        mk_event_closesocket(config->ch_data[0]);
  ------------------
  |  |   86|      0|    #define mk_event_closesocket(s) close(s)
  ------------------
  394|      0|        mk_event_closesocket(config->ch_data[1]);
  ------------------
  |  |   86|      0|    #define mk_event_closesocket(s) close(s)
  ------------------
  395|      0|    }
  396|       |
  397|       |    /* Channel manager */
  398|    413|    if (config->ch_manager[0] > 0) {
  ------------------
  |  Branch (398:9): [True: 0, False: 413]
  ------------------
  399|      0|        mk_event_closesocket(config->ch_manager[0]);
  ------------------
  |  |   86|      0|    #define mk_event_closesocket(s) close(s)
  ------------------
  400|      0|        if (config->ch_manager[0] != config->ch_manager[1]) {
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  ------------------
  401|      0|            mk_event_closesocket(config->ch_manager[1]);
  ------------------
  |  |   86|      0|    #define mk_event_closesocket(s) close(s)
  ------------------
  402|      0|        }
  403|      0|    }
  404|       |
  405|       |    /* Channel notifications */
  406|    413|    if (config->ch_notif[0] > 0) {
  ------------------
  |  Branch (406:9): [True: 0, False: 413]
  ------------------
  407|      0|        mk_event_closesocket(config->ch_notif[0]);
  ------------------
  |  |   86|      0|    #define mk_event_closesocket(s) close(s)
  ------------------
  408|      0|        if (config->ch_notif[0] != config->ch_notif[1]) {
  ------------------
  |  Branch (408:13): [True: 0, False: 0]
  ------------------
  409|      0|            mk_event_closesocket(config->ch_notif[1]);
  ------------------
  |  |   86|      0|    #define mk_event_closesocket(s) close(s)
  ------------------
  410|      0|        }
  411|      0|    }
  412|       |
  413|    413|    if (config->env) {
  ------------------
  |  Branch (413:9): [True: 413, False: 0]
  ------------------
  414|    413|        flb_env_destroy(config->env);
  415|    413|    }
  416|       |
  417|       |    /* Program name */
  418|    413|    if (config->program_name) {
  ------------------
  |  Branch (418:9): [True: 0, False: 413]
  ------------------
  419|      0|        flb_sds_destroy(config->program_name);
  420|      0|    }
  421|       |
  422|       |    /* Conf path */
  423|    413|    if (config->conf_path) {
  ------------------
  |  Branch (423:9): [True: 0, False: 413]
  ------------------
  424|      0|        flb_free(config->conf_path);
  425|      0|    }
  426|       |
  427|       |    /* Working directory */
  428|    413|    if (config->workdir) {
  ------------------
  |  Branch (428:9): [True: 0, False: 413]
  ------------------
  429|      0|        flb_free(config->workdir);
  430|      0|    }
  431|       |
  432|       |    /* Destroy any DSO context */
  433|    413|    if (config->dso_plugins) {
  ------------------
  |  Branch (433:9): [True: 413, False: 0]
  ------------------
  434|    413|        flb_plugin_destroy(config->dso_plugins);
  435|    413|    }
  436|       |
  437|       |    /* Workers */
  438|    413|    flb_worker_exit(config);
  439|       |
  440|       |    /* Event flush */
  441|    413|    if (config->evl) {
  ------------------
  |  Branch (441:9): [True: 0, False: 413]
  ------------------
  442|      0|        if (config->event_flush.status != MK_EVENT_NONE) {
  ------------------
  |  |   52|      0|#define MK_EVENT_NONE            1    /* nothing */
  ------------------
  |  Branch (442:13): [True: 0, False: 0]
  ------------------
  443|      0|            mk_event_timeout_destroy(config->evl, &config->event_flush);
  444|      0|        }
  445|      0|    }
  446|       |
  447|       |    /* Release scheduler */
  448|    413|    if (config->sched) {
  ------------------
  |  Branch (448:9): [True: 0, False: 413]
  ------------------
  449|      0|        flb_sched_destroy(config->sched);
  450|      0|    }
  451|       |
  452|    413|#ifdef FLB_HAVE_HTTP_SERVER
  453|    413|    if (config->http_listen) {
  ------------------
  |  Branch (453:9): [True: 413, False: 0]
  ------------------
  454|    413|        flb_free(config->http_listen);
  455|    413|    }
  456|       |
  457|    413|    if (config->http_port) {
  ------------------
  |  Branch (457:9): [True: 413, False: 0]
  ------------------
  458|    413|        flb_free(config->http_port);
  459|    413|    }
  460|    413|#endif
  461|       |
  462|    413|#ifdef FLB_HAVE_PARSER
  463|       |    /* parsers */
  464|    413|    flb_parser_exit(config);
  465|    413|#endif
  466|       |
  467|    413|    if (config->dns_mode) {
  ------------------
  |  Branch (467:9): [True: 0, False: 413]
  ------------------
  468|      0|        flb_free(config->dns_mode);
  469|      0|    }
  470|    413|    if (config->dns_resolver) {
  ------------------
  |  Branch (470:9): [True: 0, False: 413]
  ------------------
  471|      0|        flb_free(config->dns_resolver);
  472|      0|    }
  473|       |
  474|    413|    if (config->storage_path) {
  ------------------
  |  Branch (474:9): [True: 0, False: 413]
  ------------------
  475|      0|        flb_free(config->storage_path);
  476|      0|    }
  477|    413|    if (config->storage_sync) {
  ------------------
  |  Branch (477:9): [True: 0, False: 413]
  ------------------
  478|      0|        flb_free(config->storage_sync);
  479|      0|    }
  480|    413|    if (config->storage_bl_mem_limit) {
  ------------------
  |  Branch (480:9): [True: 0, False: 413]
  ------------------
  481|      0|        flb_free(config->storage_bl_mem_limit);
  482|      0|    }
  483|       |
  484|       |#ifdef FLB_HAVE_STREAM_PROCESSOR
  485|       |    if (config->stream_processor_file) {
  486|       |        flb_free(config->stream_processor_file);
  487|       |    }
  488|       |
  489|       |    flb_slist_destroy(&config->stream_processor_tasks);
  490|       |#endif
  491|       |
  492|    413|    if (config->evl) {
  ------------------
  |  Branch (492:9): [True: 0, False: 413]
  ------------------
  493|      0|        mk_event_loop_destroy(config->evl);
  494|      0|    }
  495|    413|    if (config->evl_bktq) {
  ------------------
  |  Branch (495:9): [True: 0, False: 413]
  ------------------
  496|      0|        flb_bucket_queue_destroy(config->evl_bktq);
  497|      0|    }
  498|       |
  499|    413|    flb_plugins_unregister(config);
  500|       |
  501|    413|    if (config->cf_main) {
  ------------------
  |  Branch (501:9): [True: 413, False: 0]
  ------------------
  502|    413|        flb_cf_destroy(config->cf_main);
  503|    413|    }
  504|       |
  505|       |    /* remove parsers */
  506|    413|    mk_list_foreach_safe(head, tmp, &config->cf_parsers_list) {
  ------------------
  |  |  207|    413|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 0, False: 413]
  |  |  ------------------
  ------------------
  507|      0|        cf = mk_list_entry(head, struct flb_cf, _head);
  ------------------
  |  |  214|      0|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|      0|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  508|      0|        mk_list_del(&cf->_head);
  509|      0|        flb_cf_destroy(cf);
  510|      0|    }
  511|       |
  512|    413|    flb_free(config);
  513|    413|}

flb_connection_setup:
   13|    413|{
   14|    413|    assert(connection != NULL);
   15|       |
   16|    413|    memset(connection, 0, sizeof(struct flb_connection));
   17|       |
   18|    413|    connection->fd                      = socket;
   19|    413|    connection->type                    = type;
   20|    413|    connection->stream                  = stream;
   21|    413|    connection->net_error               = -1;
   22|    413|    connection->evl                     = event_loop;
   23|    413|    connection->coroutine               = coroutine;
   24|    413|    connection->tls_session             = NULL;
   25|    413|    connection->ts_created              = time(NULL);
   26|    413|    connection->ts_assigned             = time(NULL);
   27|       |
   28|    413|    connection->net = &connection->stream->net;
   29|       |
   30|    413|    assert(connection->net != NULL);
   31|       |
   32|    413|    MK_EVENT_ZERO(&connection->event);
   33|       |
   34|    413|    flb_connection_unset_connection_timeout(connection);
   35|    413|    flb_connection_unset_io_timeout(connection);
   36|       |
   37|    413|    return 0;
   38|    413|}
flb_connection_create:
   45|    413|{
   46|    413|    struct flb_connection *connection;
   47|    413|    int                    result;
   48|       |
   49|    413|    connection = flb_calloc(1, sizeof(struct flb_connection));
   50|       |
   51|    413|    if (connection == NULL) {
  ------------------
  |  Branch (51:9): [True: 0, False: 413]
  ------------------
   52|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
   53|      0|    }
   54|    413|    else {
   55|    413|        result = flb_connection_setup(connection,
   56|    413|                                      socket,
   57|    413|                                      type,
   58|    413|                                      stream,
   59|    413|                                      event_loop,
   60|    413|                                      coroutine);
   61|       |
   62|    413|        if (result != 0) {
  ------------------
  |  Branch (62:13): [True: 0, False: 413]
  ------------------
   63|      0|            flb_connection_destroy(connection);
   64|       |
   65|      0|            connection = NULL;
   66|      0|        }
   67|    413|        else {
   68|    413|            connection->dynamically_allocated = FLB_TRUE;
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
   69|    413|        }
   70|    413|    }
   71|       |
   72|    413|    return connection;
   73|    413|}
flb_connection_destroy:
   76|    413|{
   77|    413|    assert(connection != NULL);
   78|       |
   79|    413|    if (connection->dynamically_allocated) {
  ------------------
  |  Branch (79:9): [True: 413, False: 0]
  ------------------
   80|    413|        flb_free(connection);
   81|    413|    }
   82|    413|}
flb_connection_get_flags:
  196|    815|{
  197|    815|    return flb_stream_get_flags(connection->stream);
  198|    815|}
flb_connection_unset_connection_timeout:
  228|    413|{
  229|    413|    assert(connection != NULL);
  230|       |
  231|    413|    connection->ts_connect_start = -1;
  232|    413|    connection->ts_connect_timeout = -1;
  233|    413|}
flb_connection_unset_io_timeout:
  251|    413|{
  252|    413|    assert(connection != NULL);
  253|       |
  254|    413|    connection->ts_io_timeout = -1;
  255|    413|}

flb_coro_get:
   46|    815|{
   47|    815|    struct flb_coro *coro;
   48|       |
   49|    815|    coro = FLB_TLS_GET(flb_coro_key);
  ------------------
  |  |   34|    815|#define FLB_TLS_GET(key)           key
  ------------------
   50|    815|    return coro;
   51|    815|}

flb_env_create:
   70|    413|{
   71|    413|    struct flb_env *env;
   72|    413|    struct flb_hash_table *ht;
   73|       |
   74|    413|    env = flb_malloc(sizeof(struct flb_env));
   75|    413|    if (!env) {
  ------------------
  |  Branch (75:9): [True: 0, False: 413]
  ------------------
   76|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|       |    /* Create the hash-table */
   81|    413|    ht = flb_hash_table_create(FLB_HASH_TABLE_EVICT_NONE, FLB_ENV_SIZE, -1);
  ------------------
  |  |   32|    413|#define FLB_HASH_TABLE_EVICT_NONE       0
  ------------------
                  ht = flb_hash_table_create(FLB_HASH_TABLE_EVICT_NONE, FLB_ENV_SIZE, -1);
  ------------------
  |  |   26|    413|#define FLB_ENV_SIZE 64
  ------------------
   82|    413|    if (!ht) {
  ------------------
  |  Branch (82:9): [True: 0, False: 413]
  ------------------
   83|      0|        flb_free(env);
   84|      0|        return NULL;
   85|      0|    }
   86|       |
   87|    413|    env->warn_unused = FLB_TRUE;
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
   88|    413|    env->ht = ht;
   89|    413|    env_preset(env);
   90|       |
   91|    413|    return env;
   92|    413|}
flb_env_destroy:
   95|    413|{
   96|    413|    flb_hash_table_destroy(env->ht);
   97|    413|    flb_free(env);
   98|    413|}
flb_env.c:env_preset:
   43|    413|{
   44|    413|    int ret;
   45|    413|    char *buf;
   46|    413|    char tmp[512];
   47|       |
   48|       |    /*
   49|       |     * ${HOSTNAME} this variable is very useful to identify records,
   50|       |     * despite this variable is recognized by the Shell, that does not
   51|       |     * means that is exposed as a real environment variable, e.g:
   52|       |     *
   53|       |     *  1. $ echo $HOSTNAME
   54|       |     *     monotop
   55|       |     *  2. $ env | grep HOSTNAME
   56|       |     *     (nothing)
   57|       |     */
   58|    413|    buf = getenv("HOSTNAME");
   59|    413|    if (!buf) {
  ------------------
  |  Branch (59:9): [True: 0, False: 413]
  ------------------
   60|      0|        ret = gethostname(tmp, sizeof(tmp) - 1);
   61|      0|        if (ret == 0) {
  ------------------
  |  Branch (61:13): [True: 0, False: 0]
  ------------------
   62|      0|            flb_env_set(env, "HOSTNAME", tmp);
   63|      0|        }
   64|      0|    }
   65|       |
   66|    413|    return 0;
   67|    413|}

flb_hash_table_create:
   43|    413|{
   44|    413|    int i;
   45|    413|    struct flb_hash_table_chain *tmp;
   46|    413|    struct flb_hash_table *ht;
   47|       |
   48|    413|    if (size <= 0) {
  ------------------
  |  Branch (48:9): [True: 0, False: 413]
  ------------------
   49|      0|        return NULL;
   50|      0|    }
   51|       |
   52|    413|    ht = flb_malloc(sizeof(struct flb_hash_table));
   53|    413|    if (!ht) {
  ------------------
  |  Branch (53:9): [True: 0, False: 413]
  ------------------
   54|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
   55|      0|        return NULL;
   56|      0|    }
   57|       |
   58|    413|    mk_list_init(&ht->entries);
   59|    413|    ht->evict_mode = evict_mode;
   60|    413|    ht->max_entries = max_entries;
   61|    413|    ht->size = size;
   62|    413|    ht->total_count = 0;
   63|    413|    ht->cache_ttl = 0;
   64|    413|    ht->table = flb_calloc(1, sizeof(struct flb_hash_table_chain) * size);
   65|    413|    if (!ht->table) {
  ------------------
  |  Branch (65:9): [True: 0, False: 413]
  ------------------
   66|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
   67|      0|        flb_free(ht);
   68|      0|        return NULL;
   69|      0|    }
   70|       |
   71|       |    /* Initialize chains list head */
   72|  26.8k|    for (i = 0; i < size; i++) {
  ------------------
  |  Branch (72:17): [True: 26.4k, False: 413]
  ------------------
   73|  26.4k|        tmp = &ht->table[i];
   74|  26.4k|        tmp->count = 0;
   75|  26.4k|        mk_list_init(&tmp->chains);
   76|  26.4k|    }
   77|       |
   78|    413|    return ht;
   79|    413|}
flb_hash_table_destroy:
  131|    413|{
  132|    413|    int i;
  133|    413|    struct mk_list *tmp;
  134|    413|    struct mk_list *head;
  135|    413|    struct flb_hash_table_entry *entry;
  136|    413|    struct flb_hash_table_chain *table;
  137|       |
  138|  26.8k|    for (i = 0; i < ht->size; i++) {
  ------------------
  |  Branch (138:17): [True: 26.4k, False: 413]
  ------------------
  139|  26.4k|        table = &ht->table[i];
  140|  26.4k|        mk_list_foreach_safe(head, tmp, &table->chains) {
  ------------------
  |  |  207|  26.4k|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 0, False: 26.4k]
  |  |  ------------------
  ------------------
  141|      0|            entry = mk_list_entry(head, struct flb_hash_table_entry, _head);
  ------------------
  |  |  214|      0|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|      0|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  142|      0|            flb_hash_table_entry_free(ht, entry);
  143|      0|        }
  144|  26.4k|    }
  145|       |
  146|    413|    flb_free(ht->table);
  147|    413|    flb_free(ht);
  148|    413|}

flb_http_strip_port_from_host:
   61|    402|{
   62|    402|    struct mk_list *head;
   63|    402|    struct flb_kv *kv;
   64|    402|    char *out_host;
   65|    402|    struct flb_upstream *u;
   66|       |
   67|    402|    u = c->u_conn->upstream;
   68|       |
   69|    402|    if (!c->host) {
  ------------------
  |  Branch (69:9): [True: 0, False: 402]
  ------------------
   70|      0|        if (!u->proxied_host) {
  ------------------
  |  Branch (70:13): [True: 0, False: 0]
  ------------------
   71|      0|            out_host = u->tcp_host;
   72|      0|        } else {
   73|      0|            out_host = u->proxied_host;
   74|      0|        }
   75|    402|    } else {
   76|    402|        out_host = (char *) c->host;
   77|    402|    }
   78|       |
   79|    402|    mk_list_foreach(head, &c->headers) {
  ------------------
  |  |  205|    402|#define mk_list_foreach(curr, head) for( curr = (head)->next; curr != (head); curr = curr->next )
  |  |  ------------------
  |  |  |  Branch (205:63): [True: 402, False: 0]
  |  |  ------------------
  ------------------
   80|    402|        kv = mk_list_entry(head, struct flb_kv, _head);
  ------------------
  |  |  214|    402|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|    402|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|    402|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|    402|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
   81|    402|        if (strcasecmp("Host", kv->key) == 0) {
  ------------------
  |  Branch (81:13): [True: 402, False: 0]
  ------------------
   82|    402|            flb_sds_destroy(kv->val);
   83|    402|            kv->val = NULL;
   84|    402|            kv->val = flb_sds_create(out_host);
   85|    402|            if (!kv->val) {
  ------------------
  |  Branch (85:17): [True: 0, False: 402]
  ------------------
   86|      0|                flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
   87|      0|                return -1;
   88|      0|            }
   89|    402|            return 0;
   90|    402|        }
   91|    402|    }
   92|       |
   93|      0|    return -1;
   94|    402|}
flb_http_allow_duplicated_headers:
   97|    402|{
   98|    402|    if (allow != FLB_TRUE && allow != FLB_FALSE) {
  ------------------
  |  |   26|    804|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    804|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
                  if (allow != FLB_TRUE && allow != FLB_FALSE) {
  ------------------
  |  |   25|    402|#define FLB_FALSE  0
  ------------------
  |  Branch (98:9): [True: 402, False: 0]
  |  Branch (98:30): [True: 0, False: 402]
  ------------------
   99|      0|        return -1;
  100|      0|    }
  101|       |
  102|    402|    c->allow_dup_headers = allow;
  103|    402|    return 0;
  104|    402|}
fuzz_process_data:
  480|    402|int fuzz_process_data(struct flb_http_client *c) {
  481|    402|	return process_data(c);
  482|    402|}
fuzz_check_connection:
  485|    402|int fuzz_check_connection(struct flb_http_client *c) {
  486|    402|    return check_connection(c);
  487|    402|}
flb_http_client:
  634|    826|{
  635|    826|    int ret;
  636|    826|    char *p;
  637|    826|    char *buf = NULL;
  638|    826|    char *str_method = NULL;
  639|    826|    char *fmt_plain =                           \
  640|    826|        "%s %s HTTP/1.%i\r\n";
  641|    826|    char *fmt_proxy =                           \
  642|    826|        "%s http://%s:%i%s HTTP/1.%i\r\n"
  643|    826|        "Proxy-Connection: KeepAlive\r\n";
  644|       |    // TODO: IPv6 should have the format of [ip]:port
  645|    826|    char *fmt_connect =                           \
  646|    826|        "%s %s:%i HTTP/1.%i\r\n"
  647|    826|        "Proxy-Connection: KeepAlive\r\n";
  648|       |
  649|    826|    struct flb_http_client *c;
  650|       |
  651|    826|    switch (method) {
  ------------------
  |  Branch (651:13): [True: 272, False: 554]
  ------------------
  652|     42|    case FLB_HTTP_GET:
  ------------------
  |  |   33|     42|#define FLB_HTTP_GET         0
  ------------------
  |  Branch (652:5): [True: 42, False: 784]
  ------------------
  653|     42|        str_method = "GET";
  654|     42|        break;
  655|      5|    case FLB_HTTP_POST:
  ------------------
  |  |   34|      5|#define FLB_HTTP_POST        1
  ------------------
  |  Branch (655:5): [True: 5, False: 821]
  ------------------
  656|      5|        str_method = "POST";
  657|      5|        break;
  658|      3|    case FLB_HTTP_PUT:
  ------------------
  |  |   35|      3|#define FLB_HTTP_PUT         2
  ------------------
  |  Branch (658:5): [True: 3, False: 823]
  ------------------
  659|      3|        str_method = "PUT";
  660|      3|        break;
  661|      2|    case FLB_HTTP_HEAD:
  ------------------
  |  |   36|      2|#define FLB_HTTP_HEAD        3
  ------------------
  |  Branch (661:5): [True: 2, False: 824]
  ------------------
  662|      2|        str_method = "HEAD";
  663|      2|        break;
  664|    502|    case FLB_HTTP_CONNECT:
  ------------------
  |  |   37|    502|#define FLB_HTTP_CONNECT     4
  ------------------
  |  Branch (664:5): [True: 502, False: 324]
  ------------------
  665|    502|        str_method = "CONNECT";
  666|    502|        break;
  667|      0|    case FLB_HTTP_PATCH:
  ------------------
  |  |   38|      0|#define FLB_HTTP_PATCH       5
  ------------------
  |  Branch (667:5): [True: 0, False: 826]
  ------------------
  668|      0|        str_method = "PATCH";
  669|      0|        break;
  670|    826|    };
  671|       |
  672|    826|    buf = flb_calloc(1, FLB_HTTP_BUF_SIZE);
  ------------------
  |  |   28|    826|#define FLB_HTTP_BUF_SIZE        2048
  ------------------
  673|    826|    if (!buf) {
  ------------------
  |  Branch (673:9): [True: 0, False: 826]
  ------------------
  674|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  675|      0|        return NULL;
  676|      0|    }
  677|       |
  678|       |    /* FIXME: handler for HTTPS proxy */
  679|    826|    if (proxy) {
  ------------------
  |  Branch (679:9): [True: 11, False: 815]
  ------------------
  680|     11|        flb_debug("[http_client] using http_proxy %s for header", proxy);
  ------------------
  |  |  167|     11|    if (flb_log_check(FLB_LOG_DEBUG))                               \
  |  |  ------------------
  |  |  |  |   42|     11|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  |  |  |  Branch (167:9): [True: 0, False: 11]
  |  |  ------------------
  |  |  168|     11|        flb_log_print(FLB_LOG_DEBUG, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  ------------------
  681|     11|        ret = snprintf(buf, FLB_HTTP_BUF_SIZE,
  ------------------
  |  |   28|     11|#define FLB_HTTP_BUF_SIZE        2048
  ------------------
  682|     11|                       fmt_proxy,
  683|     11|                       str_method,
  684|     11|                       host,
  685|     11|                       port,
  686|     11|                       uri,
  687|     11|                       flags & FLB_HTTP_10 ? 0 : 1);
  ------------------
  |  |   41|     11|#define FLB_HTTP_10          1
  ------------------
  |  Branch (687:24): [True: 0, False: 11]
  ------------------
  688|     11|    }
  689|    815|    else if (method == FLB_HTTP_CONNECT) {
  ------------------
  |  |   37|    815|#define FLB_HTTP_CONNECT     4
  ------------------
  |  Branch (689:14): [True: 502, False: 313]
  ------------------
  690|    502|        flb_debug("[http_client] using HTTP CONNECT for proxy: proxy host %s, proxy port %i", host, port);
  ------------------
  |  |  167|    502|    if (flb_log_check(FLB_LOG_DEBUG))                               \
  |  |  ------------------
  |  |  |  |   42|    502|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  |  |  |  Branch (167:9): [True: 0, False: 502]
  |  |  ------------------
  |  |  168|    502|        flb_log_print(FLB_LOG_DEBUG, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  ------------------
  691|    502|        ret = snprintf(buf, FLB_HTTP_BUF_SIZE,
  ------------------
  |  |   28|    502|#define FLB_HTTP_BUF_SIZE        2048
  ------------------
  692|    502|                       fmt_connect,
  693|    502|                       str_method,
  694|    502|                       host,
  695|    502|                       port,
  696|    502|                       flags & FLB_HTTP_10 ? 0 : 1);
  ------------------
  |  |   41|    502|#define FLB_HTTP_10          1
  ------------------
  |  Branch (696:24): [True: 0, False: 502]
  ------------------
  697|    502|    }
  698|    313|    else {
  699|    313|        flb_debug("[http_client] not using http_proxy for header");
  ------------------
  |  |  167|    313|    if (flb_log_check(FLB_LOG_DEBUG))                               \
  |  |  ------------------
  |  |  |  |   42|    313|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  |  |  |  Branch (167:9): [True: 0, False: 313]
  |  |  ------------------
  |  |  168|    313|        flb_log_print(FLB_LOG_DEBUG, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  ------------------
  700|    313|        ret = snprintf(buf, FLB_HTTP_BUF_SIZE,
  ------------------
  |  |   28|    313|#define FLB_HTTP_BUF_SIZE        2048
  ------------------
  701|    313|                       fmt_plain,
  702|    313|                       str_method,
  703|    313|                       uri,
  704|    313|                       flags & FLB_HTTP_10 ? 0 : 1);
  ------------------
  |  |   41|    313|#define FLB_HTTP_10          1
  ------------------
  |  Branch (704:24): [True: 0, False: 313]
  ------------------
  705|    313|    }
  706|       |
  707|    826|    if (ret == -1) {
  ------------------
  |  Branch (707:9): [True: 0, False: 826]
  ------------------
  708|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  709|      0|        flb_free(buf);
  710|      0|        return NULL;
  711|      0|    }
  712|       |
  713|    826|    c = flb_calloc(1, sizeof(struct flb_http_client));
  714|    826|    if (!c) {
  ------------------
  |  Branch (714:9): [True: 0, False: 826]
  ------------------
  715|      0|        flb_free(buf);
  716|      0|        return NULL;
  717|      0|    }
  718|       |
  719|    826|    c->u_conn      = u_conn;
  720|    826|    c->method      = method;
  721|    826|    c->uri         = uri;
  722|    826|    c->host        = host;
  723|    826|    c->port        = port;
  724|    826|    c->header_buf  = buf;
  725|    826|    c->header_size = FLB_HTTP_BUF_SIZE;
  ------------------
  |  |   28|    826|#define FLB_HTTP_BUF_SIZE        2048
  ------------------
  726|    826|    c->header_len  = ret;
  727|    826|    c->flags       = flags;
  728|    826|    c->allow_dup_headers = FLB_TRUE;
  ------------------
  |  |   26|    826|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    826|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  729|    826|    mk_list_init(&c->headers);
  730|       |
  731|       |    /* Check if we have a query string */
  732|    826|    p = strchr(uri, '?');
  733|    826|    if (p) {
  ------------------
  |  Branch (733:9): [True: 8, False: 818]
  ------------------
  734|      8|        p++;
  735|      8|        c->query_string = p;
  736|      8|    }
  737|       |
  738|       |    /* Is Upstream connection using keepalive mode ? */
  739|    826|    if (flb_stream_get_flag_status(&u_conn->upstream->base, FLB_IO_TCP_KA)) {
  ------------------
  |  |   37|    826|#define FLB_IO_TCP_KA     16  /* use async mode (depends on event loop) */
  ------------------
  |  Branch (739:9): [True: 0, False: 826]
  ------------------
  740|      0|        c->flags |= FLB_HTTP_KA;
  ------------------
  |  |   43|      0|#define FLB_HTTP_KA         16
  ------------------
  741|      0|    }
  742|       |
  743|       |    /* Response */
  744|    826|    c->resp.content_length = -1;
  745|    826|    c->resp.connection_close = -1;
  746|       |
  747|    826|    if ((flags & FLB_HTTP_10) == 0) {
  ------------------
  |  |   41|    826|#define FLB_HTTP_10          1
  ------------------
  |  Branch (747:9): [True: 826, False: 0]
  ------------------
  748|    826|        c->flags |= FLB_HTTP_11;
  ------------------
  |  |   42|    826|#define FLB_HTTP_11          2
  ------------------
  749|    826|    }
  750|       |
  751|    826|    if (body && body_len > 0) {
  ------------------
  |  Branch (751:9): [True: 0, False: 826]
  |  Branch (751:17): [True: 0, False: 0]
  ------------------
  752|      0|        c->body_buf = body;
  753|      0|        c->body_len = body_len;
  754|      0|    }
  755|       |
  756|    826|    add_host_and_content_length(c);
  757|       |
  758|       |    /* Check proxy data */
  759|    826|    if (proxy) {
  ------------------
  |  Branch (759:9): [True: 11, False: 815]
  ------------------
  760|     11|        flb_debug("[http_client] Using http_proxy: %s", proxy);
  ------------------
  |  |  167|     11|    if (flb_log_check(FLB_LOG_DEBUG))                               \
  |  |  ------------------
  |  |  |  |   42|     11|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  |  |  |  Branch (167:9): [True: 0, False: 11]
  |  |  ------------------
  |  |  168|     11|        flb_log_print(FLB_LOG_DEBUG, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  ------------------
  761|     11|        ret = proxy_parse(proxy, c);
  762|     11|        if (ret != 0) {
  ------------------
  |  Branch (762:13): [True: 11, False: 0]
  ------------------
  763|     11|            flb_debug("[http_client] Something wrong with the http_proxy parsing");
  ------------------
  |  |  167|     11|    if (flb_log_check(FLB_LOG_DEBUG))                               \
  |  |  ------------------
  |  |  |  |   42|     11|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  |  |  |  Branch (167:9): [True: 0, False: 11]
  |  |  ------------------
  |  |  168|     11|        flb_log_print(FLB_LOG_DEBUG, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  ------------------
  764|     11|            flb_http_client_destroy(c);
  765|     11|            return NULL;
  766|     11|        }
  767|     11|    }
  768|       |
  769|       |    /* 'Read' buffer size */
  770|    815|    c->resp.data = flb_malloc(FLB_HTTP_DATA_SIZE_MAX);
  ------------------
  |  |   29|    815|#define FLB_HTTP_DATA_SIZE_MAX   4096
  ------------------
  771|    815|    if (!c->resp.data) {
  ------------------
  |  Branch (771:9): [True: 0, False: 815]
  ------------------
  772|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  773|      0|        flb_http_client_destroy(c);
  774|      0|        return NULL;
  775|      0|    }
  776|    815|    c->resp.data[0] = '\0';
  777|    815|    c->resp.data_len  = 0;
  778|    815|    c->resp.data_size = FLB_HTTP_DATA_SIZE_MAX;
  ------------------
  |  |   29|    815|#define FLB_HTTP_DATA_SIZE_MAX   4096
  ------------------
  779|    815|    c->resp.data_size_max = FLB_HTTP_DATA_SIZE_MAX;
  ------------------
  |  |   29|    815|#define FLB_HTTP_DATA_SIZE_MAX   4096
  ------------------
  780|       |
  781|    815|    return c;
  782|    815|}
flb_http_buffer_size:
  796|  1.21k|{
  797|  1.21k|    if (size < c->resp.data_size_max && size != 0) {
  ------------------
  |  Branch (797:9): [True: 759, False: 458]
  |  Branch (797:41): [True: 703, False: 56]
  ------------------
  798|    703|        flb_error("[http] requested buffer size %lu (bytes) needs to be greater than "
  ------------------
  |  |  140|    703|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|    703|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 703, False: 0]
  |  |  ------------------
  |  |  141|    703|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|    703|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  799|    703|                  "minimum size allowed %lu (bytes)",
  800|    703|                  size, c->resp.data_size_max);
  801|    703|        return -1;
  802|    703|    }
  803|       |
  804|    514|    c->resp.data_size_max = size;
  805|    514|    return 0;
  806|  1.21k|}
flb_http_buffer_available:
  809|    402|{
  810|    402|    return (c->resp.data_size - c->resp.data_len);
  811|    402|}
flb_http_buffer_increase:
  821|    402|{
  822|    402|    int off_payload = 0;
  823|    402|    int off_headers_end = 0;
  824|    402|    int off_chunk_processed_end = 0;
  825|    402|    char *tmp;
  826|    402|    size_t new_size;
  827|    402|    size_t allocated;
  828|       |
  829|    402|    *out_size = 0;
  830|    402|    new_size = c->resp.data_size + size;
  831|       |
  832|       |    /* Limit exceeded, adjust */
  833|    402|    if (c->resp.data_size_max != 0) {
  ------------------
  |  Branch (833:9): [True: 373, False: 29]
  ------------------
  834|    373|        if (new_size > c->resp.data_size_max) {
  ------------------
  |  Branch (834:13): [True: 320, False: 53]
  ------------------
  835|    320|            new_size = c->resp.data_size_max;
  836|    320|            if (new_size <= c->resp.data_size) {
  ------------------
  |  Branch (836:17): [True: 320, False: 0]
  ------------------
  837|       |                /* Can't expand the buffer any further. */
  838|    320|                return -1;
  839|    320|            }
  840|    320|        }
  841|    373|    }
  842|       |
  843|       |
  844|     82|    if (c->resp.headers_end) {
  ------------------
  |  Branch (844:9): [True: 0, False: 82]
  ------------------
  845|      0|        off_headers_end = c->resp.headers_end - c->resp.data;
  846|      0|    }
  847|     82|    if (c->resp.chunk_processed_end) {
  ------------------
  |  Branch (847:9): [True: 0, False: 82]
  ------------------
  848|      0|        off_chunk_processed_end = c->resp.chunk_processed_end - c->resp.data;
  849|      0|    }
  850|       |
  851|       |    /*
  852|       |     * The payload is a reference to a position of 'data' buffer,
  853|       |     * we need to adjust the pointer after a memory buffer size change.
  854|       |     */
  855|     82|    if (c->resp.payload_size > 0) {
  ------------------
  |  Branch (855:9): [True: 0, False: 82]
  ------------------
  856|      0|        off_payload = c->resp.payload - c->resp.data;
  857|      0|    }
  858|       |
  859|     82|    tmp = flb_realloc(c->resp.data, new_size);
  860|     82|    if (!tmp) {
  ------------------
  |  Branch (860:9): [True: 0, False: 82]
  ------------------
  861|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  862|      0|        return -1;
  863|      0|    }
  864|     82|    else {
  865|     82|        allocated = new_size - c->resp.data_size;
  866|     82|        c->resp.data = tmp;
  867|     82|        c->resp.data_size = new_size;
  868|       |
  869|     82|        if (off_headers_end > 0) {
  ------------------
  |  Branch (869:13): [True: 0, False: 82]
  ------------------
  870|      0|            c->resp.headers_end = c->resp.data + off_headers_end;
  871|      0|        }
  872|     82|        if (off_chunk_processed_end > 0) {
  ------------------
  |  Branch (872:13): [True: 0, False: 82]
  ------------------
  873|      0|            c->resp.chunk_processed_end = c->resp.data + off_chunk_processed_end;
  874|      0|        }
  875|     82|        if (off_payload > 0) {
  ------------------
  |  Branch (875:13): [True: 0, False: 82]
  ------------------
  876|      0|            c->resp.payload = c->resp.data + off_payload;
  877|      0|        }
  878|     82|    }
  879|       |
  880|     82|    *out_size = allocated;
  881|     82|    return 0;
  882|     82|}
flb_http_add_header:
  889|  4.07k|{
  890|  4.07k|    struct flb_kv *kv;
  891|  4.07k|    struct mk_list *tmp;
  892|  4.07k|    struct mk_list *head;
  893|       |
  894|  4.07k|    if (key_len < 1 || val_len < 1) {
  ------------------
  |  Branch (894:9): [True: 0, False: 4.07k]
  |  Branch (894:24): [True: 0, False: 4.07k]
  ------------------
  895|      0|        return -1;
  896|      0|    }
  897|       |
  898|       |    /* Check any previous header to avoid duplicates */
  899|  4.07k|    if (c->allow_dup_headers == FLB_FALSE) {
  ------------------
  |  |   25|  4.07k|#define FLB_FALSE  0
  ------------------
  |  Branch (899:9): [True: 804, False: 3.27k]
  ------------------
  900|  4.42k|        mk_list_foreach_safe(head, tmp, &c->headers) {
  ------------------
  |  |  207|  5.22k|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 4.42k, False: 804]
  |  |  ------------------
  ------------------
  901|  4.42k|            kv = mk_list_entry(head, struct flb_kv, _head);
  ------------------
  |  |  214|  4.42k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  4.42k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  4.42k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  4.42k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  902|  4.42k|            if (flb_sds_casecmp(kv->key, key, key_len) == 0) {
  ------------------
  |  Branch (902:17): [True: 0, False: 4.42k]
  ------------------
  903|       |                /* the header already exists, remove it */
  904|      0|                flb_kv_item_destroy(kv);
  905|      0|                break;
  906|      0|            }
  907|  4.42k|        }
  908|    804|    }
  909|       |
  910|       |    /* register new header in the temporal kv list */
  911|  4.07k|    kv = flb_kv_item_create_len(&c->headers,
  912|  4.07k|                                (char *) key, key_len, (char *) val, val_len);
  913|  4.07k|    if (!kv) {
  ------------------
  |  Branch (913:9): [True: 0, False: 4.07k]
  ------------------
  914|      0|        return -1;
  915|      0|    }
  916|       |
  917|  4.07k|    return 0;
  918|  4.07k|}
flb_http_set_keepalive:
 1031|    402|{
 1032|       |    /* check if 'keepalive' mode is enabled in the Upstream connection */
 1033|    402|    if (flb_stream_is_keepalive(c->u_conn->stream)) {
  ------------------
  |  Branch (1033:9): [True: 0, False: 402]
  ------------------
 1034|      0|        return -1;
 1035|      0|    }
 1036|       |
 1037|       |    /* append header */
 1038|    402|    return flb_http_add_header(c,
 1039|    402|                               FLB_HTTP_HEADER_CONNECTION,
  ------------------
  |  |   61|    402|#define FLB_HTTP_HEADER_CONNECTION       "Connection"
  ------------------
 1040|    402|                               sizeof(FLB_HTTP_HEADER_CONNECTION) - 1,
  ------------------
  |  |   61|    402|#define FLB_HTTP_HEADER_CONNECTION       "Connection"
  ------------------
 1041|    402|                               FLB_HTTP_HEADER_KA,
  ------------------
  |  |   62|    402|#define FLB_HTTP_HEADER_KA               "keep-alive"
  ------------------
 1042|    402|                               sizeof(FLB_HTTP_HEADER_KA) - 1);
  ------------------
  |  |   62|    402|#define FLB_HTTP_HEADER_KA               "keep-alive"
  ------------------
 1043|    402|}
flb_http_set_content_encoding_gzip:
 1047|    402|{
 1048|    402|    int ret;
 1049|       |
 1050|    402|    ret = flb_http_add_header(c,
 1051|    402|                              FLB_HTTP_HEADER_CONTENT_ENCODING,
  ------------------
  |  |   60|    402|#define FLB_HTTP_HEADER_CONTENT_ENCODING "Content-Encoding"
  ------------------
 1052|    402|                              sizeof(FLB_HTTP_HEADER_CONTENT_ENCODING) - 1,
  ------------------
  |  |   60|    402|#define FLB_HTTP_HEADER_CONTENT_ENCODING "Content-Encoding"
  ------------------
 1053|    402|                              "gzip", 4);
 1054|    402|    return ret;
 1055|    402|}
flb_http_add_auth_header:
 1065|    402|                             const char *user, const char *passwd, const char *header) {
 1066|    402|    int ret;
 1067|    402|    int len_u;
 1068|    402|    int len_p;
 1069|    402|    int len_h;
 1070|    402|    int len_out;
 1071|    402|    char tmp[1024];
 1072|    402|    char *p;
 1073|    402|    size_t b64_len;
 1074|       |
 1075|       |    /*
 1076|       |     * We allow a max of 255 bytes for user and password (255 each), meaning
 1077|       |     * we need at least:
 1078|       |     *
 1079|       |     * 'Basic base64(user : passwd)' => ~688 bytes
 1080|       |     *
 1081|       |     */
 1082|       |
 1083|    402|    len_u = strlen(user);
 1084|       |
 1085|    402|    if (passwd) {
  ------------------
  |  Branch (1085:9): [True: 402, False: 0]
  ------------------
 1086|    402|        len_p = strlen(passwd);
 1087|    402|    }
 1088|      0|    else {
 1089|      0|        len_p = 0;
 1090|      0|    }
 1091|       |
 1092|    402|    p = flb_malloc(len_u + len_p + 2);
 1093|    402|    if (!p) {
  ------------------
  |  Branch (1093:9): [True: 0, False: 402]
  ------------------
 1094|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
 1095|      0|        return -1;
 1096|      0|    }
 1097|       |
 1098|    402|    memcpy(p, user, len_u);
 1099|    402|    p[len_u] = ':';
 1100|    402|    len_out = len_u + 1;
 1101|       |
 1102|    402|    if (passwd) {
  ------------------
  |  Branch (1102:9): [True: 402, False: 0]
  ------------------
 1103|    402|        memcpy(p + len_out, passwd, len_p);
 1104|    402|        len_out += len_p;
 1105|    402|    }
 1106|    402|    p[len_out] = '\0';
 1107|       |
 1108|    402|    memcpy(tmp, "Basic ", 6);
 1109|    402|    ret = flb_base64_encode((unsigned char *) tmp + 6, sizeof(tmp) - 7, &b64_len,
 1110|    402|                                (unsigned char *) p, len_out);
 1111|    402|    if (ret != 0) {
  ------------------
  |  Branch (1111:9): [True: 0, False: 402]
  ------------------
 1112|      0|        flb_free(p);
 1113|      0|        return -1;
 1114|      0|    }
 1115|       |
 1116|    402|    flb_free(p);
 1117|    402|    b64_len += 6;
 1118|       |
 1119|    402|    len_h = strlen(header);
 1120|    402|    ret = flb_http_add_header(c,
 1121|    402|                              header,
 1122|    402|                              len_h,
 1123|    402|                              tmp, b64_len);
 1124|    402|    return ret;
 1125|    402|}
flb_http_basic_auth:
 1129|    402|{
 1130|    402|    return flb_http_add_auth_header(c, user, passwd, FLB_HTTP_HEADER_AUTH);
  ------------------
  |  |   57|    402|#define FLB_HTTP_HEADER_AUTH             "Authorization"
  ------------------
 1131|    402|}
flb_http_do:
 1178|    815|{
 1179|    815|    int ret;
 1180|    815|    int r_bytes;
 1181|    815|    int crlf = 2;
 1182|    815|    int new_size;
 1183|    815|    ssize_t available;
 1184|    815|    size_t out_size;
 1185|    815|    size_t bytes_header = 0;
 1186|    815|    size_t bytes_body = 0;
 1187|    815|    char *tmp;
 1188|       |
 1189|       |    /* Append pending headers */
 1190|    815|    ret = http_headers_compose(c);
 1191|    815|    if (ret == -1) {
  ------------------
  |  Branch (1191:9): [True: 0, False: 815]
  ------------------
 1192|      0|        return -1;
 1193|      0|    }
 1194|       |
 1195|       |    /* check enough space for the ending CRLF */
 1196|    815|    if (header_available(c, crlf) != 0) {
  ------------------
  |  Branch (1196:9): [True: 3, False: 812]
  ------------------
 1197|      3|        new_size = c->header_size + 2;
 1198|      3|        tmp = flb_realloc(c->header_buf, new_size);
 1199|      3|        if (!tmp) {
  ------------------
  |  Branch (1199:13): [True: 0, False: 3]
  ------------------
 1200|      0|            flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
 1201|      0|            return -1;
 1202|      0|        }
 1203|      3|        c->header_buf  = tmp;
 1204|      3|        c->header_size = new_size;
 1205|      3|    }
 1206|       |
 1207|       |    /* Append the ending header CRLF */
 1208|    815|    c->header_buf[c->header_len++] = '\r';
 1209|    815|    c->header_buf[c->header_len++] = '\n';
 1210|       |
 1211|       |#ifdef FLB_HAVE_HTTP_CLIENT_DEBUG
 1212|       |    /* debug: request_headers callback */
 1213|       |    flb_http_client_debug_cb(c, "_debug.http.request_headers");
 1214|       |
 1215|       |    /* debug: request_payload callback */
 1216|       |    if (c->body_len > 0) {
 1217|       |        flb_http_client_debug_cb(c, "_debug.http.request_payload");
 1218|       |    }
 1219|       |#endif
 1220|       |
 1221|       |    /* Write the header */
 1222|    815|    ret = flb_io_net_write(c->u_conn,
 1223|    815|                           c->header_buf, c->header_len,
 1224|    815|                           &bytes_header);
 1225|    815|    if (ret == -1) {
  ------------------
  |  Branch (1225:9): [True: 815, False: 0]
  ------------------
 1226|       |        /* errno might be changed from the original call */
 1227|    815|        if (errno != 0) {
  ------------------
  |  Branch (1227:13): [True: 815, False: 0]
  ------------------
 1228|    815|            flb_errno();
  ------------------
  |  |  201|    815|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
 1229|    815|        }
 1230|    815|        return -1;
 1231|    815|    }
 1232|       |
 1233|      0|    if (c->body_len > 0) {
  ------------------
  |  Branch (1233:9): [True: 0, False: 0]
  ------------------
 1234|      0|        ret = flb_io_net_write(c->u_conn,
 1235|      0|                               c->body_buf, c->body_len,
 1236|      0|                               &bytes_body);
 1237|      0|        if (ret == -1) {
  ------------------
  |  Branch (1237:13): [True: 0, False: 0]
  ------------------
 1238|      0|            flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
 1239|      0|            return -1;
 1240|      0|        }
 1241|      0|    }
 1242|       |
 1243|       |    /* number of sent bytes */
 1244|      0|    *bytes = (bytes_header + bytes_body);
 1245|       |
 1246|       |    /* Read the server response, we need at least 19 bytes */
 1247|      0|    c->resp.data_len = 0;
 1248|      0|    while (1) {
  ------------------
  |  Branch (1248:12): [Folded - Ignored]
  ------------------
 1249|      0|        available = flb_http_buffer_available(c) - 1;
 1250|      0|        if (available <= 1) {
  ------------------
  |  Branch (1250:13): [True: 0, False: 0]
  ------------------
 1251|       |            /*
 1252|       |             * If there is no more space available on our buffer, try to
 1253|       |             * increase it.
 1254|       |             */
 1255|      0|            ret = flb_http_buffer_increase(c, FLB_HTTP_DATA_CHUNK,
  ------------------
  |  |   30|      0|#define FLB_HTTP_DATA_CHUNK     32768
  ------------------
 1256|      0|                                           &out_size);
 1257|      0|            if (ret == -1) {
  ------------------
  |  Branch (1257:17): [True: 0, False: 0]
  ------------------
 1258|       |                /*
 1259|       |                 * We could not allocate more space, let the caller handle
 1260|       |                 * this.
 1261|       |                 */
 1262|      0|                flb_warn("[http_client] cannot increase buffer: current=%zu "
  ------------------
  |  |  149|      0|    if (flb_log_check(FLB_LOG_WARN))                                 \
  |  |  ------------------
  |  |  |  |   40|      0|#define FLB_LOG_WARN    2
  |  |  ------------------
  |  |  |  Branch (149:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  150|      0|        flb_log_print(FLB_LOG_WARN, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   40|      0|#define FLB_LOG_WARN    2
  |  |  ------------------
  |  |                       flb_log_print(FLB_LOG_WARN, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  | 1263|      0|                         "requested=%zu max=%zu", c->resp.data_size,
  |  |  |  | 1264|      0|                         c->resp.data_size + FLB_HTTP_DATA_CHUNK,
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define FLB_HTTP_DATA_CHUNK     32768
  |  |  |  |  ------------------
  |  |  |  | 1265|      0|                         c->resp.data_size_max);
  |  |  ------------------
  ------------------
 1263|      0|                         "requested=%zu max=%zu", c->resp.data_size,
 1264|      0|                         c->resp.data_size + FLB_HTTP_DATA_CHUNK,
 1265|      0|                         c->resp.data_size_max);
 1266|      0|                flb_upstream_conn_recycle(c->u_conn, FLB_FALSE);
  ------------------
  |  |   25|      0|#define FLB_FALSE  0
  ------------------
 1267|      0|                return 0;
 1268|      0|            }
 1269|      0|            available = flb_http_buffer_available(c) - 1;
 1270|      0|        }
 1271|       |
 1272|      0|        r_bytes = flb_io_net_read(c->u_conn,
 1273|      0|                                  c->resp.data + c->resp.data_len,
 1274|      0|                                  available);
 1275|      0|        if (r_bytes <= 0) {
  ------------------
  |  Branch (1275:13): [True: 0, False: 0]
  ------------------
 1276|      0|            if (c->flags & FLB_HTTP_10) {
  ------------------
  |  |   41|      0|#define FLB_HTTP_10          1
  ------------------
  |  Branch (1276:17): [True: 0, False: 0]
  ------------------
 1277|      0|                break;
 1278|      0|            }
 1279|      0|        }
 1280|       |
 1281|       |        /* Always append a NULL byte */
 1282|      0|        if (r_bytes >= 0) {
  ------------------
  |  Branch (1282:13): [True: 0, False: 0]
  ------------------
 1283|      0|            c->resp.data_len += r_bytes;
 1284|      0|            c->resp.data[c->resp.data_len] = '\0';
 1285|       |
 1286|      0|            ret = process_data(c);
 1287|      0|            if (ret == FLB_HTTP_ERROR) {
  ------------------
  |  |   51|      0|#define FLB_HTTP_ERROR           -1
  ------------------
  |  Branch (1287:17): [True: 0, False: 0]
  ------------------
 1288|      0|                flb_warn("[http_client] malformed HTTP response from %s:%i on "
  ------------------
  |  |  149|      0|    if (flb_log_check(FLB_LOG_WARN))                                 \
  |  |  ------------------
  |  |  |  |   40|      0|#define FLB_LOG_WARN    2
  |  |  ------------------
  |  |  |  Branch (149:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  150|      0|        flb_log_print(FLB_LOG_WARN, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   40|      0|#define FLB_LOG_WARN    2
  |  |  ------------------
  ------------------
 1289|      0|                         "connection #%i",
 1290|      0|                         c->u_conn->upstream->tcp_host,
 1291|      0|                         c->u_conn->upstream->tcp_port,
 1292|      0|                         c->u_conn->fd);
 1293|      0|                return -1;
 1294|      0|            }
 1295|      0|            else if (ret == FLB_HTTP_OK) {
  ------------------
  |  |   53|      0|#define FLB_HTTP_OK               1
  ------------------
  |  Branch (1295:22): [True: 0, False: 0]
  ------------------
 1296|      0|                break;
 1297|      0|            }
 1298|      0|            else if (ret == FLB_HTTP_MORE) {
  ------------------
  |  |   52|      0|#define FLB_HTTP_MORE             0
  ------------------
  |  Branch (1298:22): [True: 0, False: 0]
  ------------------
 1299|      0|                continue;
 1300|      0|            }
 1301|      0|        }
 1302|      0|        else {
 1303|      0|            flb_error("[http_client] broken connection to %s:%i ?",
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
 1304|      0|                      c->u_conn->upstream->tcp_host,
 1305|      0|                      c->u_conn->upstream->tcp_port);
 1306|      0|            return -1;
 1307|      0|        }
 1308|      0|    }
 1309|       |
 1310|       |    /* Check 'Connection' response header */
 1311|      0|    ret = check_connection(c);
 1312|      0|    if (ret == FLB_HTTP_OK) {
  ------------------
  |  |   53|      0|#define FLB_HTTP_OK               1
  ------------------
  |  Branch (1312:9): [True: 0, False: 0]
  ------------------
 1313|       |        /*
 1314|       |         * If the server replied that the connection will be closed
 1315|       |         * and our Upstream connection is in keepalive mode, we must
 1316|       |         * inactivate the connection.
 1317|       |         */
 1318|      0|        if (c->resp.connection_close == FLB_TRUE) {
  ------------------
  |  |   26|      0|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      0|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  |  Branch (1318:13): [True: 0, False: 0]
  ------------------
 1319|       |            /* Do not recycle the connection (no more keepalive) */
 1320|      0|            flb_upstream_conn_recycle(c->u_conn, FLB_FALSE);
  ------------------
  |  |   25|      0|#define FLB_FALSE  0
  ------------------
 1321|      0|            flb_debug("[http_client] server %s:%i will close connection #%i",
  ------------------
  |  |  167|      0|    if (flb_log_check(FLB_LOG_DEBUG))                               \
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  |  |  |  Branch (167:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  168|      0|        flb_log_print(FLB_LOG_DEBUG, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  ------------------
 1322|      0|                      c->u_conn->upstream->tcp_host,
 1323|      0|                      c->u_conn->upstream->tcp_port,
 1324|      0|                      c->u_conn->fd);
 1325|      0|        }
 1326|      0|    }
 1327|       |
 1328|       |#ifdef FLB_HAVE_HTTP_CLIENT_DEBUG
 1329|       |    flb_http_client_debug_cb(c, "_debug.http.response_headers");
 1330|       |    if (c->resp.payload_size > 0) {
 1331|       |        flb_http_client_debug_cb(c, "_debug.http.response_payload");
 1332|       |    }
 1333|       |#endif
 1334|       |
 1335|      0|    return 0;
 1336|      0|}
flb_http_client_proxy_connect:
 1345|    413|{
 1346|    413|    struct flb_upstream *u = u_conn->upstream;
 1347|    413|    struct flb_http_client *c;
 1348|    413|    size_t b_sent;
 1349|    413|    int ret = -1;
 1350|       |
 1351|       |    /* Don't pass proxy when using FLB_HTTP_CONNECT */
 1352|    413|    flb_debug("[upstream] establishing http tunneling to proxy: host %s port %d", u->tcp_host, u->tcp_port);
  ------------------
  |  |  167|    413|    if (flb_log_check(FLB_LOG_DEBUG))                               \
  |  |  ------------------
  |  |  |  |   42|    413|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  |  |  |  Branch (167:9): [True: 0, False: 413]
  |  |  ------------------
  |  |  168|    413|        flb_log_print(FLB_LOG_DEBUG, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  ------------------
 1353|    413|    c = flb_http_client(u_conn, FLB_HTTP_CONNECT, "", NULL,
  ------------------
  |  |   37|    413|#define FLB_HTTP_CONNECT     4
  ------------------
 1354|    413|                        0, u->proxied_host, u->proxied_port, NULL, 0);
 1355|       |
 1356|       |    /* Setup proxy's username and password */
 1357|    413|    if (u->proxy_username && u->proxy_password) {
  ------------------
  |  Branch (1357:9): [True: 0, False: 413]
  |  Branch (1357:30): [True: 0, False: 0]
  ------------------
 1358|      0|        flb_debug("[upstream] proxy uses username %s password %s", u->proxy_username, u->proxy_password);
  ------------------
  |  |  167|      0|    if (flb_log_check(FLB_LOG_DEBUG))                               \
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  |  |  |  Branch (167:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  168|      0|        flb_log_print(FLB_LOG_DEBUG, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  ------------------
 1359|      0|        flb_http_proxy_auth(c, u->proxy_username, u->proxy_password);
 1360|      0|    }
 1361|       |
 1362|    413|    flb_http_buffer_size(c, 4192);
 1363|       |
 1364|    413|    flb_http_add_header(c, "User-Agent", 10, "Fluent-Bit", 10);
 1365|       |
 1366|       |    /* Send HTTP request */
 1367|    413|    ret = flb_http_do(c, &b_sent);
 1368|       |
 1369|       |    /* Validate HTTP response */
 1370|    413|    if (ret != 0) {
  ------------------
  |  Branch (1370:9): [True: 413, False: 0]
  ------------------
 1371|    413|        flb_error("[upstream] error in flb_establish_proxy: %d", ret);
  ------------------
  |  |  140|    413|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|    413|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 413, False: 0]
  |  |  ------------------
  |  |  141|    413|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|    413|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
 1372|    413|        ret = -1;
 1373|    413|    }
 1374|      0|    else {
 1375|       |        /* The request was issued successfully, validate the 'error' field */
 1376|      0|        flb_debug("[upstream] proxy returned %d", c->resp.status);
  ------------------
  |  |  167|      0|    if (flb_log_check(FLB_LOG_DEBUG))                               \
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  |  |  |  Branch (167:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  168|      0|        flb_log_print(FLB_LOG_DEBUG, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  ------------------
 1377|      0|        if (c->resp.status == 200) {
  ------------------
  |  Branch (1377:13): [True: 0, False: 0]
  ------------------
 1378|      0|            ret = 0;
 1379|      0|        }
 1380|      0|        else {
 1381|      0|            flb_error("flb_establish_proxy error: %s", c->resp.payload);
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
 1382|      0|            ret = -1;
 1383|      0|        }
 1384|      0|    }
 1385|       |
 1386|       |    /* Cleanup */
 1387|    413|    flb_http_client_destroy(c);
 1388|       |
 1389|    413|    return ret;
 1390|    413|}
flb_http_client_destroy:
 1393|    826|{
 1394|    826|    http_headers_destroy(c);
 1395|    826|    flb_free(c->resp.data);
 1396|    826|    flb_free(c->header_buf);
 1397|    826|    flb_free((void *)c->proxy.host);
 1398|    826|    flb_free(c);
 1399|    826|}
flb_http_client.c:process_data:
  385|    402|{
  386|    402|    int ret;
  387|    402|    char code[4];
  388|    402|    char *tmp;
  389|       |
  390|    402|    if (c->resp.data_len < 15) {
  ------------------
  |  Branch (390:9): [True: 0, False: 402]
  ------------------
  391|       |        /* we need more data */
  392|      0|        return FLB_HTTP_MORE;
  ------------------
  |  |   52|      0|#define FLB_HTTP_MORE             0
  ------------------
  393|      0|    }
  394|       |
  395|       |    /* HTTP response status */
  396|    402|    if (c->resp.status <= 0) {
  ------------------
  |  Branch (396:9): [True: 0, False: 402]
  ------------------
  397|      0|        memcpy(code, c->resp.data + 9, 3);
  398|      0|        code[3] = '\0';
  399|      0|        c->resp.status = atoi(code);
  400|      0|        if (c->resp.status < 100 || c->resp.status > 599) {
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  |  Branch (400:37): [True: 0, False: 0]
  ------------------
  401|      0|            return FLB_HTTP_ERROR;
  ------------------
  |  |   51|      0|#define FLB_HTTP_ERROR           -1
  ------------------
  402|      0|        }
  403|      0|    }
  404|       |
  405|       |    /* Try to lookup content length */
  406|    402|    if (c->resp.content_length == -1 && c->resp.chunked_encoding == FLB_FALSE) {
  ------------------
  |  |   25|    402|#define FLB_FALSE  0
  ------------------
  |  Branch (406:9): [True: 402, False: 0]
  |  Branch (406:41): [True: 402, False: 0]
  ------------------
  407|    402|        ret = check_content_length(c);
  408|    402|        if (ret == FLB_HTTP_ERROR) {
  ------------------
  |  |   51|    402|#define FLB_HTTP_ERROR           -1
  ------------------
  |  Branch (408:13): [True: 0, False: 402]
  ------------------
  409|      0|            return FLB_HTTP_ERROR;
  ------------------
  |  |   51|      0|#define FLB_HTTP_ERROR           -1
  ------------------
  410|      0|        }
  411|    402|    }
  412|       |
  413|       |    /* Chunked encoding for HTTP/1.1 (no content length of course) */
  414|    402|    if ((c->flags & FLB_HTTP_11) && c->resp.content_length == -1) {
  ------------------
  |  |   42|    402|#define FLB_HTTP_11          2
  ------------------
  |  Branch (414:9): [True: 402, False: 0]
  |  Branch (414:37): [True: 324, False: 78]
  ------------------
  415|    324|        if (c->resp.chunked_encoding == FLB_FALSE) {
  ------------------
  |  |   25|    324|#define FLB_FALSE  0
  ------------------
  |  Branch (415:13): [True: 324, False: 0]
  ------------------
  416|    324|            ret = check_chunked_encoding(c);
  417|    324|            if (ret == FLB_HTTP_ERROR) {
  ------------------
  |  |   51|    324|#define FLB_HTTP_ERROR           -1
  ------------------
  |  Branch (417:17): [True: 0, False: 324]
  ------------------
  418|      0|                return FLB_HTTP_ERROR;
  ------------------
  |  |   51|      0|#define FLB_HTTP_ERROR           -1
  ------------------
  419|      0|            }
  420|    324|        }
  421|    324|    }
  422|       |
  423|    402|    if (!c->resp.headers_end) {
  ------------------
  |  Branch (423:9): [True: 402, False: 0]
  ------------------
  424|    402|        tmp = strstr(c->resp.data, "\r\n\r\n");
  425|    402|        if (tmp) {
  ------------------
  |  Branch (425:13): [True: 155, False: 247]
  ------------------
  426|    155|            c->resp.headers_end = tmp + 4;
  427|    155|            if (c->resp.chunked_encoding == FLB_TRUE) {
  ------------------
  |  |   26|    155|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    155|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  |  Branch (427:17): [True: 69, False: 86]
  ------------------
  428|     69|                c->resp.chunk_processed_end = c->resp.headers_end;
  429|     69|            }
  430|       |
  431|       |            /* Mark the payload */
  432|    155|            if ((tmp - c->resp.data + 4) < c->resp.data_len) {
  ------------------
  |  Branch (432:17): [True: 92, False: 63]
  ------------------
  433|     92|                c->resp.payload = tmp += 4;
  434|     92|                c->resp.payload_size = (c->resp.data_len - (tmp - c->resp.data));
  435|     92|            }
  436|    155|        }
  437|    247|        else {
  438|    247|            return FLB_HTTP_MORE;
  ------------------
  |  |   52|    247|#define FLB_HTTP_MORE             0
  ------------------
  439|    247|        }
  440|    402|    }
  441|       |
  442|       |    /* Re-check if an ending exists, if so process payload if required */
  443|    155|    if (c->resp.headers_end) {
  ------------------
  |  Branch (443:9): [True: 155, False: 0]
  ------------------
  444|       |        /* Mark the payload */
  445|    155|        if (!c->resp.payload &&
  ------------------
  |  Branch (445:13): [True: 63, False: 92]
  ------------------
  446|    155|            c->resp.headers_end - c->resp.data < c->resp.data_len) {
  ------------------
  |  Branch (446:13): [True: 0, False: 63]
  ------------------
  447|      0|            c->resp.payload = c->resp.headers_end;
  448|      0|            c->resp.payload_size = (c->resp.data_len - (c->resp.headers_end - c->resp.data));
  449|      0|        }
  450|       |
  451|    155|        if (c->resp.content_length >= 0) {
  ------------------
  |  Branch (451:13): [True: 41, False: 114]
  ------------------
  452|     41|            c->resp.payload_size = c->resp.data_len;
  453|     41|            c->resp.payload_size -= (c->resp.headers_end - c->resp.data);
  454|     41|            if (c->resp.payload_size >= c->resp.content_length) {
  ------------------
  |  Branch (454:17): [True: 8, False: 33]
  ------------------
  455|      8|                return FLB_HTTP_OK;
  ------------------
  |  |   53|      8|#define FLB_HTTP_OK               1
  ------------------
  456|      8|            }
  457|     41|        }
  458|    114|        else if (c->resp.chunked_encoding == FLB_TRUE) {
  ------------------
  |  |   26|    114|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    114|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  |  Branch (458:18): [True: 69, False: 45]
  ------------------
  459|     69|            ret = process_chunked_data(c);
  460|     69|            if (ret == FLB_HTTP_ERROR) {
  ------------------
  |  |   51|     69|#define FLB_HTTP_ERROR           -1
  ------------------
  |  Branch (460:17): [True: 42, False: 27]
  ------------------
  461|     42|                return FLB_HTTP_ERROR;
  ------------------
  |  |   51|     42|#define FLB_HTTP_ERROR           -1
  ------------------
  462|     42|            }
  463|     27|            else if (ret == FLB_HTTP_OK) {
  ------------------
  |  |   53|     27|#define FLB_HTTP_OK               1
  ------------------
  |  Branch (463:22): [True: 1, False: 26]
  ------------------
  464|      1|                return FLB_HTTP_OK;
  ------------------
  |  |   53|      1|#define FLB_HTTP_OK               1
  ------------------
  465|      1|            }
  466|     69|        }
  467|     45|        else {
  468|     45|            return FLB_HTTP_OK;
  ------------------
  |  |   53|     45|#define FLB_HTTP_OK               1
  ------------------
  469|     45|        }
  470|    155|    }
  471|      0|    else if (c->resp.headers_end && c->resp.content_length <= 0) {
  ------------------
  |  Branch (471:14): [True: 0, False: 0]
  |  Branch (471:37): [True: 0, False: 0]
  ------------------
  472|      0|        return FLB_HTTP_OK;
  ------------------
  |  |   53|      0|#define FLB_HTTP_OK               1
  ------------------
  473|      0|    }
  474|       |
  475|     59|    return FLB_HTTP_MORE;
  ------------------
  |  |   52|     59|#define FLB_HTTP_MORE             0
  ------------------
  476|    155|}
flb_http_client.c:check_content_length:
  191|    402|{
  192|    402|    int ret;
  193|    402|    int len;
  194|    402|    const char *header;
  195|    402|    char tmp[256];
  196|       |
  197|    402|    if (c->resp.status == 204) {
  ------------------
  |  Branch (197:9): [True: 0, False: 402]
  ------------------
  198|      0|        c->resp.content_length = -1;
  199|      0|        return FLB_HTTP_OK;
  ------------------
  |  |   53|      0|#define FLB_HTTP_OK               1
  ------------------
  200|      0|    }
  201|       |
  202|    402|    ret = header_lookup(c, "Content-Length: ", 16,
  203|    402|                        &header, &len);
  204|    402|    if (ret == FLB_HTTP_MORE) {
  ------------------
  |  |   52|    402|#define FLB_HTTP_MORE             0
  ------------------
  |  Branch (204:9): [True: 245, False: 157]
  ------------------
  205|    245|        return FLB_HTTP_MORE;
  ------------------
  |  |   52|    245|#define FLB_HTTP_MORE             0
  ------------------
  206|    245|    }
  207|    157|    else if (ret == FLB_HTTP_NOT_FOUND) {
  ------------------
  |  |   54|    157|#define FLB_HTTP_NOT_FOUND        2 /* header not found */
  ------------------
  |  Branch (207:14): [True: 79, False: 78]
  ------------------
  208|     79|        return FLB_HTTP_NOT_FOUND;
  ------------------
  |  |   54|     79|#define FLB_HTTP_NOT_FOUND        2 /* header not found */
  ------------------
  209|     79|    }
  210|       |
  211|     78|    if (len > sizeof(tmp) - 1) {
  ------------------
  |  Branch (211:9): [True: 0, False: 78]
  ------------------
  212|       |        /* Value too long */
  213|      0|        return FLB_HTTP_ERROR;
  ------------------
  |  |   51|      0|#define FLB_HTTP_ERROR           -1
  ------------------
  214|      0|    }
  215|       |
  216|       |    /* Copy to temporary buffer */
  217|     78|    memcpy(tmp, header, len);
  218|     78|    tmp[len] = '\0';
  219|       |
  220|     78|    c->resp.content_length = atoi(tmp);
  221|     78|    return FLB_HTTP_OK;
  ------------------
  |  |   53|     78|#define FLB_HTTP_OK               1
  ------------------
  222|     78|}
flb_http_client.c:header_lookup:
  123|  1.12k|{
  124|  1.12k|    char *p;
  125|  1.12k|    char *crlf;
  126|  1.12k|    char *end;
  127|       |
  128|  1.12k|    if (!c->resp.data) {
  ------------------
  |  Branch (128:9): [True: 0, False: 1.12k]
  ------------------
  129|      0|        return FLB_HTTP_MORE;
  ------------------
  |  |   52|      0|#define FLB_HTTP_MORE             0
  ------------------
  130|      0|    }
  131|       |
  132|       |    /* Lookup the beginning of the header */
  133|  1.12k|    p = strcasestr(c->resp.data, header);
  134|  1.12k|    end = strstr(c->resp.data, "\r\n\r\n");
  135|  1.12k|    if (!p) {
  ------------------
  |  Branch (135:9): [True: 853, False: 275]
  ------------------
  136|    853|        if (end) {
  ------------------
  |  Branch (136:13): [True: 235, False: 618]
  ------------------
  137|       |            /* The headers are complete but the header is not there */
  138|    235|            return FLB_HTTP_NOT_FOUND;
  ------------------
  |  |   54|    235|#define FLB_HTTP_NOT_FOUND        2 /* header not found */
  ------------------
  139|    235|        }
  140|       |
  141|       |        /* We need more data */
  142|    618|        return FLB_HTTP_MORE;
  ------------------
  |  |   52|    618|#define FLB_HTTP_MORE             0
  ------------------
  143|    853|    }
  144|       |
  145|       |    /* Exclude matches in the body */
  146|    275|    if (end && p > end) {
  ------------------
  |  Branch (146:9): [True: 154, False: 121]
  |  Branch (146:16): [True: 3, False: 151]
  ------------------
  147|      3|        return FLB_HTTP_NOT_FOUND;
  ------------------
  |  |   54|      3|#define FLB_HTTP_NOT_FOUND        2 /* header not found */
  ------------------
  148|      3|    }
  149|       |
  150|       |    /* Lookup CRLF (end of line \r\n) */
  151|    272|    crlf = strstr(p, "\r\n");
  152|    272|    if (!crlf) {
  ------------------
  |  Branch (152:9): [True: 8, False: 264]
  ------------------
  153|      8|        return FLB_HTTP_MORE;
  ------------------
  |  |   52|      8|#define FLB_HTTP_MORE             0
  ------------------
  154|      8|    }
  155|       |
  156|    264|    p += header_len;
  157|       |
  158|    264|    *out_val = p;
  159|    264|    *out_len = (crlf - p);
  160|       |
  161|    264|    return FLB_HTTP_OK;
  ------------------
  |  |   53|    264|#define FLB_HTTP_OK               1
  ------------------
  162|    272|}
flb_http_client.c:check_chunked_encoding:
  166|    324|{
  167|    324|    int ret;
  168|    324|    int len;
  169|    324|    const char *header = NULL;
  170|       |
  171|    324|    ret = header_lookup(c, "Transfer-Encoding: ", 19,
  172|    324|                        &header, &len);
  173|    324|    if (ret == FLB_HTTP_NOT_FOUND) {
  ------------------
  |  |   54|    324|#define FLB_HTTP_NOT_FOUND        2 /* header not found */
  ------------------
  |  Branch (173:9): [True: 9, False: 315]
  ------------------
  174|       |        /* If the header is missing, this is fine */
  175|      9|        c->resp.chunked_encoding = FLB_FALSE;
  ------------------
  |  |   25|      9|#define FLB_FALSE  0
  ------------------
  176|      9|        return FLB_HTTP_OK;
  ------------------
  |  |   53|      9|#define FLB_HTTP_OK               1
  ------------------
  177|      9|    }
  178|    315|    else if (ret == FLB_HTTP_MORE) {
  ------------------
  |  |   52|    315|#define FLB_HTTP_MORE             0
  ------------------
  |  Branch (178:14): [True: 180, False: 135]
  ------------------
  179|    180|        return FLB_HTTP_MORE;
  ------------------
  |  |   52|    180|#define FLB_HTTP_MORE             0
  ------------------
  180|    180|    }
  181|       |
  182|    135|    if (strncasecmp(header, "chunked", len) == 0) {
  ------------------
  |  Branch (182:9): [True: 69, False: 66]
  ------------------
  183|     69|        c->resp.chunked_encoding = FLB_TRUE;
  ------------------
  |  |   26|     69|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|     69|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  184|     69|    }
  185|       |
  186|    135|    return FLB_HTTP_OK;
  ------------------
  |  |   53|    135|#define FLB_HTTP_OK               1
  ------------------
  187|    324|}
flb_http_client.c:process_chunked_data:
  267|     69|{
  268|     69|    long len;
  269|     69|    long drop;
  270|     69|    long val;
  271|     69|    char *p;
  272|     69|    char tmp[32];
  273|     69|    struct flb_http_response *r = &c->resp;
  274|       |
  275|     70| chunk_start:
  276|     70|    p = strstr(r->chunk_processed_end, "\r\n");
  277|     70|    if (!p) {
  ------------------
  |  Branch (277:9): [True: 1, False: 69]
  ------------------
  278|      1|        return FLB_HTTP_MORE;
  ------------------
  |  |   52|      1|#define FLB_HTTP_MORE             0
  ------------------
  279|      1|    }
  280|       |
  281|       |    /* Hexa string length */
  282|     69|    len = (p - r->chunk_processed_end);
  283|     69|    if ((len > sizeof(tmp) - 1) || len == 0) {
  ------------------
  |  Branch (283:9): [True: 0, False: 69]
  |  Branch (283:36): [True: 1, False: 68]
  ------------------
  284|      1|        return FLB_HTTP_ERROR;
  ------------------
  |  |   51|      1|#define FLB_HTTP_ERROR           -1
  ------------------
  285|      1|    }
  286|     68|    p += 2;
  287|       |
  288|       |    /* Copy hexa string to temporary buffer */
  289|     68|    memcpy(tmp, r->chunk_processed_end, len);
  290|     68|    tmp[len] = '\0';
  291|       |
  292|       |    /* Convert hexa string to decimal */
  293|     68|    errno = 0;
  294|     68|    val = strtol(tmp, NULL, 16);
  295|     68|    if ((errno == ERANGE && (val == LONG_MAX || val == LONG_MIN))
  ------------------
  |  Branch (295:10): [True: 0, False: 68]
  |  Branch (295:30): [True: 0, False: 0]
  |  Branch (295:49): [True: 0, False: 0]
  ------------------
  296|     68|        || (errno != 0 && val == 0)) {
  ------------------
  |  Branch (296:13): [True: 0, False: 68]
  |  Branch (296:27): [True: 0, False: 0]
  ------------------
  297|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  298|      0|        return FLB_HTTP_ERROR;
  ------------------
  |  |   51|      0|#define FLB_HTTP_ERROR           -1
  ------------------
  299|      0|    }
  300|     68|    if (val < 0) {
  ------------------
  |  Branch (300:9): [True: 22, False: 46]
  ------------------
  301|     22|        return FLB_HTTP_ERROR;
  ------------------
  |  |   51|     22|#define FLB_HTTP_ERROR           -1
  ------------------
  302|     22|    }
  303|       |    /*
  304|       |     * 'val' contains the expected number of bytes, check current lengths
  305|       |     * and do buffer adjustments.
  306|       |     *
  307|       |     * we do val + 2 because the chunk always ends with \r\n
  308|       |     */
  309|     46|    val += 2;
  310|       |
  311|       |    /* Number of bytes after the Chunk header */
  312|     46|    len = r->data_len - (p - r->data);
  313|     46|    if (len < val) {
  ------------------
  |  Branch (313:9): [True: 24, False: 22]
  ------------------
  314|     24|        return FLB_HTTP_MORE;
  ------------------
  |  |   52|     24|#define FLB_HTTP_MORE             0
  ------------------
  315|     24|    }
  316|       |
  317|       |    /* From the current chunk we expect it ends with \r\n */
  318|     22|    if (p[val -2] != '\r' || p[val - 1] != '\n') {
  ------------------
  |  Branch (318:9): [True: 8, False: 14]
  |  Branch (318:30): [True: 10, False: 4]
  ------------------
  319|     18|        return FLB_HTTP_ERROR;
  ------------------
  |  |   51|     18|#define FLB_HTTP_ERROR           -1
  ------------------
  320|     18|    }
  321|       |
  322|       |    /*
  323|       |     * At this point we are just fine, the chunk is valid, next steps:
  324|       |     *
  325|       |     * 1. check possible last chunk
  326|       |     * 2. drop chunk header from the buffer
  327|       |     * 3. remove chunk ending \r\n
  328|       |     */
  329|       |
  330|       |    /* 1. Validate ending chunk */
  331|      4|    if (val - 2 == 0) {
  ------------------
  |  Branch (331:9): [True: 2, False: 2]
  ------------------
  332|       |        /*
  333|       |         * For an ending chunk we expect:
  334|       |         *
  335|       |         * 0\r\n
  336|       |         * \r\n
  337|       |         *
  338|       |         * so at least we need 5 bytes in the buffer
  339|       |         */
  340|      2|        len = r->data_len - (r->chunk_processed_end - r->data);
  341|      2|        if (len < 5) {
  ------------------
  |  Branch (341:13): [True: 0, False: 2]
  ------------------
  342|      0|            return FLB_HTTP_MORE;
  ------------------
  |  |   52|      0|#define FLB_HTTP_MORE             0
  ------------------
  343|      0|        }
  344|       |
  345|      2|        if (r->chunk_processed_end[3] != '\r' ||
  ------------------
  |  Branch (345:13): [True: 1, False: 1]
  ------------------
  346|      2|            r->chunk_processed_end[4] != '\n') {
  ------------------
  |  Branch (346:13): [True: 0, False: 1]
  ------------------
  347|      1|            return FLB_HTTP_ERROR;
  ------------------
  |  |   51|      1|#define FLB_HTTP_ERROR           -1
  ------------------
  348|      1|        }
  349|      2|    }
  350|       |
  351|       |    /* 2. Drop chunk header */
  352|      3|    drop = (p - r->chunk_processed_end);
  353|      3|    len =  r->data_len - (r->chunk_processed_end - r->data);
  354|      3|    consume_bytes(r->chunk_processed_end, drop, len);
  355|      3|    r->data_len -= drop;
  356|      3|    r->data[r->data_len] = '\0';
  357|       |
  358|       |    /* 3. Remove chunk ending \r\n */
  359|      3|    drop = 2;
  360|      3|    r->chunk_processed_end += labs(val - 2);
  361|      3|    len = r->data_len - (r->chunk_processed_end - r->data);
  362|      3|    consume_bytes(r->chunk_processed_end, drop, len);
  363|      3|    r->data_len -= drop;
  364|       |
  365|       |    /* Always append a NULL byte */
  366|      3|    r->data[r->data_len] = '\0';
  367|       |
  368|       |    /* Is this the last chunk ? */
  369|      3|    if ((val - 2 == 0)) {
  ------------------
  |  Branch (369:9): [True: 1, False: 2]
  ------------------
  370|       |        /* Update payload size */
  371|      1|        r->payload_size = r->data_len - (r->headers_end - r->data);
  372|      1|        return FLB_HTTP_OK;
  ------------------
  |  |   53|      1|#define FLB_HTTP_OK               1
  ------------------
  373|      1|    }
  374|       |
  375|       |    /* If we have some remaining bytes, start over */
  376|      2|    len = r->data_len - (r->chunk_processed_end - r->data);
  377|      2|    if (len > 0) {
  ------------------
  |  Branch (377:9): [True: 1, False: 1]
  ------------------
  378|      1|        goto chunk_start;
  379|      1|    }
  380|       |
  381|      1|    return FLB_HTTP_MORE;
  ------------------
  |  |   52|      1|#define FLB_HTTP_MORE             0
  ------------------
  382|      2|}
flb_http_client.c:consume_bytes:
  262|      6|{
  263|      6|    memmove(buf, buf + bytes, length - bytes);
  264|      6|}
flb_http_client.c:check_connection:
  226|    402|{
  227|    402|    int ret;
  228|    402|    int len;
  229|    402|    const char *header;
  230|    402|    char *buf;
  231|       |
  232|    402|    ret = header_lookup(c, "Connection: ", 12,
  233|    402|                        &header, &len);
  234|    402|    if (ret == FLB_HTTP_NOT_FOUND) {
  ------------------
  |  |   54|    402|#define FLB_HTTP_NOT_FOUND        2 /* header not found */
  ------------------
  |  Branch (234:9): [True: 150, False: 252]
  ------------------
  235|    150|        return FLB_HTTP_NOT_FOUND;
  ------------------
  |  |   54|    150|#define FLB_HTTP_NOT_FOUND        2 /* header not found */
  ------------------
  236|    150|    }
  237|    252|    else if (ret == FLB_HTTP_MORE) {
  ------------------
  |  |   52|    252|#define FLB_HTTP_MORE             0
  ------------------
  |  Branch (237:14): [True: 201, False: 51]
  ------------------
  238|    201|        return FLB_HTTP_MORE;
  ------------------
  |  |   52|    201|#define FLB_HTTP_MORE             0
  ------------------
  239|    201|    }
  240|       |
  241|     51|    buf = flb_malloc(len + 1);
  242|     51|    if (!buf) {
  ------------------
  |  Branch (242:9): [True: 0, False: 51]
  ------------------
  243|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  244|      0|        return -1;
  245|      0|    }
  246|       |
  247|     51|    memcpy(buf, header, len);
  248|     51|    buf[len] = '\0';
  249|       |
  250|     51|    if (strncasecmp(buf, "close", 5) == 0) {
  ------------------
  |  Branch (250:9): [True: 1, False: 50]
  ------------------
  251|      1|        c->resp.connection_close = FLB_TRUE;
  ------------------
  |  |   26|      1|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      1|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  252|      1|    }
  253|     50|    else if (strcasestr(buf, "keep-alive")) {
  ------------------
  |  Branch (253:14): [True: 4, False: 46]
  ------------------
  254|      4|        c->resp.connection_close = FLB_FALSE;
  ------------------
  |  |   25|      4|#define FLB_FALSE  0
  ------------------
  255|      4|    }
  256|     51|    flb_free(buf);
  257|     51|    return FLB_HTTP_OK;
  ------------------
  |  |   53|     51|#define FLB_HTTP_OK               1
  ------------------
  258|       |
  259|     51|}
flb_http_client.c:add_host_and_content_length:
  555|    826|{
  556|    826|    int len;
  557|    826|    flb_sds_t tmp;
  558|    826|    flb_sds_t host;
  559|    826|    char *out_host;
  560|    826|    int out_port;
  561|    826|    size_t size;
  562|    826|    struct flb_upstream *u = c->u_conn->upstream;
  563|       |
  564|    826|    if (!c->host) {
  ------------------
  |  Branch (564:9): [True: 413, False: 413]
  ------------------
  565|    413|        if (u->proxied_host) {
  ------------------
  |  Branch (565:13): [True: 0, False: 413]
  ------------------
  566|      0|            out_host = u->proxied_host;
  567|      0|        }
  568|    413|        else {
  569|    413|            out_host = u->tcp_host;
  570|    413|        }
  571|    413|    }
  572|    413|    else {
  573|    413|        out_host = (char *) c->host;
  574|    413|    }
  575|       |
  576|    826|    len = strlen(out_host);
  577|    826|    host = flb_sds_create_size(len + 32);
  578|    826|    if (!host) {
  ------------------
  |  Branch (578:9): [True: 0, False: 826]
  ------------------
  579|      0|        flb_error("[http_client] cannot create temporal buffer");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  580|      0|        return -1;
  581|      0|    }
  582|       |
  583|    826|    if (c->port == 0) {
  ------------------
  |  Branch (583:9): [True: 413, False: 413]
  ------------------
  584|    413|        if (u->proxied_port != 0 ) {
  ------------------
  |  Branch (584:13): [True: 0, False: 413]
  ------------------
  585|      0|            out_port = u->proxied_port;
  586|      0|        }
  587|    413|        else {
  588|    413|            out_port = u->tcp_port;
  589|    413|        }
  590|    413|    }
  591|    413|    else {
  592|    413|        out_port = c->port;
  593|    413|    }
  594|       |
  595|    826|    if (c->flags & FLB_IO_TLS && out_port == 443) {
  ------------------
  |  |   34|  1.65k|#define FLB_IO_TLS         2  /* use TLS/SSL layer                      */
  ------------------
  |  Branch (595:9): [True: 826, False: 0]
  |  Branch (595:34): [True: 0, False: 826]
  ------------------
  596|      0|        tmp = flb_sds_copy(host, out_host, strlen(out_host));
  597|      0|    }
  598|    826|    else {
  599|    826|        tmp = flb_sds_printf(&host, "%s:%i", out_host, out_port);
  600|    826|    }
  601|       |
  602|    826|    if (!tmp) {
  ------------------
  |  Branch (602:9): [True: 0, False: 826]
  ------------------
  603|      0|        flb_sds_destroy(host);
  604|      0|        flb_error("[http_client] cannot compose temporary host header");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  605|      0|        return -1;
  606|      0|    }
  607|    826|    host = tmp;
  608|    826|    tmp = NULL;
  609|       |
  610|    826|    flb_http_add_header(c, "Host", 4, host, flb_sds_len(host));
  611|    826|    flb_sds_destroy(host);
  612|       |
  613|       |    /* Content-Length */
  614|    826|    if (c->body_len >= 0) {
  ------------------
  |  Branch (614:9): [True: 826, False: 0]
  ------------------
  615|    826|        size = 32;
  616|    826|        tmp = flb_malloc(size);
  617|    826|        if (!tmp) {
  ------------------
  |  Branch (617:13): [True: 0, False: 826]
  ------------------
  618|      0|            flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  619|      0|            return -1;
  620|      0|        }
  621|    826|        len = snprintf(tmp, size - 1, "%i", c->body_len);
  622|    826|        flb_http_add_header(c, "Content-Length", 14, tmp, len);
  623|    826|        flb_free(tmp);
  624|    826|    }
  625|       |
  626|    826|    return 0;
  627|    826|}
flb_http_client.c:proxy_parse:
  492|     11|{
  493|     11|    int len;
  494|     11|    int port;
  495|     11|    int off = 0;
  496|     11|    const char *s;
  497|     11|    const char *e;
  498|     11|    const char *host;
  499|       |
  500|     11|    len = strlen(proxy);
  501|     11|    if (len < 7) {
  ------------------
  |  Branch (501:9): [True: 3, False: 8]
  ------------------
  502|      3|        return -1;
  503|      3|    }
  504|       |
  505|       |    /* Protocol lookup */
  506|      8|    if (strncmp(proxy, "http://", 7) == 0) {
  ------------------
  |  Branch (506:9): [True: 0, False: 8]
  ------------------
  507|      0|        port = 80;
  508|      0|        off = 7;
  509|      0|        c->proxy.type = FLB_HTTP_PROXY_HTTP;
  ------------------
  |  |   47|      0|#define FLB_HTTP_PROXY_HTTP       1
  ------------------
  510|      0|    }
  511|      8|    else if (strncmp(proxy, "https://", 8) == 0) {
  ------------------
  |  Branch (511:14): [True: 0, False: 8]
  ------------------
  512|      0|        port = 443;
  513|      0|        off = 8;
  514|      0|        c->proxy.type = FLB_HTTP_PROXY_HTTPS;
  ------------------
  |  |   48|      0|#define FLB_HTTP_PROXY_HTTPS      2
  ------------------
  515|      0|    }
  516|      8|    else {
  517|      8|        return -1;
  518|      8|    }
  519|       |
  520|       |    /* Separate host/ip from port if any */
  521|      0|    s = proxy + off;
  522|      0|    if (*s == '[') {
  ------------------
  |  Branch (522:9): [True: 0, False: 0]
  ------------------
  523|       |        /* IPv6 address (RFC 3986) */
  524|      0|        e = strchr(++s, ']');
  525|      0|        if (!e) {
  ------------------
  |  Branch (525:13): [True: 0, False: 0]
  ------------------
  526|      0|            return -1;
  527|      0|        }
  528|      0|        host = strndup(s, e - s);
  529|      0|        s = e + 1;
  530|      0|    } else {
  531|      0|        e = s;
  532|      0|        while (!(*e == '\0' || *e == ':' || *e == '/')) {
  ------------------
  |  Branch (532:18): [True: 0, False: 0]
  |  Branch (532:32): [True: 0, False: 0]
  |  Branch (532:45): [True: 0, False: 0]
  ------------------
  533|      0|            ++e;
  534|      0|        }
  535|      0|        if (e == s) {
  ------------------
  |  Branch (535:13): [True: 0, False: 0]
  ------------------
  536|      0|            return -1;
  537|      0|        }
  538|      0|        host = strndup(s, e - s);
  539|      0|        s = e;
  540|      0|    }
  541|      0|    if (*s == ':') {
  ------------------
  |  Branch (541:9): [True: 0, False: 0]
  ------------------
  542|      0|        port = atoi(++s);
  543|      0|    }
  544|       |
  545|      0|    flb_trace("[http_client] proxy type=%i host=%s port=%i",
  ------------------
  |  |  193|      0|#define flb_trace(fmt, ...)  do {} while(0)
  |  |  ------------------
  |  |  |  Branch (193:42): [Folded - Ignored]
  |  |  ------------------
  ------------------
  546|      0|              c->proxy.type, host, port);
  547|       |
  548|      0|    c->proxy.host = host;
  549|      0|    c->proxy.port = port;
  550|       |
  551|      0|    return 0;
  552|      0|}
flb_http_client.c:http_headers_compose:
 1007|    815|{
 1008|    815|    int ret;
 1009|    815|    struct mk_list *head;
 1010|    815|    struct flb_kv *header;
 1011|       |
 1012|       |    /* Push header list to one buffer */
 1013|  4.05k|    mk_list_foreach(head, &c->headers) {
  ------------------
  |  |  205|  4.86k|#define mk_list_foreach(curr, head) for( curr = (head)->next; curr != (head); curr = curr->next )
  |  |  ------------------
  |  |  |  Branch (205:63): [True: 4.05k, False: 815]
  |  |  ------------------
  ------------------
 1014|  4.05k|        header = mk_list_entry(head, struct flb_kv, _head);
  ------------------
  |  |  214|  4.05k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  4.05k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  4.05k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  4.05k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
 1015|  4.05k|        ret = http_header_push(c, header);
 1016|  4.05k|        if (ret != 0) {
  ------------------
  |  Branch (1016:13): [True: 0, False: 4.05k]
  ------------------
 1017|      0|            flb_error("[http_client] cannot compose request headers");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
 1018|      0|            return -1;
 1019|      0|        }
 1020|  4.05k|    }
 1021|       |
 1022|    815|    return 0;
 1023|    815|}
flb_http_client.c:http_header_push:
  945|  4.05k|{
  946|  4.05k|    char *tmp;
  947|  4.05k|    const char *key;
  948|  4.05k|    const char *val;
  949|  4.05k|    size_t key_len;
  950|  4.05k|    size_t val_len;
  951|  4.05k|    size_t required;
  952|  4.05k|    size_t new_size;
  953|       |
  954|  4.05k|    key = header->key;
  955|  4.05k|    key_len = flb_sds_len(header->key);
  956|  4.05k|    val = header->val;
  957|  4.05k|    val_len = flb_sds_len(header->val);
  958|       |
  959|       |    /*
  960|       |     * The new header will need enough space in the buffer:
  961|       |     *
  962|       |     * key      : length of the key
  963|       |     * separator: ': ' (2 bytes)
  964|       |     * val      : length of the key value
  965|       |     * CRLF     : '\r\n' (2 bytes)
  966|       |     */
  967|  4.05k|    required = key_len + 2 + val_len + 2;
  968|       |
  969|  4.05k|    if (header_available(c, required) != 0) {
  ------------------
  |  Branch (969:9): [True: 97, False: 3.95k]
  ------------------
  970|     97|        if (required < 512) {
  ------------------
  |  Branch (970:13): [True: 0, False: 97]
  ------------------
  971|      0|            new_size = c->header_size + 512;
  972|      0|        }
  973|     97|        else {
  974|     97|            new_size = c->header_size + required;
  975|     97|        }
  976|     97|        tmp = flb_realloc(c->header_buf, new_size);
  977|     97|        if (!tmp) {
  ------------------
  |  Branch (977:13): [True: 0, False: 97]
  ------------------
  978|      0|            flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  979|      0|            return -1;
  980|      0|        }
  981|     97|        c->header_buf  = tmp;
  982|     97|        c->header_size = new_size;
  983|     97|    }
  984|       |
  985|       |    /* append the header key */
  986|  4.05k|    memcpy(c->header_buf + c->header_len,
  987|  4.05k|           key, key_len);
  988|  4.05k|    c->header_len += key_len;
  989|       |
  990|       |    /* append the separator */
  991|  4.05k|    c->header_buf[c->header_len++] = ':';
  992|  4.05k|    c->header_buf[c->header_len++] = ' ';
  993|       |
  994|       |    /* append the header value */
  995|  4.05k|    memcpy(c->header_buf + c->header_len,
  996|  4.05k|           val, val_len);
  997|  4.05k|    c->header_len += val_len;
  998|       |
  999|       |    /* Append the ending header CRLF */
 1000|  4.05k|    c->header_buf[c->header_len++] = '\r';
 1001|  4.05k|    c->header_buf[c->header_len++] = '\n';
 1002|       |
 1003|  4.05k|    return 0;
 1004|  4.05k|}
flb_http_client.c:header_available:
  108|  4.86k|{
  109|  4.86k|    int available;
  110|       |
  111|  4.86k|    available = c->header_size - c->header_len;
  112|  4.86k|    if (available < bytes) {
  ------------------
  |  Branch (112:9): [True: 100, False: 4.76k]
  ------------------
  113|    100|        return -1;
  114|    100|    }
  115|       |
  116|  4.76k|    return 0;
  117|  4.86k|}
flb_http_client.c:http_headers_destroy:
 1026|    826|{
 1027|    826|    flb_kv_release(&c->headers);
 1028|    826|}

flb_io_net_write:
  634|    815|{
  635|    815|    int              flags;
  636|    815|    struct flb_coro *coro;
  637|    815|    int              ret;
  638|       |
  639|    815|    ret  = -1;
  640|    815|    coro = flb_coro_get();
  641|    815|    flags = flb_connection_get_flags(connection);
  642|       |
  643|    815|    flb_trace("[io coro=%p] [net_write] trying %zd bytes", coro, len);
  ------------------
  |  |  193|    815|#define flb_trace(fmt, ...)  do {} while(0)
  |  |  ------------------
  |  |  |  Branch (193:42): [Folded - Ignored]
  |  |  ------------------
  ------------------
  644|       |
  645|    815|    if (connection->tls_session == NULL) {
  ------------------
  |  Branch (645:9): [True: 815, False: 0]
  ------------------
  646|    815|        if (flags & FLB_IO_ASYNC) {
  ------------------
  |  |   36|    815|#define FLB_IO_ASYNC       8  /* use async mode (depends on event loop) */
  ------------------
  |  Branch (646:13): [True: 815, False: 0]
  ------------------
  647|    815|            ret = net_io_write_async(coro, connection, data, len, out_len);
  648|    815|        }
  649|      0|        else {
  650|      0|            ret = net_io_write(connection, data, len, out_len);
  651|      0|        }
  652|    815|    }
  653|      0|#ifdef FLB_HAVE_TLS
  654|      0|    else if (flags & FLB_IO_TLS) {
  ------------------
  |  |   34|      0|#define FLB_IO_TLS         2  /* use TLS/SSL layer                      */
  ------------------
  |  Branch (654:14): [True: 0, False: 0]
  ------------------
  655|      0|        if (flags & FLB_IO_ASYNC) {
  ------------------
  |  |   36|      0|#define FLB_IO_ASYNC       8  /* use async mode (depends on event loop) */
  ------------------
  |  Branch (655:13): [True: 0, False: 0]
  ------------------
  656|      0|            ret = flb_tls_net_write_async(coro, connection->tls_session, data, len, out_len);
  657|      0|        }
  658|      0|        else {
  659|      0|            ret = flb_tls_net_write(connection->tls_session, data, len, out_len);
  660|      0|        }
  661|      0|    }
  662|    815|#endif
  663|       |
  664|    815|    if (ret > 0) {
  ------------------
  |  Branch (664:9): [True: 0, False: 815]
  ------------------
  665|      0|        flb_connection_reset_io_timeout(connection);
  666|      0|    }
  667|       |
  668|    815|    flb_trace("[io coro=%p] [net_write] ret=%i total=%lu/%lu",
  ------------------
  |  |  193|    815|#define flb_trace(fmt, ...)  do {} while(0)
  |  |  ------------------
  |  |  |  Branch (193:42): [Folded - Ignored]
  |  |  ------------------
  ------------------
  669|    815|              coro, ret, *out_len, len);
  670|       |
  671|    815|    return ret;
  672|    815|}
flb_io.c:net_io_write_async:
  307|    815|{
  308|    815|    int ret = 0;
  309|    815|    int error;
  310|    815|    uint32_t mask;
  311|    815|    ssize_t bytes;
  312|    815|    size_t total = 0;
  313|    815|    size_t to_send;
  314|    815|    char so_error_buf[256];
  315|    815|    struct mk_event event_backup;
  316|    815|    int event_restore_needed;
  317|       |
  318|    815|    event_restore_needed = FLB_FALSE;
  ------------------
  |  |   25|    815|#define FLB_FALSE  0
  ------------------
  319|       |
  320|    815|    net_io_backup_event(connection, &event_backup);
  321|       |
  322|    815|retry:
  323|    815|    error = 0;
  324|       |
  325|    815|    if (len - total > 524288) {
  ------------------
  |  Branch (325:9): [True: 13, False: 802]
  ------------------
  326|     13|        to_send = 524288;
  327|     13|    }
  328|    802|    else {
  329|    802|        to_send = (len - total);
  330|    802|    }
  331|       |
  332|    815|    bytes = send(connection->fd, (char *) data + total, to_send, 0);
  333|       |
  334|       |#ifdef FLB_HAVE_TRACE
  335|       |    if (bytes > 0) {
  336|       |        flb_trace("[io coro=%p] [fd %i] write_async(2)=%d (%lu/%lu)",
  337|       |                  co, connection->fd, bytes, total + bytes, len);
  338|       |    }
  339|       |    else {
  340|       |        flb_trace("[io coro=%p] [fd %i] write_async(2)=%d (%lu/%lu)",
  341|       |                  co, connection->fd, bytes, total, len);
  342|       |    }
  343|       |#endif
  344|       |
  345|    815|    if (bytes == -1) {
  ------------------
  |  Branch (345:9): [True: 815, False: 0]
  ------------------
  346|    815|        if (FLB_WOULDBLOCK()) {
  ------------------
  |  |   46|    815|#define FLB_WOULDBLOCK()     (errno == EAGAIN || errno == EWOULDBLOCK)
  |  |  ------------------
  |  |  |  Branch (46:31): [True: 0, False: 815]
  |  |  |  Branch (46:50): [True: 0, False: 815]
  |  |  ------------------
  ------------------
  347|      0|            event_restore_needed = FLB_TRUE;
  ------------------
  |  |   26|      0|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      0|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  348|       |
  349|      0|            ret = mk_event_add(connection->evl,
  350|      0|                               connection->fd,
  351|      0|                               FLB_ENGINE_EV_THREAD,
  ------------------
  |  |   29|      0|#define FLB_ENGINE_EV_THREAD        1024
  ------------------
  352|      0|                               MK_EVENT_WRITE,
  ------------------
  |  |   39|      0|#define MK_EVENT_WRITE           4
  ------------------
  353|      0|                               &connection->event);
  354|       |
  355|      0|            connection->event.priority = FLB_ENGINE_PRIORITY_SEND_RECV;
  ------------------
  |  |   73|      0|#define FLB_ENGINE_PRIORITY_SEND_RECV   FLB_ENGINE_PRIORITY_NETWORK
  |  |  ------------------
  |  |  |  |   64|      0|#define FLB_ENGINE_PRIORITY_NETWORK     1
  |  |  ------------------
  ------------------
  356|       |
  357|      0|            if (ret == -1) {
  ------------------
  |  Branch (357:17): [True: 0, False: 0]
  ------------------
  358|       |                /*
  359|       |                 * If we failed here there no much that we can do, just
  360|       |                 * let the caller we failed
  361|       |                 */
  362|      0|                *out_len = total;
  363|       |
  364|      0|                net_io_restore_event(connection, &event_backup);
  365|       |
  366|      0|                return -1;
  367|      0|            }
  368|       |
  369|      0|            connection->coroutine = co;
  370|       |
  371|       |            /*
  372|       |             * Return the control to the parent caller, we need to wait for
  373|       |             * the event loop to get back to us.
  374|       |             */
  375|      0|            flb_coro_yield(co, FLB_FALSE);
  ------------------
  |  |   25|      0|#define FLB_FALSE  0
  ------------------
  376|       |
  377|       |            /* We want this field to hold NULL at all times unless we are explicitly
  378|       |             * waiting to be resumed.
  379|       |             */
  380|      0|            connection->coroutine = NULL;
  381|       |
  382|       |            /* Save events mask since mk_event_del() will reset it */
  383|      0|            mask = connection->event.mask;
  384|       |
  385|       |            /* We got a notification, remove the event registered */
  386|      0|            ret = mk_event_del(connection->evl, &connection->event);
  387|       |
  388|      0|            if (ret == -1) {
  ------------------
  |  Branch (388:17): [True: 0, False: 0]
  ------------------
  389|      0|                *out_len = total;
  390|       |
  391|      0|                net_io_restore_event(connection, &event_backup);
  392|       |
  393|      0|                return -1;
  394|      0|            }
  395|       |
  396|       |            /* Check the connection status */
  397|      0|            if (mask & MK_EVENT_WRITE) {
  ------------------
  |  |   39|      0|#define MK_EVENT_WRITE           4
  ------------------
  |  Branch (397:17): [True: 0, False: 0]
  ------------------
  398|      0|                error = flb_socket_error(connection->fd);
  399|       |
  400|      0|                if (error != 0) {
  ------------------
  |  Branch (400:21): [True: 0, False: 0]
  ------------------
  401|       |                    /* Connection is broken, not much to do here */
  402|      0|                    strerror_r(error, so_error_buf, sizeof(so_error_buf) - 1);
  403|       |
  404|      0|                    flb_error("[io fd=%i] error sending data to: %s (%s)",
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  405|      0|                              connection->fd,
  406|      0|                              flb_connection_get_remote_address(connection),
  407|      0|                              so_error_buf);
  408|       |
  409|      0|                    *out_len = total;
  410|       |
  411|      0|                    net_io_restore_event(connection, &event_backup);
  412|       |
  413|      0|                    return -1;
  414|      0|                }
  415|       |
  416|      0|                MK_EVENT_NEW(&connection->event);
  417|       |
  418|      0|                goto retry;
  419|      0|            }
  420|      0|            else {
  421|      0|                *out_len = total;
  422|       |
  423|      0|                net_io_restore_event(connection, &event_backup);
  424|       |
  425|      0|                return -1;
  426|      0|            }
  427|       |
  428|      0|        }
  429|    815|        else {
  430|    815|            *out_len = total;
  431|       |
  432|    815|            net_io_restore_event(connection, &event_backup);
  433|       |
  434|    815|            return -1;
  435|    815|        }
  436|    815|    }
  437|       |
  438|       |    /* Update counters */
  439|      0|    total += bytes;
  440|      0|    if (total < len) {
  ------------------
  |  Branch (440:9): [True: 0, False: 0]
  ------------------
  441|      0|        if ((connection->event.mask & MK_EVENT_WRITE) == 0) {
  ------------------
  |  |   39|      0|#define MK_EVENT_WRITE           4
  ------------------
  |  Branch (441:13): [True: 0, False: 0]
  ------------------
  442|      0|            ret = mk_event_add(connection->evl,
  443|      0|                               connection->fd,
  444|      0|                               FLB_ENGINE_EV_THREAD,
  ------------------
  |  |   29|      0|#define FLB_ENGINE_EV_THREAD        1024
  ------------------
  445|      0|                               MK_EVENT_WRITE,
  ------------------
  |  |   39|      0|#define MK_EVENT_WRITE           4
  ------------------
  446|      0|                               &connection->event);
  447|       |
  448|      0|            connection->event.priority = FLB_ENGINE_PRIORITY_SEND_RECV;
  ------------------
  |  |   73|      0|#define FLB_ENGINE_PRIORITY_SEND_RECV   FLB_ENGINE_PRIORITY_NETWORK
  |  |  ------------------
  |  |  |  |   64|      0|#define FLB_ENGINE_PRIORITY_NETWORK     1
  |  |  ------------------
  ------------------
  449|       |
  450|      0|            if (ret == -1) {
  ------------------
  |  Branch (450:17): [True: 0, False: 0]
  ------------------
  451|       |                /*
  452|       |                 * If we failed here there no much that we can do, just
  453|       |                 * let the caller we failed
  454|       |                 */
  455|      0|                *out_len = total;
  456|       |
  457|      0|                net_io_restore_event(connection, &event_backup);
  458|       |
  459|      0|                return -1;
  460|      0|            }
  461|      0|        }
  462|       |
  463|      0|        connection->coroutine = co;
  464|       |
  465|      0|        flb_coro_yield(co, MK_FALSE);
  ------------------
  |  |   27|      0|#define MK_FALSE 0
  ------------------
  466|       |
  467|       |        /* We want this field to hold NULL at all times unless we are explicitly
  468|       |         * waiting to be resumed.
  469|       |         */
  470|      0|        connection->coroutine = NULL;
  471|       |
  472|      0|        goto retry;
  473|      0|    }
  474|       |
  475|      0|    if (event_restore_needed) {
  ------------------
  |  Branch (475:9): [True: 0, False: 0]
  ------------------
  476|       |        /* If we enter here it means we registered this connection
  477|       |         * in the event loop, in which case we need to unregister it
  478|       |         * and restore the original registration if there was one.
  479|       |         *
  480|       |         * We do it conditionally because in those cases in which
  481|       |         * send succeeds on the first try we don't touch the event
  482|       |         * and it wouldn't make sense to unregister and register for
  483|       |         * the same event.
  484|       |         */
  485|       |
  486|      0|        net_io_restore_event(connection, &event_backup);
  487|      0|    }
  488|       |
  489|      0|    *out_len = total;
  490|       |
  491|      0|    return bytes;
  492|      0|}
flb_io.c:net_io_backup_event:
  263|    815|{
  264|    815|    if (connection != NULL && backup != NULL) {
  ------------------
  |  Branch (264:9): [True: 815, False: 0]
  |  Branch (264:31): [True: 815, False: 0]
  ------------------
  265|    815|        memcpy(backup, &connection->event, sizeof(struct mk_event));
  266|    815|    }
  267|    815|}
flb_io.c:net_io_restore_event:
  271|    815|{
  272|    815|    int result;
  273|       |
  274|    815|    if (connection != NULL && backup != NULL) {
  ------------------
  |  Branch (274:9): [True: 815, False: 0]
  |  Branch (274:31): [True: 815, False: 0]
  ------------------
  275|    815|        if (MK_EVENT_IS_REGISTERED((&connection->event))) {
  ------------------
  |  |   71|    815|#define MK_EVENT_IS_REGISTERED(event) ((event->status & MK_EVENT_REGISTERED) != 0)
  |  |  ------------------
  |  |  |  |   53|    815|#define MK_EVENT_REGISTERED      2    /* event is registered into the ev loop */
  |  |  ------------------
  |  |  |  Branch (71:39): [True: 0, False: 815]
  |  |  ------------------
  ------------------
  276|      0|            result = mk_event_del(connection->evl, &connection->event);
  277|       |
  278|      0|            assert(result == 0);
  279|      0|        }
  280|       |
  281|    815|        if (MK_EVENT_IS_REGISTERED(backup)) {
  ------------------
  |  |   71|    815|#define MK_EVENT_IS_REGISTERED(event) ((event->status & MK_EVENT_REGISTERED) != 0)
  |  |  ------------------
  |  |  |  |   53|    815|#define MK_EVENT_REGISTERED      2    /* event is registered into the ev loop */
  |  |  ------------------
  |  |  |  Branch (71:39): [True: 0, False: 815]
  |  |  ------------------
  ------------------
  282|      0|            connection->event.priority = backup->priority;
  283|      0|            connection->event.handler = backup->handler;
  284|       |
  285|      0|            result = mk_event_add(connection->evl,
  286|      0|                                  connection->fd,
  287|      0|                                  backup->type,
  288|      0|                                  backup->mask,
  289|      0|                                  &connection->event);
  290|       |
  291|      0|            assert(result == 0);
  292|      0|        }
  293|    815|    }
  294|    815|}

flb_kernel_info:
   70|    413|{
   71|       |
   72|    413|    int a, b, c;
   73|    413|    int len;
   74|    413|    int pos;
   75|    413|    char *p, *t;
   76|    413|    char *tmp;
   77|    413|    struct utsname uts;
   78|    413|    struct flb_kernel *kernel;
   79|       |
   80|    413|    if (uname(&uts) == -1) {
  ------------------
  |  Branch (80:9): [True: 0, False: 413]
  ------------------
   81|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
   82|      0|        return NULL;
   83|      0|    }
   84|    413|    len = strlen(uts.release);
   85|       |
   86|       |    /* Fixme: this don't support Linux Kernel 10.x.x :P */
   87|    413|    a = (*uts.release - '0');
   88|       |
   89|       |    /* Second number */
   90|    413|    p = (uts.release) + 2;
   91|    413|    pos = mk_string_char_search(p, '.', len - 2);
   92|    413|    if (pos <= 0) {
  ------------------
  |  Branch (92:9): [True: 0, False: 413]
  ------------------
   93|       |        /* Some Debian systems uses a different notation, e.g: 3.14-2-amd64 */
   94|      0|        pos = mk_string_char_search(p, '-', len - 2);
   95|      0|        if (pos <= 0) {
  ------------------
  |  Branch (95:13): [True: 0, False: 0]
  ------------------
   96|      0|            return NULL;
   97|      0|        }
   98|      0|    }
   99|       |
  100|    413|    tmp = mk_string_copy_substr(p, 0, pos);
  101|    413|    if (!tmp) {
  ------------------
  |  Branch (101:9): [True: 0, False: 413]
  ------------------
  102|      0|        return NULL;
  103|      0|    }
  104|    413|    b = atoi(tmp);
  105|    413|    mk_mem_free(tmp);
  106|       |
  107|       |    /* Last number (it needs filtering) */
  108|    413|    t = p = p + pos + 1;
  109|    413|    do {
  110|    413|        t++;
  111|    413|    } while (isdigit(*t));
  112|       |
  113|    413|    tmp = mk_string_copy_substr(p, 0, t - p);
  114|    413|    if (!tmp) {
  ------------------
  |  Branch (114:9): [True: 0, False: 413]
  ------------------
  115|      0|        return NULL;
  116|      0|    }
  117|    413|    c = atoi(tmp);
  118|    413|    mk_mem_free(tmp);
  119|       |
  120|    413|    kernel = flb_malloc(sizeof(struct flb_kernel));
  121|    413|    if (!kernel) {
  ------------------
  |  Branch (121:9): [True: 0, False: 413]
  ------------------
  122|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  123|      0|        return NULL;
  124|      0|    }
  125|    413|    kernel->minor = a;
  126|    413|    kernel->major = b;
  127|    413|    kernel->patch = c;
  128|    413|    kernel->s_version.data = flb_malloc(16);
  129|       |
  130|    413|    if (!kernel->s_version.data) {
  ------------------
  |  Branch (130:9): [True: 0, False: 413]
  ------------------
  131|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  132|      0|        flb_free(kernel);
  133|      0|        return NULL;
  134|      0|    }
  135|       |
  136|    413|    len = snprintf(kernel->s_version.data, 16, "%i.%i.%i", a, b, c);
  137|    413|    if (len == -1) {
  ------------------
  |  Branch (137:9): [True: 0, False: 413]
  ------------------
  138|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  139|      0|        flb_free(kernel->s_version.data);
  140|      0|        flb_free(kernel);
  141|      0|        return NULL;
  142|      0|    }
  143|    413|    kernel->s_version.len = len;
  144|    413|    kernel->n_version = FLB_KERNEL_VERSION(a, b, c);
  ------------------
  |  |   27|    413|#define FLB_KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
  ------------------
  145|       |
  146|    413|    return kernel;
  147|    413|}

flb_kv_item_create_len:
   33|  4.07k|{
   34|  4.07k|    struct flb_kv *kv;
   35|       |
   36|  4.07k|    kv = flb_calloc(1, sizeof(struct flb_kv));
   37|  4.07k|    if (!kv) {
  ------------------
  |  Branch (37:9): [True: 0, False: 4.07k]
  ------------------
   38|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
   39|      0|        return NULL;
   40|      0|    }
   41|       |
   42|  4.07k|    kv->key = flb_sds_create_len(k_buf, k_len);
   43|  4.07k|    if (!kv->key) {
  ------------------
  |  Branch (43:9): [True: 0, False: 4.07k]
  ------------------
   44|      0|        flb_free(kv);
   45|      0|        return NULL;
   46|      0|    }
   47|       |
   48|  4.07k|    if (v_len > 0) {
  ------------------
  |  Branch (48:9): [True: 4.07k, False: 0]
  ------------------
   49|  4.07k|        kv->val = flb_sds_create_len(v_buf, v_len);
   50|  4.07k|        if (!kv->val) {
  ------------------
  |  Branch (50:13): [True: 0, False: 4.07k]
  ------------------
   51|      0|            flb_sds_destroy(kv->key);
   52|      0|            flb_free(kv);
   53|      0|            return NULL;
   54|      0|        }
   55|  4.07k|    }
   56|       |
   57|  4.07k|    mk_list_add(&kv->_head, list);
   58|  4.07k|    return kv;
   59|  4.07k|}
flb_kv_item_destroy:
   80|  4.07k|{
   81|  4.07k|    if (kv->key) {
  ------------------
  |  Branch (81:9): [True: 4.07k, False: 0]
  ------------------
   82|  4.07k|        flb_sds_destroy(kv->key);
   83|  4.07k|    }
   84|       |
   85|  4.07k|    if (kv->val) {
  ------------------
  |  Branch (85:9): [True: 4.07k, False: 0]
  ------------------
   86|  4.07k|        flb_sds_destroy(kv->val);
   87|  4.07k|    }
   88|       |
   89|  4.07k|    mk_list_del(&kv->_head);
   90|  4.07k|    flb_free(kv);
   91|  4.07k|}
flb_kv_release:
   94|  1.65k|{
   95|  1.65k|    struct mk_list *tmp;
   96|  1.65k|    struct mk_list *head;
   97|  1.65k|    struct flb_kv *kv;
   98|       |
   99|  4.07k|    mk_list_foreach_safe(head, tmp, list) {
  ------------------
  |  |  207|  5.72k|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 4.07k, False: 1.65k]
  |  |  ------------------
  ------------------
  100|  4.07k|        kv = mk_list_entry(head, struct flb_kv, _head);
  ------------------
  |  |  214|  4.07k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  4.07k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  4.07k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  4.07k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  101|  4.07k|        flb_kv_item_destroy(kv);
  102|  4.07k|    }
  103|  1.65k|}

flb_log_construct:
  497|  1.93k|{
  498|  1.93k|    int body_size;
  499|  1.93k|    int ret;
  500|  1.93k|    int len;
  501|  1.93k|    int total;
  502|  1.93k|    time_t now;
  503|  1.93k|    const char *header_color = NULL;
  504|  1.93k|    const char *header_title = NULL;
  505|  1.93k|    const char *bold_color = ANSI_BOLD;
  ------------------
  |  |   47|  1.93k|#define ANSI_BOLD     "\033[1m"
  ------------------
  506|  1.93k|    const char *reset_color = ANSI_RESET;
  ------------------
  |  |   46|  1.93k|#define ANSI_RESET    "\033[0m"
  ------------------
  507|  1.93k|    struct tm result;
  508|  1.93k|    struct tm *current;
  509|       |
  510|  1.93k|    switch (type) {
  ------------------
  |  Branch (510:13): [True: 0, False: 1.93k]
  ------------------
  511|      0|    case FLB_LOG_HELP:
  ------------------
  |  |   44|      0|#define FLB_LOG_HELP    6  /* unused by log level */
  ------------------
  |  Branch (511:5): [True: 0, False: 1.93k]
  ------------------
  512|      0|        header_title = "help";
  513|      0|        header_color = ANSI_CYAN;
  ------------------
  |  |   48|      0|#define ANSI_CYAN     "\033[96m"
  ------------------
  514|      0|        break;
  515|      0|    case FLB_LOG_INFO:
  ------------------
  |  |   41|      0|#define FLB_LOG_INFO    3  /* default */
  ------------------
  |  Branch (515:5): [True: 0, False: 1.93k]
  ------------------
  516|      0|        header_title = "info";
  517|      0|        header_color = ANSI_GREEN;
  ------------------
  |  |   53|      0|#define ANSI_GREEN    "\033[92m"
  ------------------
  518|      0|        break;
  519|      0|    case FLB_LOG_WARN:
  ------------------
  |  |   40|      0|#define FLB_LOG_WARN    2
  ------------------
  |  Branch (519:5): [True: 0, False: 1.93k]
  ------------------
  520|      0|        header_title = "warn";
  521|      0|        header_color = ANSI_YELLOW;
  ------------------
  |  |   51|      0|#define ANSI_YELLOW   "\033[93m"
  ------------------
  522|      0|        break;
  523|  1.93k|    case FLB_LOG_ERROR:
  ------------------
  |  |   39|  1.93k|#define FLB_LOG_ERROR   1
  ------------------
  |  Branch (523:5): [True: 1.93k, False: 0]
  ------------------
  524|  1.93k|        header_title = "error";
  525|  1.93k|        header_color = ANSI_RED;
  ------------------
  |  |   50|  1.93k|#define ANSI_RED      "\033[91m"
  ------------------
  526|  1.93k|        break;
  527|      0|    case FLB_LOG_DEBUG:
  ------------------
  |  |   42|      0|#define FLB_LOG_DEBUG   4
  ------------------
  |  Branch (527:5): [True: 0, False: 1.93k]
  ------------------
  528|      0|        header_title = "debug";
  529|      0|        header_color = ANSI_YELLOW;
  ------------------
  |  |   51|      0|#define ANSI_YELLOW   "\033[93m"
  ------------------
  530|      0|        break;
  531|      0|    case FLB_LOG_IDEBUG:
  ------------------
  |  |   46|      0|#define FLB_LOG_IDEBUG  10
  ------------------
  |  Branch (531:5): [True: 0, False: 1.93k]
  ------------------
  532|      0|        header_title = "debug";
  533|      0|        header_color = ANSI_CYAN;
  ------------------
  |  |   48|      0|#define ANSI_CYAN     "\033[96m"
  ------------------
  534|      0|        break;
  535|      0|    case FLB_LOG_TRACE:
  ------------------
  |  |   43|      0|#define FLB_LOG_TRACE   5
  ------------------
  |  Branch (535:5): [True: 0, False: 1.93k]
  ------------------
  536|      0|        header_title = "trace";
  537|      0|        header_color = ANSI_BLUE;
  ------------------
  |  |   52|      0|#define ANSI_BLUE     "\033[94m"
  ------------------
  538|      0|        break;
  539|  1.93k|    }
  540|       |
  541|       |    #ifdef FLB_LOG_NO_CONTROL_CHARS
  542|       |    header_color = "";
  543|       |    bold_color = "";
  544|       |    reset_color = "";
  545|       |    #else
  546|       |    /* Only print colors to a terminal */
  547|  1.93k|    if (!isatty(STDOUT_FILENO)) {
  ------------------
  |  Branch (547:9): [True: 1.93k, False: 0]
  ------------------
  548|  1.93k|        header_color = "";
  549|  1.93k|        bold_color = "";
  550|  1.93k|        reset_color = "";
  551|  1.93k|    }
  552|  1.93k|    #endif // FLB_LOG_NO_CONTROL_CHARS
  553|       |
  554|  1.93k|    now = time(NULL);
  555|  1.93k|    current = localtime_r(&now, &result);
  556|       |
  557|  1.93k|    if (current == NULL) {
  ------------------
  |  Branch (557:9): [True: 0, False: 1.93k]
  ------------------
  558|      0|        return -1;
  559|      0|    }
  560|       |
  561|  1.93k|    len = snprintf(msg->msg, sizeof(msg->msg) - 1,
  562|  1.93k|                   "%s[%s%i/%02i/%02i %02i:%02i:%02i%s]%s [%s%5s%s] ",
  563|       |                   /*      time     */                    /* type */
  564|       |
  565|       |                   /* time variables */
  566|  1.93k|                   bold_color, reset_color,
  567|  1.93k|                   current->tm_year + 1900,
  568|  1.93k|                   current->tm_mon + 1,
  569|  1.93k|                   current->tm_mday,
  570|  1.93k|                   current->tm_hour,
  571|  1.93k|                   current->tm_min,
  572|  1.93k|                   current->tm_sec,
  573|  1.93k|                   bold_color, reset_color,
  574|       |
  575|       |                   /* type format */
  576|  1.93k|                   header_color, header_title, reset_color);
  577|       |
  578|  1.93k|    body_size = (sizeof(msg->msg) - 2) - len;
  579|  1.93k|    total = vsnprintf(msg->msg + len,
  580|  1.93k|                      body_size,
  581|  1.93k|                      fmt, *args);
  582|  1.93k|    if (total < 0) {
  ------------------
  |  Branch (582:9): [True: 0, False: 1.93k]
  ------------------
  583|      0|        return -1;
  584|      0|    }
  585|  1.93k|    ret = total; /* ret means a buffer size need to save log body */
  586|       |
  587|  1.93k|    total = strlen(msg->msg + len) + len;
  588|  1.93k|    msg->msg[total++] = '\n';
  589|  1.93k|    msg->msg[total]   = '\0';
  590|  1.93k|    msg->size = total;
  591|       |
  592|  1.93k|    *ret_len = len;
  593|       |
  594|  1.93k|    if (ret >= body_size) {
  ------------------
  |  Branch (594:9): [True: 0, False: 1.93k]
  ------------------
  595|       |        /* log is truncated */
  596|      0|        return ret - body_size;
  597|      0|    }
  598|       |
  599|  1.93k|    return 0;
  600|  1.93k|}
flb_log_print:
  629|  1.93k|{
  630|  1.93k|    int n;
  631|  1.93k|    int len;
  632|  1.93k|    int ret;
  633|  1.93k|    struct log_message msg = {0};
  634|  1.93k|    va_list args;
  635|       |
  636|  1.93k|    struct flb_worker *w;
  637|       |
  638|  1.93k|    va_start(args, fmt);
  639|  1.93k|    ret = flb_log_construct(&msg, &len, type, file, line, fmt, &args);
  640|  1.93k|    va_end(args);
  641|       |
  642|  1.93k|    if (ret < 0) {
  ------------------
  |  Branch (642:9): [True: 0, False: 1.93k]
  ------------------
  643|      0|        return;
  644|      0|    }
  645|       |
  646|  1.93k|    w = flb_worker_get();
  647|  1.93k|    if (w) {
  ------------------
  |  Branch (647:9): [True: 0, False: 1.93k]
  ------------------
  648|      0|        n = flb_pipe_write_all(w->log[1], &msg, sizeof(msg));
  649|      0|        if (n == -1) {
  ------------------
  |  Branch (649:13): [True: 0, False: 0]
  ------------------
  650|      0|            fprintf(stderr, "%s", (char *) msg.msg);
  651|      0|            perror("write");
  652|      0|        }
  653|      0|    }
  654|  1.93k|    else {
  655|  1.93k|        fprintf(stderr, "%s", (char *) msg.msg);
  656|  1.93k|    }
  657|       |
  658|       |    #ifdef FLB_HAVE_AWS_ERROR_REPORTER
  659|       |    if (is_error_reporting_enabled()) {
  660|       |        if (type == FLB_LOG_ERROR) {
  661|       |            flb_aws_error_reporter_write(error_reporter, msg.msg + len);
  662|       |        }
  663|       |
  664|       |        flb_aws_error_reporter_clean(error_reporter);
  665|       |    }
  666|       |    #endif
  667|  1.93k|}
flb_errno_print:
  670|    815|{
  671|    815|    char buf[256];
  672|       |
  673|    815|    strerror_r(errnum, buf, sizeof(buf) - 1);
  674|    815|    flb_error("[%s:%i errno=%i] %s", file, line, errnum, buf);
  ------------------
  |  |  140|    815|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|    815|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 815, False: 0]
  |  |  ------------------
  |  |  141|    815|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|    815|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  675|    815|    return 0;
  676|    815|}

flb_net_setup_init:
  103|    413|{
  104|    413|    net->dns_mode = NULL;
  105|    413|    net->dns_resolver = NULL;
  106|    413|    net->dns_prefer_ipv4 = FLB_FALSE;
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
  107|    413|    net->keepalive = FLB_TRUE;
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  108|    413|    net->keepalive_idle_timeout = 30;
  109|    413|    net->keepalive_max_recycle = 0;
  110|    413|    net->accept_timeout = 10;
  111|    413|    net->connect_timeout = 10;
  112|    413|    net->io_timeout = 0; /* Infinite time */
  113|    413|    net->source_address = NULL;
  114|    413|}

flb_parser_create:
  160|    826|{
  161|    826|    int ret;
  162|    826|    int len;
  163|    826|    int diff = 0;
  164|    826|    int size;
  165|    826|    int is_epoch = FLB_FALSE;
  ------------------
  |  |   25|    826|#define FLB_FALSE  0
  ------------------
  166|    826|    char *tmp;
  167|    826|    char *timeptr;
  168|    826|    struct mk_list *head;
  169|    826|    struct flb_parser *p;
  170|    826|    struct flb_regex *regex;
  171|       |
  172|       |    /* Iterate current parsers and make sure the new one don't exists */
  173|    826|    mk_list_foreach(head, &config->parsers) {
  ------------------
  |  |  205|  1.23k|#define mk_list_foreach(curr, head) for( curr = (head)->next; curr != (head); curr = curr->next )
  |  |  ------------------
  |  |  |  Branch (205:63): [True: 413, False: 826]
  |  |  ------------------
  ------------------
  174|    413|        p = mk_list_entry(head, struct flb_parser, _head);
  ------------------
  |  |  214|    413|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|    413|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|    413|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|    413|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  175|    413|        if (p->name && strcmp(p->name, name) == 0) {
  ------------------
  |  Branch (175:13): [True: 413, False: 0]
  |  Branch (175:24): [True: 0, False: 413]
  ------------------
  176|      0|            flb_error("[parser] parser named '%s' already exists, skip.",
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  177|      0|                      name);
  178|      0|            return NULL;
  179|      0|        }
  180|    413|    }
  181|       |
  182|       |    /* Allocate context */
  183|    826|    p = flb_calloc(1, sizeof(struct flb_parser));
  184|    826|    if (!p) {
  ------------------
  |  Branch (184:9): [True: 0, False: 826]
  ------------------
  185|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  186|      0|        return NULL;
  187|      0|    }
  188|    826|    p->decoders = decoders;
  189|    826|    mk_list_add(&p->_head, &config->parsers);
  190|       |
  191|       |    /* Format lookup */
  192|    826|    if (strcasecmp(format, "regex") == 0) {
  ------------------
  |  Branch (192:9): [True: 413, False: 413]
  ------------------
  193|    413|        p->type = FLB_PARSER_REGEX;
  ------------------
  |  |   30|    413|#define FLB_PARSER_REGEX 1
  ------------------
  194|    413|    }
  195|    413|    else if (strcasecmp(format, "json") == 0) {
  ------------------
  |  Branch (195:14): [True: 413, False: 0]
  ------------------
  196|    413|        p->type = FLB_PARSER_JSON;
  ------------------
  |  |   31|    413|#define FLB_PARSER_JSON  2
  ------------------
  197|    413|    }
  198|      0|    else if (strcasecmp(format, "ltsv") == 0) {
  ------------------
  |  Branch (198:14): [True: 0, False: 0]
  ------------------
  199|      0|        p->type = FLB_PARSER_LTSV;
  ------------------
  |  |   32|      0|#define FLB_PARSER_LTSV  3
  ------------------
  200|      0|    }
  201|      0|    else if (strcasecmp(format, "logfmt") == 0) {
  ------------------
  |  Branch (201:14): [True: 0, False: 0]
  ------------------
  202|      0|        p->type = FLB_PARSER_LOGFMT;
  ------------------
  |  |   33|      0|#define FLB_PARSER_LOGFMT 4
  ------------------
  203|      0|    }
  204|      0|    else {
  205|      0|        flb_error("[parser:%s] Invalid format %s", name, format);
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  206|      0|        mk_list_del(&p->_head);
  207|      0|        flb_free(p);
  208|      0|        return NULL;
  209|      0|    }
  210|       |
  211|    826|    if (p->type == FLB_PARSER_REGEX) {
  ------------------
  |  |   30|    826|#define FLB_PARSER_REGEX 1
  ------------------
  |  Branch (211:9): [True: 413, False: 413]
  ------------------
  212|    413|        if (!p_regex) {
  ------------------
  |  Branch (212:13): [True: 0, False: 413]
  ------------------
  213|      0|            flb_error("[parser:%s] Invalid regex pattern", name);
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  214|      0|            mk_list_del(&p->_head);
  215|      0|            flb_free(p);
  216|      0|            return NULL;
  217|      0|        }
  218|       |
  219|    413|        regex = flb_regex_create(p_regex);
  220|    413|        if (!regex) {
  ------------------
  |  Branch (220:13): [True: 0, False: 413]
  ------------------
  221|      0|            flb_error("[parser:%s] Invalid regex pattern %s", name, p_regex);
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  222|      0|            mk_list_del(&p->_head);
  223|      0|            flb_free(p);
  224|      0|            return NULL;
  225|      0|        }
  226|    413|        p->regex = regex;
  227|    413|        p->skip_empty = skip_empty;
  228|    413|        p->p_regex = flb_strdup(p_regex);
  229|    413|    }
  230|       |
  231|    826|    p->name = flb_strdup(name);
  232|       |
  233|    826|    if (time_fmt) {
  ------------------
  |  Branch (233:9): [True: 826, False: 0]
  ------------------
  234|    826|        p->time_fmt_full = flb_strdup(time_fmt);
  235|    826|        if (!p->time_fmt_full) {
  ------------------
  |  Branch (235:13): [True: 0, False: 826]
  ------------------
  236|      0|            flb_error("[parser:%s] could not duplicate time fmt full", name);
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  237|      0|            flb_interim_parser_destroy(p);
  238|      0|            return NULL;
  239|      0|        }
  240|    826|        p->time_fmt = flb_strdup(time_fmt);
  241|    826|        if (!p->time_fmt) {
  ------------------
  |  Branch (241:13): [True: 0, False: 826]
  ------------------
  242|      0|            flb_error("[parser:%s] could not duplicate time fmt", name);
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  243|      0|            flb_interim_parser_destroy(p);
  244|      0|            return NULL;
  245|      0|        }
  246|       |
  247|       |        /* Check if the format is considering the year */
  248|    826|        if (strstr(p->time_fmt, "%Y") || strstr(p->time_fmt, "%y")) {
  ------------------
  |  Branch (248:13): [True: 826, False: 0]
  |  Branch (248:42): [True: 0, False: 0]
  ------------------
  249|    826|            p->time_with_year = FLB_TRUE;
  ------------------
  |  |   26|    826|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    826|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  250|    826|        }
  251|      0|        else if (strstr(p->time_fmt, "%s")) {
  ------------------
  |  Branch (251:18): [True: 0, False: 0]
  ------------------
  252|      0|            is_epoch = FLB_TRUE;
  ------------------
  |  |   26|      0|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      0|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  253|      0|            p->time_with_year = FLB_TRUE;
  ------------------
  |  |   26|      0|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      0|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  254|      0|        }
  255|      0|        else {
  256|      0|            size = strlen(p->time_fmt);
  257|      0|            p->time_with_year = FLB_FALSE;
  ------------------
  |  |   25|      0|#define FLB_FALSE  0
  ------------------
  258|      0|            p->time_fmt_year = flb_malloc(size + 4);
  259|      0|            if (!p->time_fmt_year) {
  ------------------
  |  Branch (259:17): [True: 0, False: 0]
  ------------------
  260|      0|                flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  261|      0|                flb_interim_parser_destroy(p);
  262|      0|                return NULL;
  263|      0|            }
  264|       |
  265|       |            /* Append the year at the beginning */
  266|      0|            tmp = p->time_fmt_year;
  267|      0|            *tmp++ = '%';
  268|      0|            *tmp++ = 'Y';
  269|      0|            *tmp++ = ' ';
  270|       |
  271|      0|            memcpy(tmp, p->time_fmt, size);
  272|      0|            tmp += size;
  273|      0|            *tmp++ = '\0';
  274|      0|        }
  275|       |
  276|       |        /* Check if the format contains a timezone (%z) */
  277|    826|        if (strstr(p->time_fmt, "%z") || strstr(p->time_fmt, "%Z") ||
  ------------------
  |  Branch (277:13): [True: 413, False: 413]
  |  Branch (277:42): [True: 0, False: 413]
  ------------------
  278|    826|            strstr(p->time_fmt, "%SZ") || strstr(p->time_fmt, "%S.%LZ")) {
  ------------------
  |  Branch (278:13): [True: 0, False: 413]
  |  Branch (278:43): [True: 0, False: 413]
  ------------------
  279|    413|#if defined(FLB_HAVE_GMTOFF) || !defined(FLB_HAVE_SYSTEM_STRPTIME)
  280|    413|            p->time_with_tz = FLB_TRUE;
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  281|       |#else
  282|       |            flb_error("[parser] timezone offset not supported");
  283|       |            flb_error("[parser] you cannot use %%z/%%Z on this platform");
  284|       |            flb_interim_parser_destroy(p);
  285|       |            return NULL;
  286|       |#endif
  287|    413|        }
  288|       |
  289|       |        /*
  290|       |         * Check if the format expect fractional seconds
  291|       |         *
  292|       |         * Since strptime(3) does not support fractional seconds, this
  293|       |         * requires a workaround/hack in our parser. This is a known
  294|       |         * issue and addressed in different ways in other languages.
  295|       |         *
  296|       |         * The following links are a good reference:
  297|       |         *
  298|       |         * - http://stackoverflow.com/questions/7114690/how-to-parse-syslog-timestamp
  299|       |         * - http://code.activestate.com/lists/python-list/521885
  300|       |         */
  301|    826|        if (is_epoch == FLB_TRUE || p->time_with_year == FLB_TRUE) {
  ------------------
  |  |   26|  1.65k|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|  1.65k|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
                      if (is_epoch == FLB_TRUE || p->time_with_year == FLB_TRUE) {
  ------------------
  |  |   26|    826|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    826|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  |  Branch (301:13): [True: 0, False: 826]
  |  Branch (301:37): [True: 826, False: 0]
  ------------------
  302|    826|            timeptr = p->time_fmt;
  303|    826|        }
  304|      0|        else {
  305|      0|            timeptr = p->time_fmt_year;
  306|      0|        }
  307|       |
  308|    826|        tmp = strstr(timeptr, "%L");
  309|    826|        if (tmp) {
  ------------------
  |  Branch (309:13): [True: 826, False: 0]
  ------------------
  310|    826|            tmp[0] = '\0';
  311|    826|            tmp[1] = '\0';
  312|    826|            p->time_frac_secs = (tmp + 2);
  313|    826|        }
  314|       |
  315|       |        /* Optional fixed timezone offset */
  316|    826|        if (time_offset) {
  ------------------
  |  Branch (316:13): [True: 0, False: 826]
  ------------------
  317|      0|            diff = 0;
  318|      0|            len = strlen(time_offset);
  319|      0|            ret = flb_parser_tzone_offset(time_offset, len, &diff);
  320|      0|            if (ret == -1) {
  ------------------
  |  Branch (320:17): [True: 0, False: 0]
  ------------------
  321|      0|                flb_interim_parser_destroy(p);
  322|      0|                return NULL;
  323|      0|            }
  324|      0|            p->time_offset = diff;
  325|      0|        }
  326|    826|    }
  327|       |
  328|    826|    if (time_key) {
  ------------------
  |  Branch (328:9): [True: 826, False: 0]
  ------------------
  329|    826|        p->time_key = flb_strdup(time_key);
  330|    826|    }
  331|       |
  332|    826|    p->time_keep = time_keep;
  333|    826|    p->time_strict = time_strict;
  334|    826|    p->logfmt_no_bare_keys = logfmt_no_bare_keys;
  335|    826|    p->types = types;
  336|    826|    p->types_len = types_len;
  337|    826|    return p;
  338|    826|}
flb_parser_destroy:
  341|    826|{
  342|    826|    int i = 0;
  343|       |
  344|    826|    if (parser->type == FLB_PARSER_REGEX) {
  ------------------
  |  |   30|    826|#define FLB_PARSER_REGEX 1
  ------------------
  |  Branch (344:9): [True: 413, False: 413]
  ------------------
  345|    413|        flb_regex_destroy(parser->regex);
  346|    413|        flb_free(parser->p_regex);
  347|    413|    }
  348|       |
  349|    826|    flb_free(parser->name);
  350|    826|    if (parser->time_fmt) {
  ------------------
  |  Branch (350:9): [True: 826, False: 0]
  ------------------
  351|    826|        flb_free(parser->time_fmt);
  352|    826|        flb_free(parser->time_fmt_full);
  353|    826|    }
  354|    826|    if (parser->time_fmt_year) {
  ------------------
  |  Branch (354:9): [True: 0, False: 826]
  ------------------
  355|      0|        flb_free(parser->time_fmt_year);
  356|      0|    }
  357|    826|    if (parser->time_key) {
  ------------------
  |  Branch (357:9): [True: 826, False: 0]
  ------------------
  358|    826|        flb_free(parser->time_key);
  359|    826|    }
  360|    826|    if (parser->types_len != 0) {
  ------------------
  |  Branch (360:9): [True: 0, False: 826]
  ------------------
  361|      0|        for (i=0; i<parser->types_len; i++){
  ------------------
  |  Branch (361:19): [True: 0, False: 0]
  ------------------
  362|      0|            flb_free(parser->types[i].key);
  363|      0|        }
  364|      0|        flb_free(parser->types);
  365|      0|    }
  366|       |
  367|    826|    if (parser->decoders) {
  ------------------
  |  Branch (367:9): [True: 0, False: 826]
  ------------------
  368|      0|        flb_parser_decoder_list_destroy(parser->decoders);
  369|      0|    }
  370|       |
  371|    826|    mk_list_del(&parser->_head);
  372|    826|    flb_free(parser);
  373|    826|}
flb_parser_exit:
  376|    413|{
  377|    413|    struct mk_list *tmp;
  378|    413|    struct mk_list *head;
  379|    413|    struct flb_parser *parser;
  380|       |
  381|       |    /* release 'parsers' */
  382|    826|    mk_list_foreach_safe(head, tmp, &config->parsers) {
  ------------------
  |  |  207|  1.23k|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 826, False: 413]
  |  |  ------------------
  ------------------
  383|    826|        parser = mk_list_entry(head, struct flb_parser, _head);
  ------------------
  |  |  214|    826|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|    826|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|    826|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|    826|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  384|    826|        flb_parser_destroy(parser);
  385|    826|    }
  386|       |
  387|       |    /* release 'multiline parsers' */
  388|    413|    flb_ml_exit(config);
  389|    413|}

flb_plugin_create:
  173|    413|{
  174|    413|    struct flb_plugins *ctx;
  175|       |
  176|    413|    ctx = flb_malloc(sizeof(struct flb_plugins));
  177|    413|    if (!ctx) {
  ------------------
  |  Branch (177:9): [True: 0, False: 413]
  ------------------
  178|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  179|      0|        return NULL;
  180|      0|    }
  181|       |
  182|    413|    mk_list_init(&ctx->input);
  183|    413|    mk_list_init(&ctx->filter);
  184|    413|    mk_list_init(&ctx->output);
  185|       |
  186|    413|    return ctx;
  187|    413|}
flb_plugin_destroy:
  399|    413|{
  400|    413|    struct mk_list *tmp;
  401|    413|    struct mk_list *head;
  402|    413|    struct flb_plugin *plugin;
  403|       |
  404|    413|    mk_list_foreach_safe(head, tmp, &ctx->input) {
  ------------------
  |  |  207|    413|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 0, False: 413]
  |  |  ------------------
  ------------------
  405|      0|        plugin = mk_list_entry(head, struct flb_plugin, _head);
  ------------------
  |  |  214|      0|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|      0|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  406|      0|        destroy_plugin(plugin);
  407|      0|    }
  408|       |
  409|    413|    mk_list_foreach_safe(head, tmp, &ctx->filter) {
  ------------------
  |  |  207|    413|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 0, False: 413]
  |  |  ------------------
  ------------------
  410|      0|        plugin = mk_list_entry(head, struct flb_plugin, _head);
  ------------------
  |  |  214|      0|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|      0|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  411|      0|        destroy_plugin(plugin);
  412|      0|    }
  413|       |
  414|    413|    mk_list_foreach_safe(head, tmp, &ctx->output) {
  ------------------
  |  |  207|    413|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 0, False: 413]
  |  |  ------------------
  ------------------
  415|      0|        plugin = mk_list_entry(head, struct flb_plugin, _head);
  ------------------
  |  |  214|      0|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|      0|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  416|      0|        destroy_plugin(plugin);
  417|      0|    }
  418|       |
  419|    413|    flb_free(ctx);
  420|    413|}

flb_regex_init:
  151|    413|{
  152|    413|    return onig_init();
  153|    413|}
flb_regex_create:
  156|  9.49k|{
  157|  9.49k|    int ret;
  158|  9.49k|    struct flb_regex *r;
  159|       |
  160|       |    /* Create context */
  161|  9.49k|    r = flb_malloc(sizeof(struct flb_regex));
  162|  9.49k|    if (!r) {
  ------------------
  |  Branch (162:9): [True: 0, False: 9.49k]
  ------------------
  163|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  164|      0|        return NULL;
  165|      0|    }
  166|       |
  167|       |    /* Compile pattern */
  168|  9.49k|    ret = str_to_regex(pattern, (OnigRegex*)&r->regex);
  169|  9.49k|    if (ret == -1) {
  ------------------
  |  Branch (169:9): [True: 0, False: 9.49k]
  ------------------
  170|      0|        flb_free(r);
  171|      0|        return NULL;
  172|      0|    }
  173|       |
  174|  9.49k|    return r;
  175|  9.49k|}
flb_regex_destroy:
  311|  9.49k|{
  312|  9.49k|    onig_free(r->regex);
  313|  9.49k|    flb_free(r);
  314|  9.49k|    return 0;
  315|  9.49k|}
flb_regex.c:str_to_regex:
  111|  9.49k|{
  112|  9.49k|    int ret;
  113|  9.49k|    size_t len;
  114|  9.49k|    const char *start;
  115|  9.49k|    const char *end;
  116|  9.49k|    char *new_end = NULL;
  117|  9.49k|    OnigErrorInfo einfo;
  118|  9.49k|    OnigOptionType option;
  119|       |
  120|  9.49k|    len = strlen(pattern);
  121|  9.49k|    start = pattern;
  122|  9.49k|    end = pattern + len;
  123|       |
  124|  9.49k|    option = check_option(start, end, &new_end);
  125|       |
  126|  9.49k|    if (pattern[0] == '/' && pattern[len - 1] == '/') {
  ------------------
  |  Branch (126:9): [True: 9.08k, False: 413]
  |  Branch (126:30): [True: 9.08k, False: 0]
  ------------------
  127|  9.08k|        start++;
  128|  9.08k|        end--;
  129|  9.08k|    }
  130|       |
  131|  9.49k|    if (new_end != NULL) {
  ------------------
  |  Branch (131:9): [True: 0, False: 9.49k]
  ------------------
  132|       |        /* pattern is /pat/option. new_end indicates a last '/'. */
  133|      0|        start++;
  134|      0|        end = new_end;
  135|      0|    }
  136|       |
  137|  9.49k|    ret = onig_new(reg,
  138|  9.49k|                   (const unsigned char *)start, (const unsigned char *)end,
  139|  9.49k|                   option,
  140|  9.49k|                   ONIG_ENCODING_UTF8, ONIG_SYNTAX_RUBY, &einfo);
  ------------------
  |  |  274|  9.49k|# define ONIG_ENCODING_UTF8         ONIG_ENCODING_UTF_8
  |  |  ------------------
  |  |  |  |  242|  9.49k|# define ONIG_ENCODING_UTF_8        (&OnigEncodingUTF_8)
  |  |  ------------------
  ------------------
                                 ONIG_ENCODING_UTF8, ONIG_SYNTAX_RUBY, &einfo);
  ------------------
  |  |  514|  9.49k|#define ONIG_SYNTAX_RUBY               (&OnigSyntaxRuby)
  ------------------
  141|       |
  142|  9.49k|    if (ret != ONIG_NORMAL) {
  ------------------
  |  |  627|  9.49k|#define ONIG_NORMAL                                            0
  ------------------
  |  Branch (142:9): [True: 0, False: 9.49k]
  ------------------
  143|      0|        printf("ret=%d. start=%s end=%c\n", ret, start, *end);
  144|      0|        return -1;
  145|      0|    }
  146|  9.49k|    return 0;
  147|  9.49k|}
flb_regex.c:check_option:
   61|  9.49k|{
   62|  9.49k|    char *chr = NULL;
   63|  9.49k|    OnigOptionType option = ONIG_OPTION_NONE;
  ------------------
  |  |  453|  9.49k|#define ONIG_OPTION_NONE                 0U
  ------------------
   64|       |
   65|  9.49k|    if (start == NULL || end == NULL || new_end == NULL) {
  ------------------
  |  Branch (65:9): [True: 0, False: 9.49k]
  |  Branch (65:26): [True: 0, False: 9.49k]
  |  Branch (65:41): [True: 0, False: 9.49k]
  ------------------
   66|      0|        return ONIG_OPTION_DEFAULT;
  ------------------
  |  |  450|      0|#define ONIG_OPTION_DEFAULT            ONIG_OPTION_NONE
  |  |  ------------------
  |  |  |  |  453|      0|#define ONIG_OPTION_NONE                 0U
  |  |  ------------------
  ------------------
   67|  9.49k|    } else if (start[0] != '/') {
  ------------------
  |  Branch (67:16): [True: 413, False: 9.08k]
  ------------------
   68|    413|        *new_end = NULL;
   69|    413|        return ONIG_OPTION_DEFAULT;
  ------------------
  |  |  450|    413|#define ONIG_OPTION_DEFAULT            ONIG_OPTION_NONE
  |  |  ------------------
  |  |  |  |  453|    413|#define ONIG_OPTION_NONE                 0U
  |  |  ------------------
  ------------------
   70|    413|    }
   71|       |
   72|  9.08k|    chr = strrchr(start, '/');
   73|  9.08k|    if (chr == start || chr == end) {
  ------------------
  |  Branch (73:9): [True: 0, False: 9.08k]
  |  Branch (73:25): [True: 0, False: 9.08k]
  ------------------
   74|      0|        *new_end = NULL;
   75|      0|        return ONIG_OPTION_DEFAULT;
  ------------------
  |  |  450|      0|#define ONIG_OPTION_DEFAULT            ONIG_OPTION_NONE
  |  |  ------------------
  |  |  |  |  453|      0|#define ONIG_OPTION_NONE                 0U
  |  |  ------------------
  ------------------
   76|      0|    }
   77|  9.08k|    *new_end = chr;
   78|       |
   79|  9.08k|    chr++;
   80|  9.08k|    while(chr != end && *chr != '\0') {
  ------------------
  |  Branch (80:11): [True: 0, False: 9.08k]
  |  Branch (80:25): [True: 0, False: 0]
  ------------------
   81|      0|        switch (*chr) {
   82|      0|        case 'm':
  ------------------
  |  Branch (82:9): [True: 0, False: 0]
  ------------------
   83|      0|            option |= ONIG_OPTION_MULTILINE;
  ------------------
  |  |  456|      0|#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
  |  |  ------------------
  |  |  |  |  455|      0|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   84|      0|            break;
   85|      0|        case 'i':
  ------------------
  |  Branch (85:9): [True: 0, False: 0]
  ------------------
   86|      0|            option |= ONIG_OPTION_IGNORECASE;
  ------------------
  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  ------------------
   87|      0|            break;
   88|      0|        case 'o':
  ------------------
  |  Branch (88:9): [True: 0, False: 0]
  ------------------
   89|      0|            flb_debug("[regex:%s]: 'o' option is not supported.", __FUNCTION__);
  ------------------
  |  |  167|      0|    if (flb_log_check(FLB_LOG_DEBUG))                               \
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  |  |  |  Branch (167:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  168|      0|        flb_log_print(FLB_LOG_DEBUG, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  ------------------
   90|      0|            break;
   91|      0|        case 'x':
  ------------------
  |  Branch (91:9): [True: 0, False: 0]
  ------------------
   92|      0|            option |= ONIG_OPTION_EXTEND;
  ------------------
  |  |  455|      0|#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
  |  |  ------------------
  |  |  |  |  454|      0|#define ONIG_OPTION_IGNORECASE           1U
  |  |  ------------------
  ------------------
   93|      0|            break;
   94|      0|        default:
  ------------------
  |  Branch (94:9): [True: 0, False: 0]
  ------------------
   95|      0|            flb_debug("[regex:%s]: unknown option. use default.", __FUNCTION__);
  ------------------
  |  |  167|      0|    if (flb_log_check(FLB_LOG_DEBUG))                               \
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  |  |  |  Branch (167:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  168|      0|        flb_log_print(FLB_LOG_DEBUG, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  ------------------
   96|      0|            *new_end = NULL;
   97|      0|            return ONIG_OPTION_DEFAULT;
  ------------------
  |  |  450|      0|#define ONIG_OPTION_DEFAULT            ONIG_OPTION_NONE
  |  |  ------------------
  |  |  |  |  453|      0|#define ONIG_OPTION_NONE                 0U
  |  |  ------------------
  ------------------
   98|      0|        }
   99|      0|        chr++;
  100|      0|    }
  101|       |
  102|  9.08k|    if (option == ONIG_OPTION_NONE) {
  ------------------
  |  |  453|  9.08k|#define ONIG_OPTION_NONE                 0U
  ------------------
  |  Branch (102:9): [True: 9.08k, False: 0]
  ------------------
  103|  9.08k|        *new_end = NULL;
  104|  9.08k|        option = ONIG_OPTION_DEFAULT;
  ------------------
  |  |  450|  9.08k|#define ONIG_OPTION_DEFAULT            ONIG_OPTION_NONE
  |  |  ------------------
  |  |  |  |  453|  9.08k|#define ONIG_OPTION_NONE                 0U
  |  |  ------------------
  ------------------
  105|  9.08k|    }
  106|       |
  107|  9.08k|    return option;
  108|  9.08k|}

flb_sds_create_len:
   58|  36.6k|{
   59|  36.6k|    flb_sds_t s;
   60|  36.6k|    struct flb_sds *head;
   61|       |
   62|  36.6k|    s = sds_alloc(len);
   63|  36.6k|    if (!s) {
  ------------------
  |  Branch (63:9): [True: 0, False: 36.6k]
  ------------------
   64|      0|        return NULL;
   65|      0|    }
   66|       |
   67|  36.6k|    if (str) {
  ------------------
  |  Branch (67:9): [True: 36.6k, False: 0]
  ------------------
   68|  36.6k|        memcpy(s, str, len);
   69|  36.6k|        s[len] = '\0';
   70|       |
   71|  36.6k|        head = FLB_SDS_HEADER(s);
  ------------------
  |  |   46|  36.6k|#define FLB_SDS_HEADER(s)  ((struct flb_sds *) (s - FLB_SDS_HEADER_SIZE))
  |  |  ------------------
  |  |  |  |   34|  36.6k|#define FLB_SDS_HEADER_SIZE (sizeof(uint64_t) + sizeof(uint64_t))
  |  |  ------------------
  ------------------
   72|  36.6k|        head->len = len;
   73|  36.6k|    }
   74|  36.6k|    return s;
   75|  36.6k|}
flb_sds_create:
   78|  14.8k|{
   79|  14.8k|    size_t len;
   80|       |
   81|  14.8k|    if (!str) {
  ------------------
  |  Branch (81:9): [True: 0, False: 14.8k]
  ------------------
   82|      0|        len = 0;
   83|      0|    }
   84|  14.8k|    else {
   85|  14.8k|        len = strlen(str);
   86|  14.8k|    }
   87|       |
   88|  14.8k|    return flb_sds_create_len(str, len);
   89|  14.8k|}
flb_sds_create_size:
   92|    826|{
   93|    826|    return sds_alloc(size);
   94|    826|}
flb_sds_increase:
   98|    826|{
   99|    826|    size_t new_size;
  100|    826|    struct flb_sds *head;
  101|    826|    flb_sds_t out;
  102|    826|    void *tmp;
  103|       |
  104|    826|    out = s;
  105|    826|    new_size = (FLB_SDS_HEADER_SIZE + flb_sds_alloc(s) + len + 1);
  ------------------
  |  |   34|    826|#define FLB_SDS_HEADER_SIZE (sizeof(uint64_t) + sizeof(uint64_t))
  ------------------
  106|    826|    head = FLB_SDS_HEADER(s);
  ------------------
  |  |   46|    826|#define FLB_SDS_HEADER(s)  ((struct flb_sds *) (s - FLB_SDS_HEADER_SIZE))
  |  |  ------------------
  |  |  |  |   34|    826|#define FLB_SDS_HEADER_SIZE (sizeof(uint64_t) + sizeof(uint64_t))
  |  |  ------------------
  ------------------
  107|    826|    tmp = flb_realloc(head, new_size);
  108|    826|    if (!tmp) {
  ------------------
  |  Branch (108:9): [True: 0, False: 826]
  ------------------
  109|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  110|      0|        return NULL;
  111|      0|    }
  112|    826|    head = (struct flb_sds *) tmp;
  113|    826|    head->alloc += len;
  114|    826|    out = head->buf;
  115|       |
  116|    826|    return out;
  117|    826|}
flb_sds_printf:
  409|    826|{
  410|    826|    va_list ap;
  411|    826|    int len = strlen(fmt)*2;
  412|    826|    int size;
  413|    826|    flb_sds_t tmp = NULL;
  414|    826|    flb_sds_t s;
  415|    826|    struct flb_sds *head;
  416|       |
  417|    826|    if (len < 64) len = 64;
  ------------------
  |  Branch (417:9): [True: 826, False: 0]
  ------------------
  418|       |
  419|    826|    s = *sds;
  420|    826|    if (flb_sds_avail(s)< len) {
  ------------------
  |  Branch (420:9): [True: 826, False: 0]
  ------------------
  421|    826|        tmp = flb_sds_increase(s, len);
  422|    826|        if (!tmp) {
  ------------------
  |  Branch (422:13): [True: 0, False: 826]
  ------------------
  423|      0|            return NULL;
  424|      0|        }
  425|    826|        *sds = s = tmp;
  426|    826|    }
  427|       |
  428|    826|    va_start(ap, fmt);
  429|    826|    size = vsnprintf((char *) (s + flb_sds_len(s)), flb_sds_avail(s), fmt, ap);
  430|    826|    if (size < 0) {
  ------------------
  |  Branch (430:9): [True: 0, False: 826]
  ------------------
  431|      0|        flb_warn("[%s] buggy vsnprintf return %d", __FUNCTION__, size);
  ------------------
  |  |  149|      0|    if (flb_log_check(FLB_LOG_WARN))                                 \
  |  |  ------------------
  |  |  |  |   40|      0|#define FLB_LOG_WARN    2
  |  |  ------------------
  |  |  |  Branch (149:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  150|      0|        flb_log_print(FLB_LOG_WARN, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   40|      0|#define FLB_LOG_WARN    2
  |  |  ------------------
  ------------------
  432|      0|        va_end(ap);
  433|      0|        return NULL;
  434|      0|    }
  435|    826|    va_end(ap);
  436|       |
  437|    826|    if (size > flb_sds_avail(s)) {
  ------------------
  |  Branch (437:9): [True: 0, False: 826]
  ------------------
  438|      0|        tmp = flb_sds_increase(s, size);
  439|      0|        if (!tmp) {
  ------------------
  |  Branch (439:13): [True: 0, False: 0]
  ------------------
  440|      0|            return NULL;
  441|      0|        }
  442|      0|        *sds = s = tmp;
  443|       |
  444|      0|        va_start(ap, fmt);
  445|      0|        size = vsnprintf((char *) (s + flb_sds_len(s)), flb_sds_avail(s), fmt, ap);
  446|      0|        if (size > flb_sds_avail(s)) {
  ------------------
  |  Branch (446:13): [True: 0, False: 0]
  ------------------
  447|      0|            flb_warn("[%s] vsnprintf is insatiable ", __FUNCTION__);
  ------------------
  |  |  149|      0|    if (flb_log_check(FLB_LOG_WARN))                                 \
  |  |  ------------------
  |  |  |  |   40|      0|#define FLB_LOG_WARN    2
  |  |  ------------------
  |  |  |  Branch (149:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  150|      0|        flb_log_print(FLB_LOG_WARN, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   40|      0|#define FLB_LOG_WARN    2
  |  |  ------------------
  ------------------
  448|      0|            va_end(ap);
  449|      0|            return NULL;
  450|      0|        }
  451|      0|        va_end(ap);
  452|      0|    }
  453|       |
  454|    826|    head = FLB_SDS_HEADER(s);
  ------------------
  |  |   46|    826|#define FLB_SDS_HEADER(s)  ((struct flb_sds *) (s - FLB_SDS_HEADER_SIZE))
  |  |  ------------------
  |  |  |  |   34|    826|#define FLB_SDS_HEADER_SIZE (sizeof(uint64_t) + sizeof(uint64_t))
  |  |  ------------------
  ------------------
  455|    826|    head->len += size;
  456|    826|    s[head->len] = '\0';
  457|       |
  458|    826|    return s;
  459|    826|}
flb_sds_destroy:
  462|  37.4k|{
  463|  37.4k|    struct flb_sds *head;
  464|       |
  465|  37.4k|    if (!s) {
  ------------------
  |  Branch (465:9): [True: 0, False: 37.4k]
  ------------------
  466|      0|        return;
  467|      0|    }
  468|       |
  469|  37.4k|    head = FLB_SDS_HEADER(s);
  ------------------
  |  |   46|  37.4k|#define FLB_SDS_HEADER(s)  ((struct flb_sds *) (s - FLB_SDS_HEADER_SIZE))
  |  |  ------------------
  |  |  |  |   34|  37.4k|#define FLB_SDS_HEADER_SIZE (sizeof(uint64_t) + sizeof(uint64_t))
  |  |  ------------------
  ------------------
  470|  37.4k|    flb_free(head);
  471|  37.4k|}
flb_sds.c:sds_alloc:
   36|  37.4k|{
   37|  37.4k|    void *buf;
   38|  37.4k|    flb_sds_t s;
   39|  37.4k|    struct flb_sds *head;
   40|       |
   41|  37.4k|    buf = flb_malloc(FLB_SDS_HEADER_SIZE + size + 1);
  ------------------
  |  |   34|  37.4k|#define FLB_SDS_HEADER_SIZE (sizeof(uint64_t) + sizeof(uint64_t))
  ------------------
   42|  37.4k|    if (!buf) {
  ------------------
  |  Branch (42:9): [True: 0, False: 37.4k]
  ------------------
   43|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|       |
   47|  37.4k|    head = buf;
   48|  37.4k|    head->len = 0;
   49|  37.4k|    head->alloc = size;
   50|       |
   51|  37.4k|    s = head->buf;
   52|  37.4k|    *s = '\0';
   53|       |
   54|  37.4k|    return s;
   55|  37.4k|}

flb_slist_create:
   28|  9.08k|{
   29|  9.08k|    mk_list_init(list);
   30|  9.08k|    return 0;
   31|  9.08k|}
flb_slist_add_n:
   35|  13.2k|{
   36|  13.2k|    struct flb_slist_entry *e;
   37|       |
   38|  13.2k|    e = flb_malloc(sizeof(struct flb_slist_entry));
   39|  13.2k|    if (!e) {
  ------------------
  |  Branch (39:9): [True: 0, False: 13.2k]
  ------------------
   40|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
   41|      0|        return -1;
   42|      0|    }
   43|       |
   44|  13.2k|    e->str = flb_sds_create_len(str, len);
   45|  13.2k|    if (!e->str) {
  ------------------
  |  Branch (45:9): [True: 0, False: 13.2k]
  ------------------
   46|      0|        flb_free(e);
   47|      0|        return -1;
   48|      0|    }
   49|       |
   50|  13.2k|    mk_list_add(&e->_head, head);
   51|  13.2k|    return 0;
   52|  13.2k|}
flb_slist_split_string:
  220|  9.08k|{
  221|  9.08k|    int i = 0;
  222|  9.08k|    int ret;
  223|  9.08k|    int count = 0;
  224|  9.08k|    int val_len;
  225|  9.08k|    int len;
  226|  9.08k|    int end;
  227|  9.08k|    char *p_init;
  228|  9.08k|    char *p_end;
  229|       |
  230|  9.08k|    if (!str) {
  ------------------
  |  Branch (230:9): [True: 0, False: 9.08k]
  ------------------
  231|      0|        return -1;
  232|      0|    }
  233|       |
  234|  9.08k|    len = strlen(str);
  235|  22.3k|    while (i < len) {
  ------------------
  |  Branch (235:12): [True: 13.2k, False: 9.08k]
  ------------------
  236|  13.2k|        end = mk_string_char_search(str + i, separator, len - i);
  237|  13.2k|        if (end < 0) {
  ------------------
  |  Branch (237:13): [True: 9.08k, False: 4.13k]
  ------------------
  238|  9.08k|            end = len - i;
  239|  9.08k|        }
  240|  4.13k|        else if ((end + i) == i) {
  ------------------
  |  Branch (240:18): [True: 0, False: 4.13k]
  ------------------
  241|      0|            i++;
  242|      0|            continue;
  243|      0|        }
  244|       |
  245|  13.2k|        p_init = (char *) str + i;
  246|  13.2k|        p_end = p_init + end - 1;
  247|       |
  248|       |        /* Skip empty spaces */
  249|  17.3k|        while (*p_init == ' ') {
  ------------------
  |  Branch (249:16): [True: 4.13k, False: 13.2k]
  ------------------
  250|  4.13k|            p_init++;
  251|  4.13k|        }
  252|       |
  253|  13.2k|        while (*p_end == ' ' && p_end >= p_init) {
  ------------------
  |  Branch (253:16): [True: 0, False: 13.2k]
  |  Branch (253:33): [True: 0, False: 0]
  ------------------
  254|      0|            p_end--;
  255|      0|        }
  256|       |
  257|  13.2k|        if (p_init > p_end) {
  ------------------
  |  Branch (257:13): [True: 0, False: 13.2k]
  ------------------
  258|      0|            goto next;
  259|      0|        }
  260|       |
  261|  13.2k|        if (p_init == p_end) {
  ------------------
  |  Branch (261:13): [True: 0, False: 13.2k]
  ------------------
  262|      0|            if (*p_init == ' ') {
  ------------------
  |  Branch (262:17): [True: 0, False: 0]
  ------------------
  263|      0|                goto next;
  264|      0|            }
  265|      0|            val_len = 1;
  266|      0|        }
  267|  13.2k|        else {
  268|  13.2k|            val_len = (p_end - p_init) + 1;
  269|  13.2k|        }
  270|       |
  271|  13.2k|        if (val_len == 0) {
  ------------------
  |  Branch (271:13): [True: 0, False: 13.2k]
  ------------------
  272|      0|            goto next;
  273|      0|        }
  274|       |
  275|  13.2k|        ret = flb_slist_add_n(list, p_init, val_len);
  276|  13.2k|        if (ret == -1) {
  ------------------
  |  Branch (276:13): [True: 0, False: 13.2k]
  ------------------
  277|      0|            return -1;
  278|      0|        }
  279|  13.2k|        count++;
  280|       |
  281|       |        /* Append remaining string as a new node ? */
  282|  13.2k|        if (count >= max_split && max_split > 0) {
  ------------------
  |  Branch (282:13): [True: 13.2k, False: 0]
  |  Branch (282:35): [True: 0, False: 13.2k]
  ------------------
  283|      0|            p_end = p_init + end;
  284|      0|            if (*p_end == separator) {
  ------------------
  |  Branch (284:17): [True: 0, False: 0]
  ------------------
  285|      0|                p_end++;
  286|      0|            }
  287|      0|            while (*p_end == ' ') {
  ------------------
  |  Branch (287:20): [True: 0, False: 0]
  ------------------
  288|      0|                p_end++;
  289|      0|            }
  290|       |
  291|      0|            if ((p_end - str) >= len) {
  ------------------
  |  Branch (291:17): [True: 0, False: 0]
  ------------------
  292|      0|                break;
  293|      0|            }
  294|       |
  295|      0|            ret = flb_slist_add(list, p_end);
  296|      0|            if (ret == -1) {
  ------------------
  |  Branch (296:17): [True: 0, False: 0]
  ------------------
  297|      0|                return -1;
  298|      0|            }
  299|      0|            count++;
  300|      0|            break;
  301|      0|        }
  302|       |
  303|  13.2k|    next:
  304|  13.2k|        i += end + 1;
  305|  13.2k|    }
  306|       |
  307|  9.08k|    return count;
  308|  9.08k|}
flb_slist_destroy:
  323|  9.08k|{
  324|  9.08k|    struct mk_list *tmp;
  325|  9.08k|    struct mk_list *head;
  326|  9.08k|    struct flb_slist_entry *e;
  327|       |
  328|  13.2k|    mk_list_foreach_safe(head, tmp, list) {
  ------------------
  |  |  207|  22.3k|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 13.2k, False: 9.08k]
  |  |  ------------------
  ------------------
  329|  13.2k|        e = mk_list_entry(head, struct flb_slist_entry, _head);
  ------------------
  |  |  214|  13.2k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  13.2k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  13.2k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  13.2k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  330|  13.2k|        flb_sds_destroy(e->str);
  331|  13.2k|        mk_list_del(&e->_head);
  332|  13.2k|        flb_free(e);
  333|  13.2k|    }
  334|  9.08k|}

flb_upstream_queue_init:
  158|    413|{
  159|    413|    mk_list_init(&uq->av_queue);
  160|    413|    mk_list_init(&uq->busy_queue);
  161|    413|    mk_list_init(&uq->destroy_queue);
  162|    413|}
flb_upstream_queue_get:
  165|    413|{
  166|    413|    struct mk_list *head;
  167|    413|    struct mk_list *list;
  168|    413|    struct flb_upstream *th_u;
  169|    413|    struct flb_upstream_queue *uq;
  170|       |
  171|       |    /*
  172|       |     * Get the upstream queue, this might be different if the upstream is running
  173|       |     * in single-thread or multi-thread mode.
  174|       |     */
  175|    413|    if (flb_stream_is_thread_safe(&u->base) == FLB_TRUE) {
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  |  Branch (175:9): [True: 0, False: 413]
  ------------------
  176|      0|        list = flb_upstream_list_get();
  177|      0|        if (!list) {
  ------------------
  |  Branch (177:13): [True: 0, False: 0]
  ------------------
  178|       |            /*
  179|       |             * Here is the issue: a plugin enabled in multiworker mode in the
  180|       |             * initialization callback might wanted to use an upstream
  181|       |             * connection, but the init callback does not run in threaded mode
  182|       |             * so we hit this problem.
  183|       |             *
  184|       |             * As a fallback mechanism: just cross our fingers and return the
  185|       |             * principal upstream queue.
  186|       |             */
  187|      0|            return (struct flb_upstream_queue *) &u->queue;
  188|      0|        }
  189|       |
  190|      0|        mk_list_foreach(head, list) {
  ------------------
  |  |  205|      0|#define mk_list_foreach(curr, head) for( curr = (head)->next; curr != (head); curr = curr->next )
  |  |  ------------------
  |  |  |  Branch (205:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  191|      0|            th_u = mk_list_entry(head, struct flb_upstream, base._head);
  ------------------
  |  |  214|      0|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|      0|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  192|      0|            if (th_u->parent_upstream == u) {
  ------------------
  |  Branch (192:17): [True: 0, False: 0]
  ------------------
  193|      0|                break;
  194|      0|            }
  195|      0|            th_u = NULL;
  196|      0|        }
  197|       |
  198|      0|        if (!th_u) {
  ------------------
  |  Branch (198:13): [True: 0, False: 0]
  ------------------
  199|      0|            return NULL;
  200|      0|        }
  201|      0|        uq = &th_u->queue;
  202|      0|    }
  203|    413|    else {
  204|    413|        uq = &u->queue;
  205|    413|    }
  206|       |
  207|    413|    return uq;
  208|    413|}
flb_upstream_create:
  231|    413|{
  232|    413|    int ret;
  233|    413|    char *proxy_protocol = NULL;
  234|    413|    char *proxy_host = NULL;
  235|    413|    char *proxy_port = NULL;
  236|    413|    char *proxy_username = NULL;
  237|    413|    char *proxy_password = NULL;
  238|    413|    struct flb_upstream *u;
  239|       |
  240|    413|    u = flb_calloc(1, sizeof(struct flb_upstream));
  241|    413|    if (!u) {
  ------------------
  |  Branch (241:9): [True: 0, False: 413]
  ------------------
  242|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  243|      0|        return NULL;
  244|      0|    }
  245|       |
  246|    413|    u->base.dynamically_allocated = FLB_TRUE;
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  247|       |
  248|    413|    flb_stream_setup(&u->base,
  249|    413|                     FLB_UPSTREAM,
  ------------------
  |  |   29|    413|#define FLB_UPSTREAM              2
  ------------------
  250|    413|                     FLB_TRANSPORT_TCP,
  ------------------
  |  |   32|    413|#define FLB_TRANSPORT_TCP         1
  ------------------
  251|    413|                     flags,
  252|    413|                     tls,
  253|    413|                     config,
  254|    413|                     NULL);
  255|       |
  256|       |    /* Set upstream to the http_proxy if it is specified. */
  257|    413|    if (flb_upstream_needs_proxy(host, config->http_proxy, config->no_proxy) == FLB_TRUE) {
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  |  Branch (257:9): [True: 0, False: 413]
  ------------------
  258|      0|        flb_debug("[upstream] config->http_proxy: %s", config->http_proxy);
  ------------------
  |  |  167|      0|    if (flb_log_check(FLB_LOG_DEBUG))                               \
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  |  |  |  Branch (167:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  168|      0|        flb_log_print(FLB_LOG_DEBUG, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   42|      0|#define FLB_LOG_DEBUG   4
  |  |  ------------------
  ------------------
  259|      0|        ret = flb_utils_proxy_url_split(config->http_proxy, &proxy_protocol,
  260|      0|                                        &proxy_username, &proxy_password,
  261|      0|                                        &proxy_host, &proxy_port);
  262|      0|        if (ret == -1) {
  ------------------
  |  Branch (262:13): [True: 0, False: 0]
  ------------------
  263|      0|            flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  264|      0|            flb_free(u);
  265|      0|            return NULL;
  266|      0|        }
  267|       |
  268|      0|        u->tcp_host = flb_strdup(proxy_host);
  269|      0|        u->tcp_port = atoi(proxy_port);
  270|      0|        u->proxied_host = flb_strdup(host);
  271|      0|        u->proxied_port = port;
  272|       |
  273|      0|        if (proxy_username && proxy_password) {
  ------------------
  |  Branch (273:13): [True: 0, False: 0]
  |  Branch (273:31): [True: 0, False: 0]
  ------------------
  274|      0|            u->proxy_username = flb_strdup(proxy_username);
  275|      0|            u->proxy_password = flb_strdup(proxy_password);
  276|      0|        }
  277|       |
  278|      0|        flb_free(proxy_protocol);
  279|      0|        flb_free(proxy_host);
  280|      0|        flb_free(proxy_port);
  281|      0|        flb_free(proxy_username);
  282|      0|        flb_free(proxy_password);
  283|      0|    }
  284|    413|    else {
  285|    413|        u->tcp_host = flb_strdup(host);
  286|    413|        u->tcp_port = port;
  287|    413|    }
  288|       |
  289|    413|    if (!u->tcp_host) {
  ------------------
  |  Branch (289:9): [True: 0, False: 413]
  ------------------
  290|      0|        flb_free(u);
  291|      0|        return NULL;
  292|      0|    }
  293|       |
  294|    413|    flb_stream_enable_flags(&u->base, FLB_IO_ASYNC);
  ------------------
  |  |   36|    413|#define FLB_IO_ASYNC       8  /* use async mode (depends on event loop) */
  ------------------
  295|       |
  296|       |    /* Initialize queues */
  297|    413|    flb_upstream_queue_init(&u->queue);
  298|       |
  299|    413|    mk_list_add(&u->base._head, &config->upstreams);
  300|       |
  301|    413|    return u;
  302|    413|}
flb_upstream_needs_proxy:
  309|    413|{
  310|    413|    int ret;
  311|    413|    struct mk_list no_proxy_list;
  312|    413|    struct mk_list *head;
  313|    413|    struct flb_slist_entry *e = NULL;
  314|       |
  315|       |    /* No HTTP_PROXY, should not set up proxy for the upstream `host`. */
  316|    413|    if (proxy == NULL) {
  ------------------
  |  Branch (316:9): [True: 413, False: 0]
  ------------------
  317|    413|        return FLB_FALSE;
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
  318|    413|    }
  319|       |
  320|       |    /* No NO_PROXY with HTTP_PROXY set, should set up proxy for the upstream `host`. */
  321|      0|    if (no_proxy == NULL) {
  ------------------
  |  Branch (321:9): [True: 0, False: 0]
  ------------------
  322|      0|        return FLB_TRUE;
  ------------------
  |  |   26|      0|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      0|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  323|      0|    }
  324|       |
  325|       |    /* NO_PROXY=`*`, it matches all hosts. */
  326|      0|    if (strcmp(no_proxy, "*") == 0) {
  ------------------
  |  Branch (326:9): [True: 0, False: 0]
  ------------------
  327|      0|        return FLB_FALSE;
  ------------------
  |  |   25|      0|#define FLB_FALSE  0
  ------------------
  328|      0|    }
  329|       |
  330|       |    /* check the URL list in the NO_PROXY  */
  331|      0|    ret = flb_slist_create(&no_proxy_list);
  332|      0|    if (ret != 0) {
  ------------------
  |  Branch (332:9): [True: 0, False: 0]
  ------------------
  333|      0|        return FLB_TRUE;
  ------------------
  |  |   26|      0|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      0|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  334|      0|    }
  335|      0|    ret = flb_slist_split_string(&no_proxy_list, no_proxy, ',', -1);
  336|      0|    if (ret <= 0) {
  ------------------
  |  Branch (336:9): [True: 0, False: 0]
  ------------------
  337|      0|        return FLB_TRUE;
  ------------------
  |  |   26|      0|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      0|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  338|      0|    }
  339|      0|    ret = FLB_TRUE;
  ------------------
  |  |   26|      0|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|      0|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  340|      0|    mk_list_foreach(head, &no_proxy_list) {
  ------------------
  |  |  205|      0|#define mk_list_foreach(curr, head) for( curr = (head)->next; curr != (head); curr = curr->next )
  |  |  ------------------
  |  |  |  Branch (205:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  341|      0|        e = mk_list_entry(head, struct flb_slist_entry, _head);
  ------------------
  |  |  214|      0|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|      0|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  342|      0|         if (strcmp(host, e->str) == 0) {
  ------------------
  |  Branch (342:14): [True: 0, False: 0]
  ------------------
  343|      0|            ret = FLB_FALSE;
  ------------------
  |  |   25|      0|#define FLB_FALSE  0
  ------------------
  344|      0|            break;
  345|      0|        }
  346|      0|    }
  347|       |
  348|       |    /* clean up the resources. */
  349|      0|    flb_slist_destroy(&no_proxy_list);
  350|       |
  351|      0|    return ret;
  352|      0|}
flb_upstream_destroy:
  560|    413|{
  561|    413|    struct mk_list *tmp;
  562|    413|    struct mk_list *head;
  563|    413|    struct flb_connection *u_conn;
  564|    413|    struct flb_upstream_queue *uq;
  565|       |
  566|    413|    uq = flb_upstream_queue_get(u);
  567|    413|    if (!uq) {
  ------------------
  |  Branch (567:9): [True: 0, False: 413]
  ------------------
  568|      0|        uq = &u->queue;
  569|      0|    }
  570|       |
  571|    413|    mk_list_foreach_safe(head, tmp, &uq->av_queue) {
  ------------------
  |  |  207|    413|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 0, False: 413]
  |  |  ------------------
  ------------------
  572|      0|        u_conn = mk_list_entry(head, struct flb_connection, _head);
  ------------------
  |  |  214|      0|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|      0|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  573|      0|        prepare_destroy_conn(u_conn);
  574|      0|    }
  575|       |
  576|    413|    mk_list_foreach_safe(head, tmp, &uq->busy_queue) {
  ------------------
  |  |  207|    413|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 0, False: 413]
  |  |  ------------------
  ------------------
  577|      0|        u_conn = mk_list_entry(head, struct flb_connection, _head);
  ------------------
  |  |  214|      0|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|      0|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  578|      0|        prepare_destroy_conn(u_conn);
  579|      0|    }
  580|       |
  581|    413|    mk_list_foreach_safe(head, tmp, &uq->destroy_queue) {
  ------------------
  |  |  207|    413|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 0, False: 413]
  |  |  ------------------
  ------------------
  582|      0|        u_conn = mk_list_entry(head, struct flb_connection, _head);
  ------------------
  |  |  214|      0|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|      0|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  583|      0|        destroy_conn(u_conn);
  584|      0|    }
  585|       |
  586|    413|    flb_free(u->tcp_host);
  587|    413|    flb_free(u->proxied_host);
  588|    413|    flb_free(u->proxy_username);
  589|    413|    flb_free(u->proxy_password);
  590|    413|    mk_list_del(&u->base._head);
  591|    413|    flb_free(u);
  592|       |
  593|    413|    return 0;
  594|    413|}

flb_worker_init:
  112|    413|{
  113|    413|    FLB_TLS_INIT(flb_worker_ctx);
  ------------------
  |  |   35|    413|#define FLB_TLS_INIT(key)          do {} while (0)
  |  |  ------------------
  |  |  |  Branch (35:49): [Folded - Ignored]
  |  |  ------------------
  ------------------
  114|       |
  115|    413|    return 0;
  116|    413|}
flb_worker_get:
  135|  1.93k|{
  136|  1.93k|    return FLB_TLS_GET(flb_worker_ctx);
  ------------------
  |  |   34|  1.93k|#define FLB_TLS_GET(key)           key
  ------------------
  137|  1.93k|}
flb_worker_exit:
  154|    413|{
  155|    413|    int c = 0;
  156|    413|    struct mk_list *tmp;
  157|    413|    struct mk_list *head;
  158|    413|    struct flb_worker *worker;
  159|       |
  160|    413|    mk_list_foreach_safe(head, tmp, &config->workers) {
  ------------------
  |  |  207|    413|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 0, False: 413]
  |  |  ------------------
  ------------------
  161|      0|        worker = mk_list_entry(head, struct flb_worker, _head);
  ------------------
  |  |  214|      0|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|      0|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|      0|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|      0|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  162|      0|        flb_worker_destroy(worker);
  163|      0|        c++;
  164|      0|    }
  165|       |
  166|    413|    return c;
  167|    413|}

flb_ml_init:
 1155|    413|{
 1156|    413|    int ret;
 1157|       |
 1158|    413|    ret = flb_ml_parser_builtin_create(config);
 1159|    413|    if (ret == -1) {
  ------------------
  |  Branch (1159:9): [True: 0, False: 413]
  ------------------
 1160|      0|        return -1;
 1161|      0|    }
 1162|       |
 1163|    413|    return 0;
 1164|    413|}
flb_ml_exit:
 1167|    413|{
 1168|    413|    flb_ml_parser_destroy_all(&config->multiline_parsers);
 1169|    413|    return 0;
 1170|    413|}

flb_ml_parser_init:
   28|  1.65k|{
   29|  1.65k|    int ret;
   30|       |
   31|  1.65k|    ret = flb_ml_rule_init(ml_parser);
   32|  1.65k|    if (ret == -1) {
  ------------------
  |  Branch (32:9): [True: 0, False: 1.65k]
  ------------------
   33|      0|        return -1;
   34|      0|    }
   35|       |
   36|  1.65k|    return 0;
   37|  1.65k|}
flb_ml_parser_builtin_create:
   41|    413|{
   42|    413|    struct flb_ml_parser *mlp;
   43|       |
   44|       |    /* Docker */
   45|    413|    mlp = flb_ml_parser_docker(config);
   46|    413|    if (!mlp) {
  ------------------
  |  Branch (46:9): [True: 0, False: 413]
  ------------------
   47|      0|        flb_error("[multiline] could not init 'docker' built-in parser");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   48|      0|        return -1;
   49|      0|    }
   50|       |
   51|       |    /* CRI */
   52|    413|    mlp = flb_ml_parser_cri(config);
   53|    413|    if (!mlp) {
  ------------------
  |  Branch (53:9): [True: 0, False: 413]
  ------------------
   54|      0|        flb_error("[multiline] could not init 'cri' built-in parser");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   55|      0|        return -1;
   56|      0|    }
   57|       |
   58|       |    /* Java */
   59|    413|    mlp = flb_ml_parser_java(config, NULL);
   60|    413|    if (!mlp) {
  ------------------
  |  Branch (60:9): [True: 0, False: 413]
  ------------------
   61|      0|        flb_error("[multiline] could not init 'java' built-in parser");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   62|      0|        return -1;
   63|      0|    }
   64|       |
   65|       |    /* Go */
   66|    413|    mlp = flb_ml_parser_go(config, NULL);
   67|    413|    if (!mlp) {
  ------------------
  |  Branch (67:9): [True: 0, False: 413]
  ------------------
   68|      0|        flb_error("[multiline] could not init 'go' built-in parser");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   69|      0|        return -1;
   70|      0|    }
   71|       |
   72|       |    /* Ruby */
   73|    413|    mlp = flb_ml_parser_ruby(config, NULL);
   74|    413|    if (!mlp) {
  ------------------
  |  Branch (74:9): [True: 0, False: 413]
  ------------------
   75|      0|        flb_error("[multiline] could not init 'ruby' built-in parser");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   76|      0|        return -1;
   77|      0|    }
   78|       |
   79|       |    /* Python */
   80|    413|    mlp = flb_ml_parser_python(config, NULL);
   81|    413|    if (!mlp) {
  ------------------
  |  Branch (81:9): [True: 0, False: 413]
  ------------------
   82|      0|        flb_error("[multiline] could not init 'python' built-in parser");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   83|      0|        return -1;
   84|      0|    }
   85|       |
   86|    413|    return 0;
   87|    413|}
flb_ml_parser_create:
   98|  2.47k|{
   99|  2.47k|    struct flb_ml_parser *ml_parser;
  100|       |
  101|  2.47k|    ml_parser = flb_calloc(1, sizeof(struct flb_ml_parser));
  102|  2.47k|    if (!ml_parser) {
  ------------------
  |  Branch (102:9): [True: 0, False: 2.47k]
  ------------------
  103|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  104|      0|        return NULL;
  105|      0|    }
  106|  2.47k|    ml_parser->name = flb_sds_create(name);
  107|  2.47k|    ml_parser->type = type;
  108|       |
  109|  2.47k|    if (match_str) {
  ------------------
  |  Branch (109:9): [True: 826, False: 1.65k]
  ------------------
  110|    826|        ml_parser->match_str = flb_sds_create(match_str);
  111|    826|        if (!ml_parser->match_str) {
  ------------------
  |  Branch (111:13): [True: 0, False: 826]
  ------------------
  112|      0|            if (ml_parser->name) {
  ------------------
  |  Branch (112:17): [True: 0, False: 0]
  ------------------
  113|      0|                flb_sds_destroy(ml_parser->name);
  114|      0|            }
  115|      0|            flb_free(ml_parser);
  116|      0|            return NULL;
  117|      0|        }
  118|    826|    }
  119|       |
  120|  2.47k|    ml_parser->parser = parser_ctx;
  121|       |
  122|  2.47k|    if (parser_name) {
  ------------------
  |  Branch (122:9): [True: 0, False: 2.47k]
  ------------------
  123|      0|        ml_parser->parser_name = flb_sds_create(parser_name);
  124|      0|    }
  125|  2.47k|    ml_parser->negate = negate;
  126|  2.47k|    ml_parser->flush_ms = flush_ms;
  127|  2.47k|    mk_list_init(&ml_parser->regex_rules);
  128|  2.47k|    mk_list_add(&ml_parser->_head, &ctx->multiline_parsers);
  129|       |
  130|  2.47k|    if (key_content) {
  ------------------
  |  Branch (130:9): [True: 826, False: 1.65k]
  ------------------
  131|    826|        ml_parser->key_content = flb_sds_create(key_content);
  132|    826|        if (!ml_parser->key_content) {
  ------------------
  |  Branch (132:13): [True: 0, False: 826]
  ------------------
  133|      0|            flb_ml_parser_destroy(ml_parser);
  134|      0|            return NULL;
  135|      0|        }
  136|    826|    }
  137|       |
  138|  2.47k|    if (key_group) {
  ------------------
  |  Branch (138:9): [True: 826, False: 1.65k]
  ------------------
  139|    826|        ml_parser->key_group = flb_sds_create(key_group);
  140|    826|        if (!ml_parser->key_group) {
  ------------------
  |  Branch (140:13): [True: 0, False: 826]
  ------------------
  141|      0|            flb_ml_parser_destroy(ml_parser);
  142|      0|            return NULL;
  143|      0|        }
  144|    826|    }
  145|       |
  146|  2.47k|    if (key_pattern) {
  ------------------
  |  Branch (146:9): [True: 413, False: 2.06k]
  ------------------
  147|    413|        ml_parser->key_pattern = flb_sds_create(key_pattern);
  148|    413|        if (!ml_parser->key_pattern) {
  ------------------
  |  Branch (148:13): [True: 0, False: 413]
  ------------------
  149|      0|            flb_ml_parser_destroy(ml_parser);
  150|      0|            return NULL;
  151|      0|        }
  152|    413|    }
  153|       |
  154|  2.47k|    return ml_parser;
  155|  2.47k|}
flb_ml_parser_destroy:
  274|  2.47k|{
  275|  2.47k|    if (!ml_parser) {
  ------------------
  |  Branch (275:9): [True: 0, False: 2.47k]
  ------------------
  276|      0|        return 0;
  277|      0|    }
  278|       |
  279|  2.47k|    if (ml_parser->name) {
  ------------------
  |  Branch (279:9): [True: 2.47k, False: 0]
  ------------------
  280|  2.47k|        flb_sds_destroy(ml_parser->name);
  281|  2.47k|    }
  282|       |
  283|  2.47k|    if (ml_parser->parser_name) {
  ------------------
  |  Branch (283:9): [True: 0, False: 2.47k]
  ------------------
  284|      0|        flb_sds_destroy(ml_parser->parser_name);
  285|      0|    }
  286|       |
  287|  2.47k|    if (ml_parser->match_str) {
  ------------------
  |  Branch (287:9): [True: 826, False: 1.65k]
  ------------------
  288|    826|        flb_sds_destroy(ml_parser->match_str);
  289|    826|    }
  290|  2.47k|    if (ml_parser->key_content) {
  ------------------
  |  Branch (290:9): [True: 826, False: 1.65k]
  ------------------
  291|    826|        flb_sds_destroy(ml_parser->key_content);
  292|    826|    }
  293|  2.47k|    if (ml_parser->key_group) {
  ------------------
  |  Branch (293:9): [True: 826, False: 1.65k]
  ------------------
  294|    826|        flb_sds_destroy(ml_parser->key_group);
  295|    826|    }
  296|  2.47k|    if (ml_parser->key_pattern) {
  ------------------
  |  Branch (296:9): [True: 413, False: 2.06k]
  ------------------
  297|    413|        flb_sds_destroy(ml_parser->key_pattern);
  298|    413|    }
  299|       |
  300|       |    /* Regex rules */
  301|  2.47k|    flb_ml_rule_destroy_all(ml_parser);
  302|       |
  303|       |    /* Unlink from struct flb_config->multiline_parsers */
  304|  2.47k|    mk_list_del(&ml_parser->_head);
  305|       |
  306|  2.47k|    flb_free(ml_parser);
  307|  2.47k|    return 0;
  308|  2.47k|}
flb_ml_parser_destroy_all:
  338|    413|{
  339|    413|    struct mk_list *tmp;
  340|    413|    struct mk_list *head;
  341|    413|    struct flb_ml_parser *parser;
  342|       |
  343|  2.47k|    mk_list_foreach_safe(head, tmp, list) {
  ------------------
  |  |  207|  2.89k|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 2.47k, False: 413]
  |  |  ------------------
  ------------------
  344|  2.47k|        parser = mk_list_entry(head, struct flb_ml_parser, _head);
  ------------------
  |  |  214|  2.47k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  2.47k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  2.47k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  2.47k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  345|  2.47k|        flb_ml_parser_destroy(parser);
  346|  2.47k|    }
  347|    413|}

flb_ml_parser_cri:
   53|    413|{
   54|    413|    struct flb_parser *parser;
   55|    413|    struct flb_ml_parser *mlp;
   56|       |
   57|       |    /* Create a Docker parser */
   58|    413|    parser = cri_parser_create(config);
   59|    413|    if (!parser) {
  ------------------
  |  Branch (59:9): [True: 0, False: 413]
  ------------------
   60|      0|        return NULL;
   61|      0|    }
   62|       |
   63|    413|    mlp = flb_ml_parser_create(config,
   64|    413|                               "cri",                /* name      */
   65|    413|                               FLB_ML_EQ,            /* type      */
  ------------------
  |  |   35|    413|#define FLB_ML_EQ        3    /* record key/content equaks 'abc'    */
  ------------------
   66|    413|                               "F",                  /* match_str */
   67|    413|                               FLB_FALSE,            /* negate    */
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
   68|    413|                               FLB_ML_FLUSH_TIMEOUT, /* flush_ms  */
  ------------------
  |  |   47|    413|#define FLB_ML_FLUSH_TIMEOUT    4000 /* Flush timeout default (milliseconds) */
  ------------------
   69|    413|                               "log",                /* key_content */
   70|    413|                               "stream",             /* key_group   */
   71|    413|                               "_p",                 /* key_pattern */
   72|    413|                               parser,               /* parser ctx  */
   73|    413|                               NULL);                /* parser name */
   74|       |
   75|    413|    if (!mlp) {
  ------------------
  |  Branch (75:9): [True: 0, False: 413]
  ------------------
   76|      0|        flb_error("[multiline] could not create 'cri mode'");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   77|      0|        return NULL;
   78|      0|    }
   79|       |
   80|    413|    return mlp;
   81|    413|}
flb_ml_parser_cri.c:cri_parser_create:
   31|    413|{
   32|    413|    struct flb_parser *p;
   33|       |
   34|    413|    p = flb_parser_create("_ml_cri",               /* parser name */
   35|    413|                          "regex",                 /* backend type */
   36|    413|                          FLB_ML_CRI_REGEX,        /* regex */
  ------------------
  |  |   25|    413|  "^(?<time>.+?) (?<stream>stdout|stderr) (?<_p>F|P) (?<log>.*)$"
  ------------------
   37|    413|                          FLB_FALSE,               /* skip_empty */
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
   38|    413|                          FLB_ML_CRI_TIME,         /* time format */
  ------------------
  |  |   27|    413|  "%Y-%m-%dT%H:%M:%S.%L%z"
  ------------------
   39|    413|                          "time",                  /* time key */
   40|    413|                          NULL,                    /* time offset */
   41|    413|                          FLB_TRUE,                /* time keep */
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
   42|    413|                          FLB_FALSE,               /* time strict */
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
   43|    413|                          FLB_FALSE,               /* no bare keys */
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
   44|    413|                          NULL,                    /* parser types */
   45|    413|                          0,                       /* types len */
   46|    413|                          NULL,                    /* decoders */
   47|    413|                          config);                 /* Fluent Bit context */
   48|    413|    return p;
   49|    413|}

flb_ml_parser_docker:
   48|    413|{
   49|    413|    struct flb_parser *parser;
   50|    413|    struct flb_ml_parser *mlp;
   51|       |
   52|       |    /* Create a Docker parser */
   53|    413|    parser = docker_parser_create(config);
   54|    413|    if (!parser) {
  ------------------
  |  Branch (54:9): [True: 0, False: 413]
  ------------------
   55|      0|        return NULL;
   56|      0|    }
   57|       |
   58|       |    /*
   59|       |     * Let's explain this multiline mode, then you (the reader) might want
   60|       |     * to submit a PR with new built-in modes :)
   61|       |     *
   62|       |     * Containerized apps under Docker writes logs to stdout/stderr. These streams
   63|       |     * (stdout/stderr) are handled by Docker, in most of cases the content is
   64|       |     * stored in a .json file in your file system. A message like "hey!" gets into
   65|       |     * a JSON map like this:
   66|       |     *
   67|       |     * {"log": "hey!\n", "stream": "stdout", "time": "2021-02-01T01:40:03.53412Z"}
   68|       |     *
   69|       |     * By Docker log spec, any 'log' key that "ends with a \n" it's a complete
   70|       |     * log record, but Docker also limits the log record size to 16KB, so a long
   71|       |     * message that does not fit into 16KB can be split in multiple JSON lines,
   72|       |     * the following example use short words to describe the context:
   73|       |     *
   74|       |     * - original message: 'one, two, three\n'
   75|       |     *
   76|       |     * Docker log interpretation:
   77|       |     *
   78|       |     * - {"log": "one, ", "stream": "stdout", "time": "2021-02-01T01:40:03.53413Z"}
   79|       |     * - {"log": "two, ", "stream": "stdout", "time": "2021-02-01T01:40:03.53414Z"}
   80|       |     * - {"log": "three\n", "stream": "stdout", "time": "2021-02-01T01:40:03.53415Z"}
   81|       |     *
   82|       |     * So every 'log' key that does not ends with '\n', it's a partial log record
   83|       |     * and for logging purposes it needs to be concatenated with further messages
   84|       |     * until a final '\n' is found.
   85|       |     *
   86|       |     * We setup the Multiline mode as follows:
   87|       |     *
   88|       |     * - Use the type 'FLB_ML_ENDSWITH' to specify that we expect the 'log'
   89|       |     *   key must ends with a '\n' for complete messages, otherwise it means is
   90|       |     *   a continuation message. In case a message is not complete just wait until
   91|       |     *   500 milliseconds (0.5 second) and flush the buffer.
   92|       |     */
   93|    413|    mlp = flb_ml_parser_create(config,                  /* Fluent Bit context */
   94|    413|                               "docker",                /* name           */
   95|    413|                               FLB_ML_ENDSWITH,         /* type           */
  ------------------
  |  |   34|    413|#define FLB_ML_ENDSWITH  2    /* record key/content ends with 'abc' */
  ------------------
   96|    413|                               "\n",                    /* match_str      */
   97|    413|                               FLB_FALSE,               /* negate         */
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
   98|    413|                               FLB_ML_FLUSH_TIMEOUT,    /* flush_ms  */
  ------------------
  |  |   47|    413|#define FLB_ML_FLUSH_TIMEOUT    4000 /* Flush timeout default (milliseconds) */
  ------------------
   99|    413|                               "log",                   /* key_content    */
  100|    413|                               "stream",                /* key_group      */
  101|    413|                               NULL,                    /* key_pattern    */
  102|    413|                               parser,                  /* parser ctx     */
  103|    413|                               NULL);                   /* parser name    */
  104|    413|    if (!mlp) {
  ------------------
  |  Branch (104:9): [True: 0, False: 413]
  ------------------
  105|      0|        flb_error("[multiline] could not create 'docker mode'");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  106|      0|        return NULL;
  107|      0|    }
  108|       |
  109|    413|    return mlp;
  110|    413|}
flb_ml_parser_docker.c:docker_parser_create:
   26|    413|{
   27|    413|    struct flb_parser *p;
   28|       |
   29|    413|    p = flb_parser_create("_ml_json_docker",      /* parser name */
   30|    413|                          "json",                 /* backend type */
   31|    413|                          NULL,                   /* regex */
   32|    413|                          FLB_TRUE,               /* skip_empty */
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
   33|    413|                          "%Y-%m-%dT%H:%M:%S.%L", /* time format */
   34|    413|                          "time",                 /* time key */
   35|    413|                          NULL,                   /* time offset */
   36|    413|                          FLB_TRUE,               /* time keep */
  ------------------
  |  |   26|    413|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|    413|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
   37|    413|                          FLB_FALSE,              /* time strict */
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
   38|    413|                          FLB_FALSE,              /* no bare keys */
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
   39|    413|                          NULL,                   /* parser types */
   40|    413|                          0,                      /* types len */
   41|    413|                          NULL,                   /* decoders */
   42|    413|                          config);                /* Fluent Bit context */
   43|    413|    return p;
   44|    413|}

flb_ml_parser_go:
   38|    413|{
   39|    413|    int ret;
   40|    413|    struct flb_ml_parser *mlp;
   41|       |
   42|    413|    mlp = flb_ml_parser_create(config,               /* Fluent Bit context */
   43|    413|                               "go",                 /* name      */
   44|    413|                               FLB_ML_REGEX,         /* type      */
  ------------------
  |  |   33|    413|#define FLB_ML_REGEX     1    /* pattern is a regular expression    */
  ------------------
   45|    413|                               NULL,                 /* match_str */
   46|    413|                               FLB_FALSE,            /* negate    */
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
   47|    413|                               FLB_ML_FLUSH_TIMEOUT, /* flush_ms  */
  ------------------
  |  |   47|    413|#define FLB_ML_FLUSH_TIMEOUT    4000 /* Flush timeout default (milliseconds) */
  ------------------
   48|    413|                               key,                  /* key_content */
   49|    413|                               NULL,                 /* key_group   */
   50|    413|                               NULL,                 /* key_pattern */
   51|    413|                               NULL,                 /* parser ctx  */
   52|    413|                               NULL);                /* parser name */
   53|       |
   54|    413|    if (!mlp) {
  ------------------
  |  Branch (54:9): [True: 0, False: 413]
  ------------------
   55|      0|        flb_error("[multiline] could not create 'go mode'");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   56|      0|        return NULL;
   57|      0|    }
   58|       |
   59|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   60|    413|               "start_state",
   61|    413|               "/\\bpanic: /",
   62|    413|               "go_after_panic", NULL);
   63|    413|    if (ret != 0) {
  ------------------
  |  Branch (63:9): [True: 0, False: 413]
  ------------------
   64|      0|        rule_error(mlp);
   65|      0|        return NULL;
   66|      0|    }
   67|       |
   68|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   69|    413|               "start_state",
   70|    413|               "/http: panic serving/",
   71|    413|               "go_goroutine", NULL);
   72|    413|    if (ret != 0) {
  ------------------
  |  Branch (72:9): [True: 0, False: 413]
  ------------------
   73|      0|        rule_error(mlp);
   74|      0|        return NULL;
   75|      0|    }
   76|       |
   77|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   78|    413|               "go_after_panic",
   79|    413|               "/^$/",
   80|    413|               "go_goroutine", NULL);
   81|    413|    if (ret != 0) {
  ------------------
  |  Branch (81:9): [True: 0, False: 413]
  ------------------
   82|      0|        rule_error(mlp);
   83|      0|        return NULL;
   84|      0|    }
   85|       |
   86|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   87|    413|               "go_after_panic, go_after_signal, go_frame_1",
   88|    413|               "/^$/",
   89|    413|               "go_goroutine", NULL);
   90|    413|    if (ret != 0) {
  ------------------
  |  Branch (90:9): [True: 0, False: 413]
  ------------------
   91|      0|        rule_error(mlp);
   92|      0|        return NULL;
   93|      0|    }
   94|       |
   95|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   96|    413|               "go_after_panic",
   97|    413|               "/^\\[signal /",
   98|    413|               "go_after_signal", NULL);
   99|    413|    if (ret != 0) {
  ------------------
  |  Branch (99:9): [True: 0, False: 413]
  ------------------
  100|      0|        rule_error(mlp);
  101|      0|        return NULL;
  102|      0|    }
  103|       |
  104|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
  105|    413|               "go_goroutine",
  106|    413|               "/^goroutine \\d+ \\[[^\\]]+\\]:$/",
  107|    413|               "go_frame_1", NULL);
  108|    413|    if (ret != 0) {
  ------------------
  |  Branch (108:9): [True: 0, False: 413]
  ------------------
  109|      0|        rule_error(mlp);
  110|      0|        return NULL;
  111|      0|    }
  112|       |
  113|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
  114|    413|               "go_frame_1",
  115|    413|               "/^(?:[^\\s.:]+\\.)*[^\\s.():]+\\(|^created by /",
  116|    413|               "go_frame_2", NULL);
  117|    413|    if (ret != 0) {
  ------------------
  |  Branch (117:9): [True: 0, False: 413]
  ------------------
  118|      0|        rule_error(mlp);
  119|      0|        return NULL;
  120|      0|    }
  121|       |
  122|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
  123|    413|               "go_frame_2",
  124|    413|               "/^\\s/",
  125|    413|               "go_frame_1", NULL);
  126|    413|    if (ret != 0) {
  ------------------
  |  Branch (126:9): [True: 0, False: 413]
  ------------------
  127|      0|        rule_error(mlp);
  128|      0|        return NULL;
  129|      0|    }
  130|       |
  131|       |    /* Map the rules (mandatory for regex rules) */
  132|    413|    ret = flb_ml_parser_init(mlp);
  133|    413|    if (ret != 0) {
  ------------------
  |  Branch (133:9): [True: 0, False: 413]
  ------------------
  134|      0|        flb_error("[multiline: go] error on mapping rules");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  135|      0|        flb_ml_parser_destroy(mlp);
  136|      0|        return NULL;
  137|      0|    }
  138|       |
  139|    413|    return mlp;
  140|    413|}

flb_ml_parser_java:
   38|    413|{
   39|    413|    int ret;
   40|    413|    struct flb_ml_parser *mlp;
   41|       |
   42|    413|    mlp = flb_ml_parser_create(config,               /* Fluent Bit context */
   43|    413|                               "java",               /* name      */
   44|    413|                               FLB_ML_REGEX,         /* type      */
  ------------------
  |  |   33|    413|#define FLB_ML_REGEX     1    /* pattern is a regular expression    */
  ------------------
   45|    413|                               NULL,                 /* match_str */
   46|    413|                               FLB_FALSE,            /* negate    */
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
   47|    413|                               FLB_ML_FLUSH_TIMEOUT, /* flush_ms  */
  ------------------
  |  |   47|    413|#define FLB_ML_FLUSH_TIMEOUT    4000 /* Flush timeout default (milliseconds) */
  ------------------
   48|    413|                               key,                  /* key_content */
   49|    413|                               NULL,                 /* key_group   */
   50|    413|                               NULL,                 /* key_pattern */
   51|    413|                               NULL,                 /* parser ctx  */
   52|    413|                               NULL);                /* parser name */
   53|       |
   54|    413|    if (!mlp) {
  ------------------
  |  Branch (54:9): [True: 0, False: 413]
  ------------------
   55|      0|        flb_error("[multiline] could not create 'java mode'");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   56|      0|        return NULL;
   57|      0|    }
   58|       |
   59|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   60|    413|               "start_state, java_start_exception",
   61|    413|               "/(.)(?:Exception|Error|Throwable|V8 errors stack trace)[:\\r\\n]/",
   62|    413|               "java_after_exception", NULL);
   63|    413|    if (ret != 0) {
  ------------------
  |  Branch (63:9): [True: 0, False: 413]
  ------------------
   64|      0|        rule_error(mlp);
   65|      0|        return NULL;
   66|      0|    }
   67|       |
   68|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   69|    413|               "java_after_exception",
   70|    413|               "/^[\\t ]*nested exception is:[\\t ]*/",
   71|    413|               "java_start_exception", NULL);
   72|    413|    if (ret != 0) {
  ------------------
  |  Branch (72:9): [True: 0, False: 413]
  ------------------
   73|      0|        rule_error(mlp);
   74|      0|        return NULL;
   75|      0|    }
   76|       |
   77|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   78|    413|               "java_after_exception",
   79|    413|               "/^[\\r\\n]*$/",
   80|    413|               "java_after_exception", NULL);
   81|    413|    if (ret != 0) {
  ------------------
  |  Branch (81:9): [True: 0, False: 413]
  ------------------
   82|      0|        rule_error(mlp);
   83|      0|        return NULL;
   84|      0|    }
   85|       |
   86|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   87|    413|               "java_after_exception, java",
   88|    413|               "/^[\\t ]+(?:eval )?at /",
   89|    413|               "java", NULL);
   90|    413|    if (ret != 0) {
  ------------------
  |  Branch (90:9): [True: 0, False: 413]
  ------------------
   91|      0|        rule_error(mlp);
   92|      0|        return NULL;
   93|      0|    }
   94|       |
   95|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   96|    413|               "java_after_exception, java",
   97|       |               /* C# nested exception */
   98|    413|               "/^[\\t ]+--- End of inner exception stack trace ---$/",
   99|    413|               "java", NULL);
  100|    413|    if (ret != 0) {
  ------------------
  |  Branch (100:9): [True: 0, False: 413]
  ------------------
  101|      0|        rule_error(mlp);
  102|      0|        return NULL;
  103|      0|    }
  104|       |
  105|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
  106|    413|               "java_after_exception, java",
  107|       |               /* C# exception from async code */
  108|    413|               "/^--- End of stack trace from previous (?x:"
  109|    413|               ")location where exception was thrown ---$/",
  110|    413|               "java", NULL);
  111|    413|    if (ret != 0) {
  ------------------
  |  Branch (111:9): [True: 0, False: 413]
  ------------------
  112|      0|        rule_error(mlp);
  113|      0|        return NULL;
  114|      0|    }
  115|       |
  116|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
  117|    413|               "java_after_exception, java",
  118|    413|               "/^[\\t ]*(?:Caused by|Suppressed):/",
  119|    413|               "java_after_exception", NULL);
  120|    413|    if (ret != 0) {
  ------------------
  |  Branch (120:9): [True: 0, False: 413]
  ------------------
  121|      0|        rule_error(mlp);
  122|      0|        return NULL;
  123|      0|    }
  124|       |
  125|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
  126|    413|               "java_after_exception, java",
  127|    413|               "/^[\\t ]*... \\d+ (?:more|common frames omitted)/",
  128|    413|               "java", NULL);
  129|    413|    if (ret != 0) {
  ------------------
  |  Branch (129:9): [True: 0, False: 413]
  ------------------
  130|      0|        rule_error(mlp);
  131|      0|        return NULL;
  132|      0|    }
  133|       |
  134|       |    /* Map the rules (mandatory for regex rules) */
  135|    413|    ret = flb_ml_parser_init(mlp);
  136|    413|    if (ret != 0) {
  ------------------
  |  Branch (136:9): [True: 0, False: 413]
  ------------------
  137|      0|        flb_error("[multiline: java] error on mapping rules");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  138|      0|        flb_ml_parser_destroy(mlp);
  139|      0|        return NULL;
  140|      0|    }
  141|       |
  142|    413|    return mlp;
  143|    413|}

flb_ml_parser_python:
   38|    413|{
   39|    413|    int ret;
   40|    413|    struct flb_ml_parser *mlp;
   41|       |
   42|    413|    mlp = flb_ml_parser_create(config,               /* Fluent Bit context */
   43|    413|                               "python",             /* name      */
   44|    413|                               FLB_ML_REGEX,         /* type      */
  ------------------
  |  |   33|    413|#define FLB_ML_REGEX     1    /* pattern is a regular expression    */
  ------------------
   45|    413|                               NULL,                 /* match_str */
   46|    413|                               FLB_FALSE,            /* negate    */
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
   47|    413|                               FLB_ML_FLUSH_TIMEOUT, /* flush_ms  */
  ------------------
  |  |   47|    413|#define FLB_ML_FLUSH_TIMEOUT    4000 /* Flush timeout default (milliseconds) */
  ------------------
   48|    413|                               key,                  /* key_content */
   49|    413|                               NULL,                 /* key_group   */
   50|    413|                               NULL,                 /* key_pattern */
   51|    413|                               NULL,                 /* parser ctx  */
   52|    413|                               NULL);                /* parser name */
   53|       |
   54|    413|    if (!mlp) {
  ------------------
  |  Branch (54:9): [True: 0, False: 413]
  ------------------
   55|      0|        flb_error("[multiline] could not create 'python mode'");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   56|      0|        return NULL;
   57|      0|    }
   58|       |
   59|       |    /* rule(:start_state, /^Traceback \(most recent call last\):$/, :python) */
   60|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   61|    413|               "start_state", "/^Traceback \\(most recent call last\\):$/",
   62|    413|               "python", NULL);
   63|    413|    if (ret != 0) {
  ------------------
  |  Branch (63:9): [True: 0, False: 413]
  ------------------
   64|      0|        rule_error(mlp);
   65|      0|        return NULL;
   66|      0|    }
   67|       |
   68|       |    /* rule(:python, /^[\t ]+File /, :python_code) */
   69|    413|    ret = rule(mlp, "python", "/^[\\t ]+File /", "python_code", NULL);
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   70|    413|    if (ret != 0) {
  ------------------
  |  Branch (70:9): [True: 0, False: 413]
  ------------------
   71|      0|        rule_error(mlp);
   72|      0|        return NULL;
   73|      0|    }
   74|       |
   75|       |    /* rule(:python_code, /[^\t ]/, :python) */
   76|    413|    ret = rule(mlp, "python_code", "/[^\\t ]/", "python", NULL);
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   77|    413|    if (ret != 0) {
  ------------------
  |  Branch (77:9): [True: 0, False: 413]
  ------------------
   78|      0|        rule_error(mlp);
   79|      0|        return NULL;
   80|      0|    }
   81|       |
   82|       |    /* rule(:python, /^(?:[^\s.():]+\.)*[^\s.():]+:/, :start_state) */
   83|    413|    ret = rule(mlp, "python", "/^(?:[^\\s.():]+\\.)*[^\\s.():]+:/", "start_state", NULL);
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   84|    413|    if (ret != 0) {
  ------------------
  |  Branch (84:9): [True: 0, False: 413]
  ------------------
   85|      0|        rule_error(mlp);
   86|      0|        return NULL;
   87|      0|    }
   88|       |
   89|       |    /* Map the rules (mandatory for regex rules) */
   90|    413|    ret = flb_ml_parser_init(mlp);
   91|    413|    if (ret != 0) {
  ------------------
  |  Branch (91:9): [True: 0, False: 413]
  ------------------
   92|      0|        flb_error("[multiline: python] error on mapping rules");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   93|      0|        flb_ml_parser_destroy(mlp);
   94|      0|        return NULL;
   95|      0|    }
   96|       |
   97|    413|    return mlp;
   98|    413|}

flb_ml_parser_ruby:
   38|    413|{
   39|    413|    int ret;
   40|    413|    struct flb_ml_parser *mlp;
   41|       |
   42|    413|    mlp = flb_ml_parser_create(config,               /* Fluent Bit context */
   43|    413|                               "ruby",                 /* name      */
   44|    413|                               FLB_ML_REGEX,         /* type      */
  ------------------
  |  |   33|    413|#define FLB_ML_REGEX     1    /* pattern is a regular expression    */
  ------------------
   45|    413|                               NULL,                 /* match_str */
   46|    413|                               FLB_FALSE,            /* negate    */
  ------------------
  |  |   25|    413|#define FLB_FALSE  0
  ------------------
   47|    413|                               FLB_ML_FLUSH_TIMEOUT, /* flush_ms  */
  ------------------
  |  |   47|    413|#define FLB_ML_FLUSH_TIMEOUT    4000 /* Flush timeout default (milliseconds) */
  ------------------
   48|    413|                               key,                  /* key_content */
   49|    413|                               NULL,                 /* key_group   */
   50|    413|                               NULL,                 /* key_pattern */
   51|    413|                               NULL,                 /* parser ctx  */
   52|    413|                               NULL);                /* parser name */
   53|       |
   54|    413|    if (!mlp) {
  ------------------
  |  Branch (54:9): [True: 0, False: 413]
  ------------------
   55|      0|        flb_error("[multiline] could not create 'ruby mode'");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   56|      0|        return NULL;
   57|      0|    }
   58|       |
   59|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   60|    413|               "start_state, ruby_start_exception",
   61|    413|               "/^.+:\\d+:in\\s+.*/",
   62|    413|               "ruby_after_exception", NULL);
   63|    413|    if (ret != 0) {
  ------------------
  |  Branch (63:9): [True: 0, False: 413]
  ------------------
   64|      0|        rule_error(mlp);
   65|      0|        return NULL;
   66|      0|    }
   67|       |
   68|    413|    ret = rule(mlp,
  ------------------
  |  |   25|    413|#define rule flb_ml_rule_create
  ------------------
   69|    413|               "ruby_after_exception, ruby",
   70|    413|               "/^\\s+from\\s+.*:\\d+:in\\s+.*/",
   71|    413|               "ruby", NULL);
   72|    413|    if (ret != 0) {
  ------------------
  |  Branch (72:9): [True: 0, False: 413]
  ------------------
   73|      0|        rule_error(mlp);
   74|      0|        return NULL;
   75|      0|    }
   76|       |
   77|       |
   78|       |    /* Map the rules (mandatory for regex rules) */
   79|    413|    ret = flb_ml_parser_init(mlp);
   80|    413|    if (ret != 0) {
  ------------------
  |  Branch (80:9): [True: 0, False: 413]
  ------------------
   81|      0|        flb_error("[multiline: ruby] error on mapping rules");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   82|      0|        flb_ml_parser_destroy(mlp);
   83|      0|        return NULL;
   84|      0|    }
   85|       |
   86|    413|    return mlp;
   87|    413|}

get_start_state:
   33|  9.08k|{
   34|  9.08k|    struct mk_list *head;
   35|  9.08k|    struct flb_slist_entry *e;
   36|       |
   37|  12.3k|    mk_list_foreach(head, list) {
  ------------------
  |  |  205|  19.4k|#define mk_list_foreach(curr, head) for( curr = (head)->next; curr != (head); curr = curr->next )
  |  |  ------------------
  |  |  |  Branch (205:63): [True: 12.3k, False: 7.02k]
  |  |  ------------------
  ------------------
   38|  12.3k|        e = mk_list_entry(head, struct flb_slist_entry, _head);
  ------------------
  |  |  214|  12.3k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  12.3k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  12.3k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  12.3k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
   39|  12.3k|        if (strcmp(e->str, "start_state") == 0) {
  ------------------
  |  Branch (39:13): [True: 2.06k, False: 10.3k]
  ------------------
   40|  2.06k|            return e;
   41|  2.06k|        }
   42|  12.3k|    }
   43|       |
   44|  7.02k|    return NULL;
   45|  9.08k|}
flb_ml_rule_create:
   52|  9.08k|{
   53|  9.08k|    int ret;
   54|  9.08k|    int first_rule = FLB_FALSE;
  ------------------
  |  |   25|  9.08k|#define FLB_FALSE  0
  ------------------
   55|  9.08k|    struct flb_ml_rule *rule;
   56|       |
   57|  9.08k|    rule = flb_calloc(1, sizeof(struct flb_ml_rule));
   58|  9.08k|    if (!rule) {
  ------------------
  |  Branch (58:9): [True: 0, False: 9.08k]
  ------------------
   59|      0|        flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
   60|      0|        return -1;
   61|      0|    }
   62|  9.08k|    flb_slist_create(&rule->from_states);
   63|  9.08k|    mk_list_init(&rule->to_state_map);
   64|       |
   65|  9.08k|    if (mk_list_size(&ml_parser->regex_rules) == 0) {
  ------------------
  |  Branch (65:9): [True: 1.65k, False: 7.43k]
  ------------------
   66|  1.65k|        first_rule = FLB_TRUE;
  ------------------
  |  |   26|  1.65k|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|  1.65k|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
   67|  1.65k|    }
   68|  9.08k|    mk_list_add(&rule->_head, &ml_parser->regex_rules);
   69|       |
   70|       |    /* from_states */
   71|  9.08k|    ret = flb_slist_split_string(&rule->from_states, from_states, ',', -1);
   72|  9.08k|    if (ret <= 0) {
  ------------------
  |  Branch (72:9): [True: 0, False: 9.08k]
  ------------------
   73|      0|        flb_error("[multiline] rule is empty or has invalid 'from_states' tokens");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   74|      0|        flb_ml_rule_destroy(rule);
   75|      0|        return -1;
   76|      0|    }
   77|       |
   78|       |    /* Check if the rule contains a 'start_state' */
   79|  9.08k|    if (get_start_state(&rule->from_states)) {
  ------------------
  |  Branch (79:9): [True: 2.06k, False: 7.02k]
  ------------------
   80|  2.06k|        rule->start_state = FLB_TRUE;
  ------------------
  |  |   26|  2.06k|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|  2.06k|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
   81|  2.06k|    }
   82|  7.02k|    else if (first_rule) {
  ------------------
  |  Branch (82:14): [True: 0, False: 7.02k]
  ------------------
   83|      0|        flb_error("[multiline] rule don't contain a 'start_state'");
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
   84|      0|        flb_ml_rule_destroy(rule);
   85|      0|        return -1;
   86|      0|    }
   87|       |
   88|       |    /* regex content pattern */
   89|  9.08k|    rule->regex = flb_regex_create(regex_pattern);
   90|  9.08k|    if (!rule->regex) {
  ------------------
  |  Branch (90:9): [True: 0, False: 9.08k]
  ------------------
   91|      0|        flb_ml_rule_destroy(rule);
   92|      0|        return -1;
   93|      0|    }
   94|       |
   95|       |    /* to_state */
   96|  9.08k|    if (to_state) {
  ------------------
  |  Branch (96:9): [True: 9.08k, False: 0]
  ------------------
   97|  9.08k|        rule->to_state = flb_sds_create(to_state);
   98|  9.08k|        if (!rule->to_state) {
  ------------------
  |  Branch (98:13): [True: 0, False: 9.08k]
  ------------------
   99|      0|            flb_ml_rule_destroy(rule);
  100|      0|            return -1;
  101|      0|        }
  102|  9.08k|    }
  103|       |
  104|       |    /* regex end pattern */
  105|  9.08k|    if (end_pattern) {
  ------------------
  |  Branch (105:9): [True: 0, False: 9.08k]
  ------------------
  106|      0|        rule->regex_end = flb_regex_create(end_pattern);
  107|      0|        if (!rule->regex_end) {
  ------------------
  |  Branch (107:13): [True: 0, False: 0]
  ------------------
  108|      0|            flb_ml_rule_destroy(rule);
  109|      0|            return -1;
  110|      0|        }
  111|      0|    }
  112|       |
  113|  9.08k|    return 0;
  114|  9.08k|}
flb_ml_rule_destroy:
  117|  9.08k|{
  118|  9.08k|    struct mk_list *tmp;
  119|  9.08k|    struct mk_list *head;
  120|  9.08k|    struct to_state *st;
  121|       |
  122|  9.08k|    flb_slist_destroy(&rule->from_states);
  123|       |
  124|  9.08k|    if (rule->regex) {
  ------------------
  |  Branch (124:9): [True: 9.08k, False: 0]
  ------------------
  125|  9.08k|        flb_regex_destroy(rule->regex);
  126|  9.08k|    }
  127|       |
  128|       |
  129|  9.08k|    if (rule->to_state) {
  ------------------
  |  Branch (129:9): [True: 9.08k, False: 0]
  ------------------
  130|  9.08k|        flb_sds_destroy(rule->to_state);
  131|  9.08k|    }
  132|       |
  133|  25.6k|    mk_list_foreach_safe(head, tmp, &rule->to_state_map) {
  ------------------
  |  |  207|  34.6k|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 25.6k, False: 9.08k]
  |  |  ------------------
  ------------------
  134|  25.6k|        st = mk_list_entry(head, struct to_state, _head);
  ------------------
  |  |  214|  25.6k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  25.6k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  25.6k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  25.6k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  135|  25.6k|        mk_list_del(&st->_head);
  136|  25.6k|        flb_free(st);
  137|  25.6k|    }
  138|       |
  139|  9.08k|    if (rule->regex_end) {
  ------------------
  |  Branch (139:9): [True: 0, False: 9.08k]
  ------------------
  140|      0|        flb_regex_destroy(rule->regex_end);
  141|      0|    }
  142|       |
  143|  9.08k|    mk_list_del(&rule->_head);
  144|  9.08k|    flb_free(rule);
  145|  9.08k|}
flb_ml_rule_destroy_all:
  148|  2.47k|{
  149|  2.47k|    struct mk_list *tmp;
  150|  2.47k|    struct mk_list *head;
  151|  2.47k|    struct flb_ml_rule *rule;
  152|       |
  153|  9.08k|    mk_list_foreach_safe(head, tmp, &ml_parser->regex_rules) {
  ------------------
  |  |  207|  11.5k|    for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next)
  |  |  ------------------
  |  |  |  Branch (207:47): [True: 9.08k, False: 2.47k]
  |  |  ------------------
  ------------------
  154|  9.08k|        rule = mk_list_entry(head, struct flb_ml_rule, _head);
  ------------------
  |  |  214|  9.08k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  9.08k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  9.08k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  9.08k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  155|  9.08k|        flb_ml_rule_destroy(rule);
  156|  9.08k|    }
  157|  2.47k|}
flb_ml_rule_init:
  281|  1.65k|{
  282|  1.65k|    int ret;
  283|  1.65k|    struct mk_list *head;
  284|  1.65k|    struct flb_ml_rule *rule;
  285|       |
  286|       |    /* FIXME: sort rules by start_state first (let's trust in the caller) */
  287|       |
  288|       |    /* For each rule, compose it to_state_map list */
  289|  9.08k|    mk_list_foreach(head, &ml_parser->regex_rules) {
  ------------------
  |  |  205|  10.7k|#define mk_list_foreach(curr, head) for( curr = (head)->next; curr != (head); curr = curr->next )
  |  |  ------------------
  |  |  |  Branch (205:63): [True: 9.08k, False: 1.65k]
  |  |  ------------------
  ------------------
  290|  9.08k|        rule = mk_list_entry(head, struct flb_ml_rule, _head);
  ------------------
  |  |  214|  9.08k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  9.08k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  9.08k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  9.08k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  291|       |        /* Populate 'rule->to_state_map' list */
  292|  9.08k|        ret = set_to_state_map(ml_parser, rule);
  293|  9.08k|        if (ret == -1) {
  ------------------
  |  Branch (293:13): [True: 0, False: 9.08k]
  ------------------
  294|      0|            return -1;
  295|      0|        }
  296|  9.08k|    }
  297|       |
  298|  1.65k|    return 0;
  299|  1.65k|}
flb_ml_rule.c:set_to_state_map:
  199|  9.08k|{
  200|  9.08k|    int ret;
  201|  9.08k|    struct to_state *s;
  202|  9.08k|    struct mk_list *head;
  203|  9.08k|    struct flb_ml_rule *r;
  204|       |
  205|  9.08k|    if (!rule->to_state) {
  ------------------
  |  Branch (205:9): [True: 0, False: 9.08k]
  ------------------
  206|       |        /* no to_state */
  207|      0|        return 0;
  208|      0|    }
  209|       |
  210|       |    /* Iterate all rules that matches the to_state */
  211|  61.1k|    mk_list_foreach(head, &ml_parser->regex_rules) {
  ------------------
  |  |  205|  70.2k|#define mk_list_foreach(curr, head) for( curr = (head)->next; curr != (head); curr = curr->next )
  |  |  ------------------
  |  |  |  Branch (205:63): [True: 61.1k, False: 9.08k]
  |  |  ------------------
  ------------------
  212|  61.1k|        r = mk_list_entry(head, struct flb_ml_rule, _head);
  ------------------
  |  |  214|  61.1k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  61.1k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  61.1k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  61.1k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  213|       |
  214|       |        /* Check if rule->to_state, matches an existing (registered) from_state */
  215|  61.1k|        ret = to_states_exists(ml_parser, rule->to_state);
  216|  61.1k|        if (!ret) {
  ------------------
  |  Branch (216:13): [True: 0, False: 61.1k]
  ------------------
  217|      0|            flb_error("[multiline parser: %s] to_state='%s' is not registered",
  ------------------
  |  |  140|      0|    if (flb_log_check(FLB_LOG_ERROR))                                \
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  |  |  |  Branch (140:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  141|      0|        flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   39|      0|#define FLB_LOG_ERROR   1
  |  |  ------------------
  ------------------
  218|      0|                      ml_parser->name, rule->to_state);
  219|      0|            return -1;
  220|      0|        }
  221|       |
  222|       |        /*
  223|       |         * A rule can have many 'from_states', check if the current 'rule->to_state'
  224|       |         * matches any 'r->from_states'
  225|       |         */
  226|  61.1k|        ret = to_states_matches_rule(r, rule->to_state);
  227|  61.1k|        if (!ret) {
  ------------------
  |  Branch (227:13): [True: 35.5k, False: 25.6k]
  ------------------
  228|  35.5k|            continue;
  229|  35.5k|        }
  230|       |
  231|       |        /* We have a match. Create a 'to_state' entry into the 'to_state_map' list */
  232|  25.6k|        s = flb_malloc(sizeof(struct to_state));
  233|  25.6k|        if (!s) {
  ------------------
  |  Branch (233:13): [True: 0, False: 25.6k]
  ------------------
  234|      0|            flb_errno();
  ------------------
  |  |  201|      0|#define flb_errno() flb_errno_print(errno, __FLB_FILENAME__, __LINE__)
  ------------------
  235|      0|            return -1;
  236|      0|        }
  237|  25.6k|        s->rule = r;
  238|  25.6k|        mk_list_add(&s->_head, &rule->to_state_map);
  239|  25.6k|    }
  240|       |
  241|  9.08k|    return 0;
  242|  9.08k|}
flb_ml_rule.c:to_states_exists:
  161|  61.1k|{
  162|  61.1k|    struct mk_list *head;
  163|  61.1k|    struct mk_list *r_head;
  164|  61.1k|    struct flb_ml_rule *rule;
  165|  61.1k|    struct flb_slist_entry *e;
  166|       |
  167|   227k|    mk_list_foreach(head, &ml_parser->regex_rules) {
  ------------------
  |  |  205|   227k|#define mk_list_foreach(curr, head) for( curr = (head)->next; curr != (head); curr = curr->next )
  |  |  ------------------
  |  |  |  Branch (205:63): [True: 227k, False: 0]
  |  |  ------------------
  ------------------
  168|   227k|        rule = mk_list_entry(head, struct flb_ml_rule, _head);
  ------------------
  |  |  214|   227k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|   227k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|   227k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|   227k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  169|       |
  170|   313k|        mk_list_foreach(r_head, &rule->from_states) {
  ------------------
  |  |  205|   479k|#define mk_list_foreach(curr, head) for( curr = (head)->next; curr != (head); curr = curr->next )
  |  |  ------------------
  |  |  |  Branch (205:63): [True: 313k, False: 166k]
  |  |  ------------------
  ------------------
  171|   313k|            e = mk_list_entry(r_head, struct flb_slist_entry, _head);
  ------------------
  |  |  214|   313k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|   313k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|   313k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|   313k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  172|   313k|            if (strcmp(e->str, state) == 0) {
  ------------------
  |  Branch (172:17): [True: 61.1k, False: 251k]
  ------------------
  173|  61.1k|                return FLB_TRUE;
  ------------------
  |  |   26|  61.1k|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|  61.1k|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  174|  61.1k|            }
  175|   313k|        }
  176|   227k|    }
  177|       |
  178|      0|    return FLB_FALSE;
  ------------------
  |  |   25|      0|#define FLB_FALSE  0
  ------------------
  179|  61.1k|}
flb_ml_rule.c:to_states_matches_rule:
  183|  61.1k|{
  184|  61.1k|    struct mk_list *head;
  185|  61.1k|    struct flb_slist_entry *e;
  186|       |
  187|  81.3k|    mk_list_foreach(head, &rule->from_states) {
  ------------------
  |  |  205|   116k|#define mk_list_foreach(curr, head) for( curr = (head)->next; curr != (head); curr = curr->next )
  |  |  ------------------
  |  |  |  Branch (205:63): [True: 81.3k, False: 35.5k]
  |  |  ------------------
  ------------------
  188|  81.3k|        e = mk_list_entry(head, struct flb_slist_entry, _head);
  ------------------
  |  |  214|  81.3k|#define mk_list_entry( ptr, type, member ) container_of( ptr, type, member )
  |  |  ------------------
  |  |  |  |   38|  81.3k|#define container_of(ptr, type, member) ({                      \
  |  |  |  |   39|  81.3k|      const typeof( ((type *)0)->member ) *__mptr = (ptr);      \
  |  |  |  |   40|  81.3k|      (type *)( (char *)__mptr - offsetof(type,member) );})
  |  |  ------------------
  ------------------
  189|  81.3k|        if (strcmp(e->str, state) == 0) {
  ------------------
  |  Branch (189:13): [True: 25.6k, False: 55.7k]
  ------------------
  190|  25.6k|            return FLB_TRUE;
  ------------------
  |  |   26|  25.6k|#define FLB_TRUE   !FLB_FALSE
  |  |  ------------------
  |  |  |  |   25|  25.6k|#define FLB_FALSE  0
  |  |  ------------------
  ------------------
  191|  25.6k|        }
  192|  81.3k|    }
  193|       |
  194|  35.5k|    return FLB_FALSE;
  ------------------
  |  |   25|  35.5k|#define FLB_FALSE  0
  ------------------
  195|  61.1k|}

get_null_terminated:
   29|  1.22k|{
   30|  1.22k|  char *tmp = flb_malloc(size+1);
   31|  1.22k|  if (tmp == NULL) {
  ------------------
  |  Branch (31:7): [True: 0, False: 1.22k]
  ------------------
   32|      0|    tmp = malloc(size+1);
   33|      0|  }
   34|  1.22k|  memcpy(tmp, *data, size);
   35|  1.22k|  tmp[size] = '\0';
   36|       |
   37|       |  /* Modify the fuzz variables */
   38|  1.22k|  *total_data_size -= size;
   39|  1.22k|  *data += size;
   40|       |
   41|  1.22k|  return tmp;
   42|  1.22k|}

LLVMFuzzerTestOneInput:
   18|    430|{
   19|       |    /* Set fuzzer-malloc chance of failure */
   20|    430|    flb_malloc_p = 0;
   21|    430|    flb_malloc_mod = 25000;
   22|       |
   23|    430|    struct flb_upstream *u;
   24|    430|    struct flb_connection *u_conn = NULL;
   25|    430|    struct flb_http_client *c;
   26|    430|    struct flb_config *config;
   27|    430|    char *uri = NULL;
   28|       |
   29|    430|    if (size < 160) {
  ------------------
  |  Branch (29:9): [True: 17, False: 413]
  ------------------
   30|     17|        return 0;
   31|     17|    }
   32|       |
   33|    413|    config = flb_config_init();
   34|    413|    if (config == NULL) {
  ------------------
  |  Branch (34:9): [True: 0, False: 413]
  ------------------
   35|      0|        return 0;
   36|      0|    }
   37|       |
   38|    413|    u = flb_upstream_create(config, "127.0.0.1", 8001, 0, NULL);
   39|       |
   40|    413|    u_conn = flb_connection_create(-1,
   41|    413|                                   FLB_TRANSPORT_TCP,
  ------------------
  |  |   32|    413|#define FLB_TRANSPORT_TCP         1
  ------------------
   42|    413|                                   (void *) u,
   43|    413|                                   NULL,
   44|    413|                                   NULL);
   45|       |
   46|    413|    if (u_conn == NULL) {
  ------------------
  |  Branch (46:9): [True: 0, False: 413]
  ------------------
   47|      0|        return 0;
   48|      0|    }
   49|       |
   50|    413|    char *proxy = NULL;
   51|    413|    if (GET_MOD_EQ(2,1)) {
  ------------------
  |  |   22|    413|#define GET_MOD_EQ(max, idx) (data[0] % max) == idx
  |  |  ------------------
  |  |  |  Branch (22:30): [True: 11, False: 402]
  |  |  ------------------
  ------------------
   52|     11|        proxy = get_null_terminated(50, &data, &size);
   53|     11|    }
   54|       |
   55|    413|    uri = get_null_terminated(20, &data, &size);
   56|       |
   57|    413|    int method = (int)data[0];
   58|    413|    c = flb_http_client(u_conn, method, uri, NULL, 0,
   59|    413|                    "127.0.0.1", 8001, proxy, 0);
   60|    413|    if (c != NULL) {
  ------------------
  |  Branch (60:9): [True: 402, False: 11]
  ------------------
   61|    402|        char *null_terminated = get_null_terminated(30, &data, &size);
   62|       |
   63|       |        /* Perform a set of operations on the http_client */
   64|    402|        flb_http_basic_auth(c, null_terminated, null_terminated);
   65|    402|        flb_http_set_content_encoding_gzip(c);
   66|    402|        flb_http_set_keepalive(c);
   67|    402|        flb_http_strip_port_from_host(c);
   68|    402|        flb_http_allow_duplicated_headers(c, 0);
   69|       |
   70|    402|        flb_http_buffer_size(c, (*(size_t *)data) & 0xfff);
   71|    402|        MOVE_INPUT(4)
  ------------------
  |  |   23|    402|#define MOVE_INPUT(offset) data += offset; size -= offset;
  ------------------
   72|    402|        flb_http_add_header(c, "User-Agent", 10, "Fluent-Bit", 10);
   73|    402|        flb_http_add_header(c, (char*)data, size, "Fluent-Bit", 10);
   74|    402|        flb_http_buffer_size(c, (int)data[0]);
   75|    402|        MOVE_INPUT(1)
  ------------------
  |  |   23|    402|#define MOVE_INPUT(offset) data += offset; size -= offset;
  ------------------
   76|    402|        flb_http_buffer_available(c);
   77|       |
   78|    402|        size_t b_sent;
   79|    402|        flb_http_do(c, &b_sent);
   80|       |
   81|    402|        size_t out_size = 0;
   82|    402|        flb_http_buffer_increase(c, (*(size_t *)data) & 0xfff, &out_size);
   83|    402|        MOVE_INPUT(4)
  ------------------
  |  |   23|    402|#define MOVE_INPUT(offset) data += offset; size -= offset;
  ------------------
   84|       |
   85|       |        /* Now we need to simulate the reading of data */
   86|    402|        c->resp.status = 200;
   87|       |
   88|    402|        if (c->resp.data != NULL) {
  ------------------
  |  Branch (88:13): [True: 402, False: 0]
  ------------------
   89|    402|           flb_free(c->resp.data);
   90|    402|        }
   91|       |
   92|    402|        char *new_nulltm = get_null_terminated(30, &data, &size);
   93|    402|        c->resp.data_len = 30;
   94|    402|        c->resp.data = new_nulltm;
   95|    402|        fuzz_process_data(c);
   96|    402|        fuzz_check_connection(c);
   97|       |
   98|    402|        flb_http_client_destroy(c);
   99|    402|        flb_free(null_terminated);
  100|    402|    }
  101|       |
  102|       |    /* Now try the http_client_proxy_connect function. */
  103|    413|    flb_http_client_proxy_connect(u_conn);
  104|       |
  105|    413|    flb_connection_destroy(u_conn);
  106|    413|    flb_upstream_destroy(u);
  107|    413|    flb_config_exit(config);
  108|    413|    if (uri != NULL) {
  ------------------
  |  Branch (108:9): [True: 413, False: 0]
  ------------------
  109|    413|        flb_free(uri);
  110|    413|    }
  111|    413|    if (proxy != NULL) {
  ------------------
  |  Branch (111:9): [True: 11, False: 402]
  ------------------
  112|     11|        flb_free(proxy);
  113|     11|    }
  114|       |
  115|    413|    return 0;
  116|    413|}

