memdup:
    7|   142k|void* memdup(const void *p, size_t l) {
    8|   142k|        void *ret;
    9|       |
   10|   142k|        assert(l == 0 || p);
  ------------------
  |  |   72|   142k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   142k|        do {                                                            \
  |  |  |  |   59|   142k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   285k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 142k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 142k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 142k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   142k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   142k|        } while (false)
  |  |  ------------------
  ------------------
   11|       |
   12|   142k|        ret = malloc(l ?: 1);
  ------------------
  |  Branch (12:22): [True: 142k, False: 0]
  ------------------
   13|   142k|        if (!ret)
  ------------------
  |  Branch (13:13): [True: 0, False: 0]
  ------------------
   14|      0|                return NULL;
   15|       |
   16|      0|        return memcpy_safe(ret, p, l);
   17|      0|}
greedy_realloc:
   40|  66.6M|                size_t size) {
   41|       |
   42|  66.6M|        size_t newalloc;
   43|  66.6M|        void *q;
   44|       |
   45|  66.6M|        assert(p);
  ------------------
  |  |   72|  66.6M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  66.6M|        do {                                                            \
  |  |  |  |   59|  66.6M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  66.6M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 66.6M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  66.6M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  66.6M|        } while (false)
  |  |  ------------------
  ------------------
   46|       |
   47|       |        /* We use malloc_usable_size() for determining the current allocated size. On all systems we care
   48|       |         * about this should be safe to rely on. Should there ever arise the need to avoid relying on this we
   49|       |         * can instead locally fall back to realloc() on every call, rounded up to the next exponent of 2 or
   50|       |         * so. */
   51|       |
   52|  66.6M|        if (*p && (size == 0 || (MALLOC_SIZEOF_SAFE(*p) / size >= need)))
  ------------------
  |  |  198|  62.5M|        malloc_sizeof_safe((void**) &__builtin_choose_expr(__builtin_constant_p(x), (void*) { NULL }, (x)))
  ------------------
  |  Branch (52:13): [True: 62.5M, False: 4.18M]
  |  Branch (52:20): [True: 0, False: 62.5M]
  |  Branch (52:33): [True: 62.4M, False: 14.1k]
  ------------------
   53|  62.4M|                return *p;
   54|       |
   55|  4.20M|        if (_unlikely_(need > SIZE_MAX/2)) /* Overflow check */
  ------------------
  |  |   95|  4.20M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:23): [True: 0, False: 4.20M]
  |  |  ------------------
  ------------------
   56|      0|                return NULL;
   57|  4.20M|        newalloc = need * 2;
   58|       |
   59|  4.20M|        if (!MUL_ASSIGN_SAFE(&newalloc, size))
  ------------------
  |  |  273|  4.20M|#define MUL_ASSIGN_SAFE(a, b) __MUL_ASSIGN_SAFE(UNIQ, a, b)
  |  |  ------------------
  |  |  |  |  275|  4.20M|        ({                                                      \
  |  |  |  |  276|  4.20M|                const typeof(a) UNIQ_T(A, q) = (a);             \
  |  |  |  |  277|  4.20M|                MUL_SAFE(UNIQ_T(A, q), *UNIQ_T(A, q), b);       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  272|  4.20M|#define MUL_SAFE(ret, a, b) (!__builtin_mul_overflow(a, b, ret))
  |  |  |  |  ------------------
  |  |  |  |  278|  4.20M|        })
  |  |  ------------------
  ------------------
  |  Branch (59:13): [True: 0, False: 4.20M]
  ------------------
   60|      0|                return NULL;
   61|       |
   62|  4.20M|        if (newalloc < 64) /* Allocate at least 64 bytes */
  ------------------
  |  Branch (62:13): [True: 4.18M, False: 14.1k]
  ------------------
   63|  4.18M|                newalloc = 64;
   64|       |
   65|  4.20M|        q = realloc(*p, newalloc);
   66|  4.20M|        if (!q)
  ------------------
  |  Branch (66:13): [True: 0, False: 4.20M]
  ------------------
   67|      0|                return NULL;
   68|       |
   69|  4.20M|        return *p = q;
   70|  4.20M|}
expand_to_usable:
  128|  62.5M|void *expand_to_usable(void *ptr, size_t newsize _unused_) {
  129|  62.5M|        return ptr;
  130|  62.5M|}
malloc_sizeof_safe:
  132|  62.5M|size_t malloc_sizeof_safe(void **xp) {
  133|  62.5M|        if (_unlikely_(!xp || !*xp))
  ------------------
  |  |   95|   125M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:23): [True: 0, False: 62.5M]
  |  |  |  Branch (95:44): [True: 0, False: 62.5M]
  |  |  |  Branch (95:44): [True: 0, False: 62.5M]
  |  |  ------------------
  ------------------
  134|      0|                return 0;
  135|       |
  136|  62.5M|        size_t sz = malloc_usable_size(*xp);
  137|  62.5M|        *xp = expand_to_usable(*xp, sz);
  138|       |        /* GCC doesn't see the _returns_nonnull_ when built with ubsan, so yet another hint to make it doubly
  139|       |         * clear that expand_to_usable won't return NULL.
  140|       |         * See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79265 */
  141|  62.5M|        if (!*xp)
  ------------------
  |  Branch (141:13): [True: 0, False: 62.5M]
  ------------------
  142|      0|                assert_not_reached();
  ------------------
  |  |   76|      0|        log_assert_failed_unreachable(PROJECT_FILE, __LINE__, __func__)
  |  |  ------------------
  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  ------------------
  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  143|  62.5M|        return sz;
  144|  62.5M|}

resolved-etc-hosts.c:freep:
   78|  5.17M|static inline void freep(void *p) {
   79|  5.17M|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|  5.17M|        ({                                      \
  |  |  405|  5.17M|                free(memory);                   \
  |  |  406|  5.17M|                (typeof(memory)) NULL;          \
  |  |  407|  5.17M|        })
  ------------------
   80|  5.17M|}
resolved-etc-hosts.c:malloc_multiply:
   88|  87.1k|_malloc_ _alloc_(1, 2) static inline void *malloc_multiply(size_t need, size_t size) {
   89|  87.1k|        if (size_multiply_overflow(size, need))
  ------------------
  |  Branch (89:13): [True: 0, False: 87.1k]
  ------------------
   90|      0|                return NULL;
   91|       |
   92|  87.1k|        return malloc(size * need ?: 1);
  ------------------
  |  Branch (92:23): [True: 87.1k, False: 0]
  ------------------
   93|  87.1k|}
resolved-etc-hosts.c:size_multiply_overflow:
   84|   229k|static inline bool size_multiply_overflow(size_t size, size_t need) {
   85|   229k|        return _unlikely_(need != 0 && size > (SIZE_MAX / need));
  ------------------
  |  |   95|   459k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:44): [True: 229k, False: 0]
  |  |  |  Branch (95:44): [True: 0, False: 229k]
  |  |  ------------------
  ------------------
   86|   229k|}
resolved-etc-hosts.c:memdup_multiply:
   95|   142k|_alloc_(2, 3) static inline void *memdup_multiply(const void *p, size_t need, size_t size) {
   96|   142k|        if (size_multiply_overflow(size, need))
  ------------------
  |  Branch (96:13): [True: 0, False: 142k]
  ------------------
   97|      0|                return NULL;
   98|       |
   99|   142k|        return memdup(p, size * need);
  100|   142k|}
dns-domain.c:freep:
   78|  1.53M|static inline void freep(void *p) {
   79|  1.53M|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|  1.53M|        ({                                      \
  |  |  405|  1.53M|                free(memory);                   \
  |  |  406|  1.53M|                (typeof(memory)) NULL;          \
  |  |  407|  1.53M|        })
  ------------------
   80|  1.53M|}
socket-netlink.c:freep:
   78|  3.02M|static inline void freep(void *p) {
   79|  3.02M|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|  3.02M|        ({                                      \
  |  |  405|  3.02M|                free(memory);                   \
  |  |  406|  3.02M|                (typeof(memory)) NULL;          \
  |  |  407|  3.02M|        })
  ------------------
   80|  3.02M|}
extract-word.c:freep:
   78|  3.30M|static inline void freep(void *p) {
   79|  3.30M|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|  3.30M|        ({                                      \
  |  |  405|  3.30M|                free(memory);                   \
  |  |  406|  3.30M|                (typeof(memory)) NULL;          \
  |  |  407|  3.30M|        })
  ------------------
   80|  3.30M|}
fileio.c:freep:
   78|  1.64M|static inline void freep(void *p) {
   79|  1.64M|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|  1.64M|        ({                                      \
  |  |  405|  1.64M|                free(memory);                   \
  |  |  406|  1.64M|                (typeof(memory)) NULL;          \
  |  |  407|  1.64M|        })
  ------------------
   80|  1.64M|}
log.c:freep:
   78|  1.66k|static inline void freep(void *p) {
   79|  1.66k|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|  1.66k|        ({                                      \
  |  |  405|  1.66k|                free(memory);                   \
  |  |  406|  1.66k|                (typeof(memory)) NULL;          \
  |  |  407|  1.66k|        })
  ------------------
   80|  1.66k|}

invoked_by_systemd:
   41|  1.66k|bool invoked_by_systemd(void) {
   42|  1.66k|        int r;
   43|       |
   44|       |        /* If the process is directly executed by PID1 (e.g. ExecStart= or generator), systemd-importd,
   45|       |         * or systemd-homed, then $SYSTEMD_EXEC_PID= is set, and read the command line. */
   46|  1.66k|        const char *e = getenv("SYSTEMD_EXEC_PID");
   47|  1.66k|        if (!e)
  ------------------
  |  Branch (47:13): [True: 1.66k, False: 0]
  ------------------
   48|  1.66k|                return false;
   49|       |
   50|      0|        if (streq(e, "*"))
  ------------------
  |  |   46|      0|#define streq(a,b) (strcmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (46:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   51|       |                /* For testing. */
   52|      0|                return true;
   53|       |
   54|      0|        pid_t p;
   55|      0|        r = parse_pid(e, &p);
   56|      0|        if (r < 0) {
  ------------------
  |  Branch (56:13): [True: 0, False: 0]
  ------------------
   57|       |                /* We know that systemd sets the variable correctly. Something else must have set it. */
   58|      0|                log_debug_errno(r, "Failed to parse \"SYSTEMD_EXEC_PID=%s\", ignoring: %m", e);
  ------------------
  |  |  228|      0|#define log_debug_errno(error, ...)     log_full_errno(LOG_DEBUG,   error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
   59|      0|                return false;
   60|      0|        }
   61|       |
   62|      0|        return getpid_cached() == p;
   63|      0|}

log_set_assert_return_is_critical:
   16|  1.66k|void log_set_assert_return_is_critical(bool b) {
   17|  1.66k|        assert_return_is_critical = b;
   18|  1.66k|}

getenv_bool:
  991|  1.66k|int getenv_bool(const char *p) {
  992|  1.66k|        const char *e;
  993|       |
  994|  1.66k|        e = getenv(p);
  995|  1.66k|        if (!e)
  ------------------
  |  Branch (995:13): [True: 1.66k, False: 0]
  ------------------
  996|  1.66k|                return -ENXIO;
  997|       |
  998|      0|        return parse_boolean(e);
  999|  1.66k|}

fd-util.c:_reset_errno_:
   23|  1.66k|static inline void _reset_errno_(int *saved_errno) {
   24|  1.66k|        if (*saved_errno < 0) /* Invalidated by UNPROTECT_ERRNO? */
  ------------------
  |  Branch (24:13): [True: 0, False: 1.66k]
  ------------------
   25|      0|                return;
   26|       |
   27|  1.66k|        errno = *saved_errno;
   28|  1.66k|}
in-addr-util.c:errno_or_else:
   91|   240k|static inline int errno_or_else(int fallback) {
   92|       |        /* To be used when invoking library calls where errno handling is not defined clearly: we return
   93|       |         * errno if it is set, and the specified error otherwise. The idea is that the caller initializes
   94|       |         * errno to zero before doing an API call, and then uses this helper to retrieve a somewhat useful
   95|       |         * error code */
   96|   240k|        if (errno > 0)
  ------------------
  |  Branch (96:13): [True: 0, False: 240k]
  ------------------
   97|      0|                return -errno;
   98|       |
   99|   240k|        return -ABS(fallback);
  ------------------
  |  |  172|   240k|#  define ABS(a) __builtin_llabs(a)
  ------------------
  100|   240k|}
log.c:_reset_errno_:
   23|  1.66k|static inline void _reset_errno_(int *saved_errno) {
   24|  1.66k|        if (*saved_errno < 0) /* Invalidated by UNPROTECT_ERRNO? */
  ------------------
  |  Branch (24:13): [True: 0, False: 1.66k]
  ------------------
   25|      0|                return;
   26|       |
   27|  1.66k|        errno = *saved_errno;
   28|  1.66k|}

extract_first_word:
   10|  3.30M|int extract_first_word(const char **p, char **ret, const char *separators, ExtractFlags flags) {
   11|  3.30M|        _cleanup_free_ char *s = NULL;
  ------------------
  |  |   82|  3.30M|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  3.30M|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
   12|  3.30M|        size_t sz = 0;
   13|  3.30M|        char quote = 0;                 /* 0 or ' or " */
   14|  3.30M|        bool backslash = false;         /* whether we've just seen a backslash */
   15|  3.30M|        char c;
   16|  3.30M|        int r;
   17|       |
   18|  3.30M|        assert(p);
  ------------------
  |  |   72|  3.30M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  3.30M|        do {                                                            \
  |  |  |  |   59|  3.30M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  3.30M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 3.30M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  3.30M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  3.30M|        } while (false)
  |  |  ------------------
  ------------------
   19|  3.30M|        assert(ret);
  ------------------
  |  |   72|  3.30M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  3.30M|        do {                                                            \
  |  |  |  |   59|  3.30M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  3.30M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 3.30M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  3.30M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  3.30M|        } while (false)
  |  |  ------------------
  ------------------
   20|  3.30M|        assert(!FLAGS_SET(flags, EXTRACT_KEEP_QUOTE | EXTRACT_UNQUOTE));
  ------------------
  |  |   72|  3.30M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  3.30M|        do {                                                            \
  |  |  |  |   59|  3.30M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  3.30M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 3.30M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  3.30M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  3.30M|        } while (false)
  |  |  ------------------
  ------------------
   21|       |
   22|       |        /* Bail early if called after last value or with no input */
   23|  3.30M|        if (!*p)
  ------------------
  |  Branch (23:13): [True: 766k, False: 2.53M]
  ------------------
   24|   766k|                goto finish;
   25|  2.53M|        c = **p;
   26|       |
   27|  2.53M|        if (!separators)
  ------------------
  |  Branch (27:13): [True: 2.53M, False: 0]
  ------------------
   28|  2.53M|                separators = WHITESPACE;
  ------------------
  |  |   15|  2.53M|#define WHITESPACE          " \t\n\r"
  ------------------
   29|       |
   30|       |        /* Parses the first word of a string, and returns it in
   31|       |         * *ret. Removes all quotes in the process. When parsing fails
   32|       |         * (because of an uneven number of quotes or similar), leaves
   33|       |         * the pointer *p at the first invalid character. */
   34|       |
   35|  2.53M|        if (flags & EXTRACT_DONT_COALESCE_SEPARATORS)
  ------------------
  |  Branch (35:13): [True: 0, False: 2.53M]
  ------------------
   36|      0|                if (!GREEDY_REALLOC(s, sz+1))
  ------------------
  |  |  139|      0|        greedy_realloc((void**) &(array), (need), sizeof((array)[0]))
  ------------------
  |  Branch (36:21): [True: 0, False: 0]
  ------------------
   37|      0|                        return -ENOMEM;
   38|       |
   39|  2.53M|        for (;; (*p)++, c = **p) {
   40|  2.53M|                if (c == 0)
  ------------------
  |  Branch (40:21): [True: 0, False: 2.53M]
  ------------------
   41|      0|                        goto finish_force_terminate;
   42|  2.53M|                else if (strchr(separators, c)) {
  ------------------
  |  Branch (42:26): [True: 0, False: 2.53M]
  ------------------
   43|      0|                        if (flags & EXTRACT_DONT_COALESCE_SEPARATORS) {
  ------------------
  |  Branch (43:29): [True: 0, False: 0]
  ------------------
   44|      0|                                if (!(flags & EXTRACT_RETAIN_SEPARATORS))
  ------------------
  |  Branch (44:37): [True: 0, False: 0]
  ------------------
   45|      0|                                        (*p)++;
   46|      0|                                goto finish_force_next;
   47|      0|                        }
   48|  2.53M|                } else {
   49|       |                        /* We found a non-blank character, so we will always
   50|       |                         * want to return a string (even if it is empty),
   51|       |                         * allocate it here. */
   52|  2.53M|                        if (!GREEDY_REALLOC(s, sz+1))
  ------------------
  |  |  139|  2.53M|        greedy_realloc((void**) &(array), (need), sizeof((array)[0]))
  ------------------
  |  Branch (52:29): [True: 0, False: 2.53M]
  ------------------
   53|      0|                                return -ENOMEM;
   54|  2.53M|                        break;
   55|  2.53M|                }
   56|  2.53M|        }
   57|       |
   58|  2.54M|        for (;; (*p)++, c = **p) {
   59|  2.54M|                if (backslash) {
  ------------------
  |  Branch (59:21): [True: 3.44k, False: 2.54M]
  ------------------
   60|  3.44k|                        if (!GREEDY_REALLOC(s, sz+7))
  ------------------
  |  |  139|  3.44k|        greedy_realloc((void**) &(array), (need), sizeof((array)[0]))
  ------------------
  |  Branch (60:29): [True: 0, False: 3.44k]
  ------------------
   61|      0|                                return -ENOMEM;
   62|       |
   63|  3.44k|                        if (c == 0) {
  ------------------
  |  Branch (63:29): [True: 519, False: 2.92k]
  ------------------
   64|    519|                                if ((flags & EXTRACT_UNESCAPE_RELAX) &&
  ------------------
  |  Branch (64:37): [True: 0, False: 519]
  ------------------
   65|    519|                                    (quote == 0 || flags & EXTRACT_RELAX)) {
  ------------------
  |  Branch (65:38): [True: 0, False: 0]
  |  Branch (65:52): [True: 0, False: 0]
  ------------------
   66|       |                                        /* If we find an unquoted trailing backslash and we're in
   67|       |                                         * EXTRACT_UNESCAPE_RELAX mode, keep it verbatim in the
   68|       |                                         * output.
   69|       |                                         *
   70|       |                                         * Unbalanced quotes will only be allowed in EXTRACT_RELAX
   71|       |                                         * mode, EXTRACT_UNESCAPE_RELAX mode does not allow them.
   72|       |                                         */
   73|      0|                                        s[sz++] = '\\';
   74|      0|                                        goto finish_force_terminate;
   75|      0|                                }
   76|    519|                                if (flags & EXTRACT_RELAX)
  ------------------
  |  Branch (76:37): [True: 519, False: 0]
  ------------------
   77|    519|                                        goto finish_force_terminate;
   78|      0|                                return -EINVAL;
   79|    519|                        }
   80|       |
   81|  2.92k|                        if (flags & (EXTRACT_CUNESCAPE|EXTRACT_UNESCAPE_SEPARATORS)) {
  ------------------
  |  Branch (81:29): [True: 0, False: 2.92k]
  ------------------
   82|      0|                                bool eight_bit = false;
   83|      0|                                char32_t u;
   84|       |
   85|      0|                                if ((flags & EXTRACT_CUNESCAPE) &&
  ------------------
  |  Branch (85:37): [True: 0, False: 0]
  ------------------
   86|      0|                                    (r = cunescape_one(*p, SIZE_MAX, &u, &eight_bit, false)) >= 0) {
  ------------------
  |  Branch (86:37): [True: 0, False: 0]
  ------------------
   87|       |                                        /* A valid escaped sequence */
   88|      0|                                        assert(r >= 1);
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
   89|       |
   90|      0|                                        (*p) += r - 1;
   91|       |
   92|      0|                                        if (eight_bit)
  ------------------
  |  Branch (92:45): [True: 0, False: 0]
  ------------------
   93|      0|                                                s[sz++] = u;
   94|      0|                                        else
   95|      0|                                                sz += utf8_encode_unichar(s + sz, u);
   96|      0|                                } else if ((flags & EXTRACT_UNESCAPE_SEPARATORS) &&
  ------------------
  |  Branch (96:44): [True: 0, False: 0]
  ------------------
   97|      0|                                           (strchr(separators, **p) || **p == '\\'))
  ------------------
  |  Branch (97:45): [True: 0, False: 0]
  |  Branch (97:72): [True: 0, False: 0]
  ------------------
   98|       |                                        /* An escaped separator char or the escape char itself */
   99|      0|                                        s[sz++] = c;
  100|      0|                                else if (flags & EXTRACT_UNESCAPE_RELAX) {
  ------------------
  |  Branch (100:42): [True: 0, False: 0]
  ------------------
  101|      0|                                        s[sz++] = '\\';
  102|      0|                                        s[sz++] = c;
  103|      0|                                } else
  104|      0|                                        return -EINVAL;
  105|      0|                        } else
  106|  2.92k|                                s[sz++] = c;
  107|       |
  108|  2.92k|                        backslash = false;
  109|       |
  110|  2.54M|                } else if (quote != 0) {     /* inside either single or double quotes */
  ------------------
  |  Branch (110:28): [True: 0, False: 2.54M]
  ------------------
  111|      0|                        for (;; (*p)++, c = **p) {
  112|      0|                                if (c == 0) {
  ------------------
  |  Branch (112:37): [True: 0, False: 0]
  ------------------
  113|      0|                                        if (flags & EXTRACT_RELAX)
  ------------------
  |  Branch (113:45): [True: 0, False: 0]
  ------------------
  114|      0|                                                goto finish_force_terminate;
  115|      0|                                        return -EINVAL;
  116|      0|                                } else if (c == quote) {        /* found the end quote */
  ------------------
  |  Branch (116:44): [True: 0, False: 0]
  ------------------
  117|      0|                                        quote = 0;
  118|      0|                                        if (flags & EXTRACT_UNQUOTE)
  ------------------
  |  Branch (118:45): [True: 0, False: 0]
  ------------------
  119|      0|                                                break;
  120|      0|                                } else if (c == '\\' && !(flags & EXTRACT_RETAIN_ESCAPE)) {
  ------------------
  |  Branch (120:44): [True: 0, False: 0]
  |  Branch (120:57): [True: 0, False: 0]
  ------------------
  121|      0|                                        backslash = true;
  122|      0|                                        break;
  123|      0|                                }
  124|       |
  125|      0|                                if (!GREEDY_REALLOC(s, sz+2))
  ------------------
  |  |  139|      0|        greedy_realloc((void**) &(array), (need), sizeof((array)[0]))
  ------------------
  |  Branch (125:37): [True: 0, False: 0]
  ------------------
  126|      0|                                        return -ENOMEM;
  127|       |
  128|      0|                                s[sz++] = c;
  129|       |
  130|      0|                                if (quote == 0)
  ------------------
  |  Branch (130:37): [True: 0, False: 0]
  ------------------
  131|      0|                                        break;
  132|      0|                        }
  133|       |
  134|  2.54M|                } else {
  135|  31.0M|                        for (;; (*p)++, c = **p) {
  136|  31.0M|                                if (c == 0)
  ------------------
  |  Branch (136:37): [True: 1.00M, False: 30.0M]
  ------------------
  137|  1.00M|                                        goto finish_force_terminate;
  138|  30.0M|                                else if (IN_SET(c, '\'', '"') && (flags & (EXTRACT_KEEP_QUOTE | EXTRACT_UNQUOTE))) {
  ------------------
  |  |  361|  60.1M|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 2.46k, False: 30.0M]
  |  |  ------------------
  |  |  362|  60.1M|                bool _found = false;                                    \
  |  |  363|  60.1M|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  60.1M|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  60.1M|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  60.1M|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  30.0M|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  60.1M|                switch (x) {                                            \
  |  |  368|  2.46k|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|  1.33k|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|  1.33k|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|  1.33k|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|  2.46k|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|  2.46k|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 1.12k, False: 30.0M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 1.33k, False: 30.0M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|  2.46k|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|  2.46k|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|  2.46k|                        _found = true;                                  \
  |  |  370|  2.46k|                        break;                                          \
  |  |  371|  30.0M|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 30.0M, False: 2.46k]
  |  |  ------------------
  |  |  372|  30.0M|                        ;                                               \
  |  |  373|  60.1M|                }                                                       \
  |  |  374|  60.1M|                _found;                                                 \
  |  |  375|  30.0M|        })
  ------------------
  |  Branch (138:66): [True: 0, False: 2.46k]
  ------------------
  139|      0|                                        quote = c;
  140|      0|                                        if (flags & EXTRACT_UNQUOTE)
  ------------------
  |  Branch (140:45): [True: 0, False: 0]
  ------------------
  141|      0|                                                break;
  142|  30.0M|                                } else if (c == '\\' && !(flags & EXTRACT_RETAIN_ESCAPE)) {
  ------------------
  |  Branch (142:44): [True: 3.44k, False: 30.0M]
  |  Branch (142:57): [True: 3.44k, False: 0]
  ------------------
  143|  3.44k|                                        backslash = true;
  144|  3.44k|                                        break;
  145|  30.0M|                                } else if (strchr(separators, c)) {
  ------------------
  |  Branch (145:44): [True: 1.53M, False: 28.5M]
  ------------------
  146|  1.53M|                                        if (flags & EXTRACT_DONT_COALESCE_SEPARATORS) {
  ------------------
  |  Branch (146:45): [True: 0, False: 1.53M]
  ------------------
  147|      0|                                                if (!(flags & EXTRACT_RETAIN_SEPARATORS))
  ------------------
  |  Branch (147:53): [True: 0, False: 0]
  ------------------
  148|      0|                                                        (*p)++;
  149|      0|                                                goto finish_force_next;
  150|      0|                                        }
  151|  1.53M|                                        if (!(flags & EXTRACT_RETAIN_SEPARATORS))
  ------------------
  |  Branch (151:45): [True: 1.53M, False: 0]
  ------------------
  152|       |                                                /* Skip additional coalesced separators. */
  153|  3.11M|                                                for (;; (*p)++, c = **p) {
  154|  3.11M|                                                        if (c == 0)
  ------------------
  |  Branch (154:61): [True: 0, False: 3.11M]
  ------------------
  155|      0|                                                                goto finish_force_terminate;
  156|  3.11M|                                                        if (!strchr(separators, c))
  ------------------
  |  Branch (156:61): [True: 1.53M, False: 1.57M]
  ------------------
  157|  1.53M|                                                                break;
  158|  3.11M|                                                }
  159|  1.53M|                                        goto finish;
  160|       |
  161|  1.53M|                                }
  162|       |
  163|  28.5M|                                if (!GREEDY_REALLOC(s, sz+2))
  ------------------
  |  |  139|  28.5M|        greedy_realloc((void**) &(array), (need), sizeof((array)[0]))
  ------------------
  |  Branch (163:37): [True: 0, False: 28.5M]
  ------------------
  164|      0|                                        return -ENOMEM;
  165|       |
  166|  28.5M|                                s[sz++] = c;
  167|       |
  168|  28.5M|                                if (quote != 0)
  ------------------
  |  Branch (168:37): [True: 0, False: 28.5M]
  ------------------
  169|      0|                                        break;
  170|  28.5M|                        }
  171|  2.54M|                }
  172|  2.54M|        }
  173|       |
  174|  1.00M|finish_force_terminate:
  175|  1.00M|        *p = NULL;
  176|  3.30M|finish:
  177|  3.30M|        if (!s) {
  ------------------
  |  Branch (177:13): [True: 766k, False: 2.53M]
  ------------------
  178|   766k|                *p = NULL;
  179|   766k|                *ret = NULL;
  180|   766k|                return 0;
  181|   766k|        }
  182|       |
  183|  2.53M|finish_force_next:
  184|  2.53M|        s[sz] = 0;
  185|  2.53M|        *ret = TAKE_PTR(s);
  ------------------
  |  |  388|  2.53M|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|  2.53M|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|  2.53M|        ({                                                       \
  |  |  |  |  |  |  381|  2.53M|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|  2.53M|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|  2.53M|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|  2.53M|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|  2.53M|                _var_;                                           \
  |  |  |  |  |  |  386|  2.53M|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|       |
  187|  2.53M|        return 1;
  188|  3.30M|}

safe_close:
   56|  3.32k|int safe_close(int fd) {
   57|       |        /*
   58|       |         * Like close_nointr() but cannot fail. Guarantees errno is unchanged. Is a noop for negative fds,
   59|       |         * and returns -EBADF, so that it can be used in this syntax:
   60|       |         *
   61|       |         * fd = safe_close(fd);
   62|       |         */
   63|       |
   64|  3.32k|        if (fd >= 0) {
  ------------------
  |  Branch (64:13): [True: 0, False: 3.32k]
  ------------------
   65|      0|                PROTECT_ERRNO;
  ------------------
  |  |   31|      0|        _cleanup_(_reset_errno_) _unused_ int _saved_errno_ = errno
  |  |  ------------------
  |  |  |  |   78|      0|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
   66|       |
   67|       |                /* The kernel might return pretty much any error code
   68|       |                 * via close(), but the fd will be closed anyway. The
   69|       |                 * only condition we want to check for here is whether
   70|       |                 * the fd was invalid at all... */
   71|       |
   72|      0|                assert_se(close_nointr(fd) != -EBADF);
  ------------------
  |  |   65|      0|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
   73|      0|        }
   74|       |
   75|  3.32k|        return -EBADF;
   76|  3.32k|}
fclose_nointr:
  113|  1.66k|int fclose_nointr(FILE *f) {
  114|  1.66k|        assert(f);
  ------------------
  |  |   72|  1.66k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.66k|        do {                                                            \
  |  |  |  |   59|  1.66k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.66k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.66k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.66k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.66k|        } while (false)
  |  |  ------------------
  ------------------
  115|       |
  116|       |        /* Same as close_nointr(), but for fclose() */
  117|       |
  118|  1.66k|        errno = 0; /* Extra safety: if the FILE* object is not encapsulating an fd, it might not set errno
  119|       |                    * correctly. Let's hence initialize it to zero first, so that we aren't confused by any
  120|       |                    * prior errno here */
  121|  1.66k|        if (fclose(f) == 0)
  ------------------
  |  Branch (121:13): [True: 1.66k, False: 0]
  ------------------
  122|  1.66k|                return 0;
  123|       |
  124|      0|        if (errno == EINTR)
  ------------------
  |  Branch (124:13): [True: 0, False: 0]
  ------------------
  125|      0|                return 0;
  126|       |
  127|      0|        return errno_or_else(EIO);
  128|      0|}
safe_fclose:
  130|  1.66k|FILE* safe_fclose(FILE *f) {
  131|       |
  132|       |        /* Same as safe_close(), but for fclose() */
  133|       |
  134|  1.66k|        if (f) {
  ------------------
  |  Branch (134:13): [True: 1.66k, False: 0]
  ------------------
  135|  1.66k|                PROTECT_ERRNO;
  ------------------
  |  |   31|  1.66k|        _cleanup_(_reset_errno_) _unused_ int _saved_errno_ = errno
  |  |  ------------------
  |  |  |  |   78|  1.66k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  136|       |
  137|  1.66k|                assert_se(fclose_nointr(f) != -EBADF);
  ------------------
  |  |   65|  1.66k|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.66k|        do {                                                            \
  |  |  |  |   59|  1.66k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.66k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.66k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.66k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.66k|        } while (false)
  |  |  ------------------
  ------------------
  138|  1.66k|        }
  139|       |
  140|  1.66k|        return NULL;
  141|  1.66k|}

fuzz-etc-hosts.c:fclosep:
   53|  1.66k|static inline void fclosep(FILE **f) {
   54|  1.66k|        safe_fclose(*f);
   55|  1.66k|}

fmemopen_unlocked:
  109|  1.66k|FILE* fmemopen_unlocked(void *buf, size_t size, const char *mode) {
  110|  1.66k|        FILE *f = fmemopen(buf, size, mode);
  111|  1.66k|        if (!f)
  ------------------
  |  Branch (111:13): [True: 0, False: 1.66k]
  ------------------
  112|      0|                return NULL;
  113|       |
  114|  1.66k|        (void) __fsetlocking(f, FSETLOCKING_BYCALLER);
  115|       |
  116|  1.66k|        return f;
  117|  1.66k|}
read_line_full:
 1442|  1.64M|int read_line_full(FILE *f, size_t limit, ReadLineFlags flags, char **ret) {
 1443|  1.64M|        _cleanup_free_ char *buffer = NULL;
  ------------------
  |  |   82|  1.64M|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  1.64M|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
 1444|  1.64M|        size_t n = 0, count = 0;
 1445|  1.64M|        int r;
 1446|       |
 1447|  1.64M|        assert(f);
  ------------------
  |  |   72|  1.64M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.64M|        do {                                                            \
  |  |  |  |   59|  1.64M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.64M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.64M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.64M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.64M|        } while (false)
  |  |  ------------------
  ------------------
 1448|       |
 1449|       |        /* Something like a bounded version of getline().
 1450|       |         *
 1451|       |         * Considers EOF, \n, \r and \0 end of line delimiters (or combinations of these), and does not include these
 1452|       |         * delimiters in the string returned. Specifically, recognizes the following combinations of markers as line
 1453|       |         * endings:
 1454|       |         *
 1455|       |         *     • \n        (UNIX)
 1456|       |         *     • \r        (old MacOS)
 1457|       |         *     • \0        (C strings)
 1458|       |         *     • \n\0
 1459|       |         *     • \r\0
 1460|       |         *     • \r\n      (Windows)
 1461|       |         *     • \n\r
 1462|       |         *     • \r\n\0
 1463|       |         *     • \n\r\0
 1464|       |         *
 1465|       |         * Returns the number of bytes read from the files (i.e. including delimiters — this hence usually differs from
 1466|       |         * the number of characters in the returned string). When EOF is hit, 0 is returned.
 1467|       |         *
 1468|       |         * The input parameter limit is the maximum numbers of characters in the returned string, i.e. excluding
 1469|       |         * delimiters. If the limit is hit we fail and return -ENOBUFS.
 1470|       |         *
 1471|       |         * If a line shall be skipped ret may be initialized as NULL. */
 1472|       |
 1473|  1.64M|        if (ret) {
  ------------------
  |  Branch (1473:13): [True: 1.64M, False: 0]
  ------------------
 1474|  1.64M|                if (!GREEDY_REALLOC(buffer, 1))
  ------------------
  |  |  139|  1.64M|        greedy_realloc((void**) &(array), (need), sizeof((array)[0]))
  ------------------
  |  Branch (1474:21): [True: 0, False: 1.64M]
  ------------------
 1475|      0|                        return -ENOMEM;
 1476|  1.64M|        }
 1477|       |
 1478|  1.64M|        {
 1479|  1.64M|                _unused_ _cleanup_(funlockfilep) FILE *flocked = f;
  ------------------
  |  |   96|  1.64M|#define _unused_ __attribute__((__unused__))
  ------------------
 1480|  1.64M|                EndOfLineMarker previous_eol = EOL_NONE;
 1481|  1.64M|                flockfile(f);
 1482|       |
 1483|  37.3M|                for (;;) {
 1484|  37.3M|                        EndOfLineMarker eol;
 1485|  37.3M|                        char c;
 1486|       |
 1487|  37.3M|                        if (n >= limit)
  ------------------
  |  Branch (1487:29): [True: 1, False: 37.3M]
  ------------------
 1488|      1|                                return -ENOBUFS;
 1489|       |
 1490|  37.3M|                        if (count >= INT_MAX) /* We couldn't return the counter anymore as "int", hence refuse this */
  ------------------
  |  Branch (1490:29): [True: 0, False: 37.3M]
  ------------------
 1491|      0|                                return -ENOBUFS;
 1492|       |
 1493|  37.3M|                        r = safe_fgetc(f, &c);
 1494|  37.3M|                        if (r < 0)
  ------------------
  |  Branch (1494:29): [True: 0, False: 37.3M]
  ------------------
 1495|      0|                                return r;
 1496|  37.3M|                        if (r == 0) /* EOF is definitely EOL */
  ------------------
  |  Branch (1496:29): [True: 3.32k, False: 37.3M]
  ------------------
 1497|  3.32k|                                break;
 1498|       |
 1499|  37.3M|                        eol = categorize_eol(c, flags);
 1500|       |
 1501|  37.3M|                        if (FLAGS_SET(previous_eol, EOL_ZERO) ||
  ------------------
  |  |  414|  74.6M|        ((~(v) & (flags)) == 0)
  |  |  ------------------
  |  |  |  Branch (414:9): [True: 843k, False: 36.4M]
  |  |  ------------------
  ------------------
 1502|  37.3M|                            (eol == EOL_NONE && previous_eol != EOL_NONE) ||
  ------------------
  |  Branch (1502:30): [True: 34.7M, False: 1.72M]
  |  Branch (1502:49): [True: 783k, False: 33.9M]
  ------------------
 1503|  37.3M|                            (eol != EOL_NONE && (previous_eol & eol) != 0)) {
  ------------------
  |  Branch (1503:30): [True: 1.72M, False: 33.9M]
  |  Branch (1503:49): [True: 18.2k, False: 1.70M]
  ------------------
 1504|       |                                /* Previous char was a NUL? This is not an EOL, but the previous char was? This type of
 1505|       |                                 * EOL marker has been seen right before?  In either of these three cases we are
 1506|       |                                 * done. But first, let's put this character back in the queue. (Note that we have to
 1507|       |                                 * cast this to (unsigned char) here as ungetc() expects a positive 'int', and if we
 1508|       |                                 * are on an architecture where 'char' equals 'signed char' we need to ensure we don't
 1509|       |                                 * pass a negative value here. That said, to complicate things further ungetc() is
 1510|       |                                 * actually happy with most negative characters and implicitly casts them back to
 1511|       |                                 * positive ones as needed, except for \xff (aka -1, aka EOF), which it refuses. What a
 1512|       |                                 * godawful API!) */
 1513|  1.64M|                                assert_se(ungetc((unsigned char) c, f) != EOF);
  ------------------
  |  |   65|  1.64M|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.64M|        do {                                                            \
  |  |  |  |   59|  1.64M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.64M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.64M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.64M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.64M|        } while (false)
  |  |  ------------------
  ------------------
 1514|  1.64M|                                break;
 1515|  1.64M|                        }
 1516|       |
 1517|  35.6M|                        count++;
 1518|       |
 1519|  35.6M|                        if (eol != EOL_NONE) {
  ------------------
  |  Branch (1519:29): [True: 1.70M, False: 33.9M]
  ------------------
 1520|       |                                /* If we are on a tty, we can't shouldn't wait for more input, because that
 1521|       |                                 * generally means waiting for the user, interactively. In the case of a TTY
 1522|       |                                 * we expect only \n as the single EOL marker, so we are in the lucky
 1523|       |                                 * position that there is no need to wait. We check this condition last, to
 1524|       |                                 * avoid isatty() check if not necessary. */
 1525|       |
 1526|  1.70M|                                if ((flags & (READ_LINE_IS_A_TTY|READ_LINE_NOT_A_TTY)) == 0) {
  ------------------
  |  Branch (1526:37): [True: 1.64M, False: 59.4k]
  ------------------
 1527|  1.64M|                                        int fd;
 1528|       |
 1529|  1.64M|                                        fd = fileno(f);
 1530|  1.64M|                                        if (fd < 0) /* Maybe an fmemopen() stream? Handle this gracefully,
  ------------------
  |  Branch (1530:45): [True: 1.64M, False: 0]
  ------------------
 1531|       |                                                     * and don't call isatty() on an invalid fd */
 1532|  1.64M|                                                flags |= READ_LINE_NOT_A_TTY;
 1533|      0|                                        else
 1534|      0|                                                flags |= isatty_safe(fd) ? READ_LINE_IS_A_TTY : READ_LINE_NOT_A_TTY;
  ------------------
  |  Branch (1534:58): [True: 0, False: 0]
  ------------------
 1535|  1.64M|                                }
 1536|  1.70M|                                if (FLAGS_SET(flags, READ_LINE_IS_A_TTY))
  ------------------
  |  |  414|  1.70M|        ((~(v) & (flags)) == 0)
  |  |  ------------------
  |  |  |  Branch (414:9): [True: 0, False: 1.70M]
  |  |  ------------------
  ------------------
 1537|      0|                                        break;
 1538|  1.70M|                        }
 1539|       |
 1540|  35.6M|                        if (eol != EOL_NONE) {
  ------------------
  |  Branch (1540:29): [True: 1.70M, False: 33.9M]
  ------------------
 1541|  1.70M|                                previous_eol |= eol;
 1542|  1.70M|                                continue;
 1543|  1.70M|                        }
 1544|       |
 1545|  33.9M|                        if (ret) {
  ------------------
  |  Branch (1545:29): [True: 33.9M, False: 0]
  ------------------
 1546|  33.9M|                                if (!GREEDY_REALLOC(buffer, n + 2))
  ------------------
  |  |  139|  33.9M|        greedy_realloc((void**) &(array), (need), sizeof((array)[0]))
  ------------------
  |  Branch (1546:37): [True: 0, False: 33.9M]
  ------------------
 1547|      0|                                        return -ENOMEM;
 1548|       |
 1549|  33.9M|                                buffer[n] = c;
 1550|  33.9M|                        }
 1551|       |
 1552|  33.9M|                        n++;
 1553|  33.9M|                }
 1554|  1.64M|        }
 1555|       |
 1556|  1.64M|        if (ret) {
  ------------------
  |  Branch (1556:13): [True: 1.64M, False: 0]
  ------------------
 1557|  1.64M|                buffer[n] = 0;
 1558|       |
 1559|  1.64M|                *ret = TAKE_PTR(buffer);
  ------------------
  |  |  388|  1.64M|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|  1.64M|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|  1.64M|        ({                                                       \
  |  |  |  |  |  |  381|  1.64M|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|  1.64M|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|  1.64M|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|  1.64M|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|  1.64M|                _var_;                                           \
  |  |  |  |  |  |  386|  1.64M|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1560|  1.64M|        }
 1561|       |
 1562|  1.64M|        return (int) count;
 1563|  1.64M|}
safe_fgetc:
 1589|  37.3M|int safe_fgetc(FILE *f, char *ret) {
 1590|  37.3M|        int k;
 1591|       |
 1592|  37.3M|        assert(f);
  ------------------
  |  |   72|  37.3M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  37.3M|        do {                                                            \
  |  |  |  |   59|  37.3M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  37.3M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 37.3M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  37.3M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  37.3M|        } while (false)
  |  |  ------------------
  ------------------
 1593|       |
 1594|       |        /* A safer version of plain fgetc(): let's propagate the error that happened while reading as such, and
 1595|       |         * separate the EOF condition from the byte read, to avoid those confusion signed/unsigned issues fgetc()
 1596|       |         * has. */
 1597|       |
 1598|  37.3M|        errno = 0;
 1599|  37.3M|        k = fgetc(f);
 1600|  37.3M|        if (k == EOF) {
  ------------------
  |  Branch (1600:13): [True: 3.32k, False: 37.3M]
  ------------------
 1601|  3.32k|                if (ferror(f))
  ------------------
  |  Branch (1601:21): [True: 0, False: 3.32k]
  ------------------
 1602|      0|                        return errno_or_else(EIO);
 1603|       |
 1604|  3.32k|                if (ret)
  ------------------
  |  Branch (1604:21): [True: 3.32k, False: 0]
  ------------------
 1605|  3.32k|                        *ret = 0;
 1606|       |
 1607|  3.32k|                return 0;
 1608|  3.32k|        }
 1609|       |
 1610|  37.3M|        if (ret)
  ------------------
  |  Branch (1610:13): [True: 37.3M, False: 0]
  ------------------
 1611|  37.3M|                *ret = k;
 1612|       |
 1613|  37.3M|        return 1;
 1614|  37.3M|}
fileio.c:categorize_eol:
 1425|  37.3M|static EndOfLineMarker categorize_eol(char c, ReadLineFlags flags) {
 1426|       |
 1427|  37.3M|        if (!FLAGS_SET(flags, READ_LINE_ONLY_NUL)) {
  ------------------
  |  |  414|  37.3M|        ((~(v) & (flags)) == 0)
  ------------------
  |  Branch (1427:13): [True: 37.3M, False: 0]
  ------------------
 1428|  37.3M|                if (c == '\n')
  ------------------
  |  Branch (1428:21): [True: 876k, False: 36.4M]
  ------------------
 1429|   876k|                        return EOL_TEN;
 1430|  36.4M|                if (c == '\r')
  ------------------
  |  Branch (1430:21): [True: 2.46k, False: 36.4M]
  ------------------
 1431|  2.46k|                        return EOL_THIRTEEN;
 1432|  36.4M|        }
 1433|       |
 1434|  36.4M|        if (c == '\0')
  ------------------
  |  Branch (1434:13): [True: 1.44M, False: 34.9M]
  ------------------
 1435|  1.44M|                return EOL_ZERO;
 1436|       |
 1437|  34.9M|        return EOL_NONE;
 1438|  36.4M|}

resolved-etc-hosts.c:read_line:
  144|  1.64M|static inline int read_line(FILE *f, size_t limit, char **ret) {
  145|  1.64M|        return read_line_full(f, limit, 0, ret);
  146|  1.64M|}

string_hash_func:
   12|  3.69M|void string_hash_func(const char *p, struct siphash *state) {
   13|  3.69M|        siphash24_compress(p, strlen(p) + 1, state);
   14|  3.69M|}

resolved-etc-hosts.c:__unique_prefix_static_free_wrapper11:
   28|  5.24k|        static void UNIQ_T(wrapper_name, uq)(void *a) {                 \
   29|  5.24k|                type *_a = a;                                           \
   30|  5.24k|                func(_a);                                               \
   31|  5.24k|        }
resolved-etc-hosts.c:__unique_prefix_static_free_wrapper12:
   28|  79.5k|        static void UNIQ_T(wrapper_name, uq)(void *a) {                 \
   29|  79.5k|                type *_a = a;                                           \
   30|  79.5k|                func(_a);                                               \
   31|  79.5k|        }
dns-domain.c:__unique_prefix_static_free_wrapper12:
   28|  1.02M|        static void UNIQ_T(wrapper_name, uq)(void *a) {                 \
   29|  1.02M|                type *_a = a;                                           \
   30|  1.02M|                func(_a);                                               \
   31|  1.02M|        }
in-addr-util.c:__unique_prefix_static_free_wrapper22:
   28|   142k|        static void UNIQ_T(wrapper_name, uq)(void *a) {                 \
   29|   142k|                type *_a = a;                                           \
   30|   142k|                func(_a);                                               \
   31|   142k|        }

_hashmap_iterate:
  708|  12.4k|bool _hashmap_iterate(HashmapBase *h, Iterator *i, void **value, const void **key) {
  709|  12.4k|        struct hashmap_base_entry *e;
  710|  12.4k|        void *data;
  711|  12.4k|        unsigned idx;
  712|       |
  713|  12.4k|        idx = hashmap_iterate_entry(h, i);
  714|  12.4k|        if (idx == IDX_NIL) {
  ------------------
  |  |  111|  12.4k|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (714:13): [True: 2.58k, False: 9.89k]
  ------------------
  715|  2.58k|                if (value)
  ------------------
  |  Branch (715:21): [True: 2.58k, False: 0]
  ------------------
  716|  2.58k|                        *value = NULL;
  717|  2.58k|                if (key)
  ------------------
  |  Branch (717:21): [True: 0, False: 2.58k]
  ------------------
  718|      0|                        *key = NULL;
  719|       |
  720|  2.58k|                return false;
  721|  2.58k|        }
  722|       |
  723|  9.89k|        e = bucket_at(h, idx);
  724|  9.89k|        data = entry_value(h, e);
  725|  9.89k|        if (value)
  ------------------
  |  Branch (725:13): [True: 9.89k, False: 0]
  ------------------
  726|  9.89k|                *value = data;
  727|  9.89k|        if (key)
  ------------------
  |  Branch (727:13): [True: 0, False: 9.89k]
  ------------------
  728|      0|                *key = e->key;
  729|       |
  730|  9.89k|        return true;
  731|  12.4k|}
hashmap_ensure_allocated:
  835|  87.1k|int hashmap_ensure_allocated(Hashmap **h, const struct hash_ops *hash_ops) {
  836|  87.1k|        return hashmap_base_ensure_allocated((HashmapBase**)h, hash_ops, HASHMAP_TYPE_PLAIN);
  837|  87.1k|}
set_ensure_allocated:
  843|  1.60M|int set_ensure_allocated(Set **s, const struct hash_ops *hash_ops) {
  844|  1.60M|        return hashmap_base_ensure_allocated((HashmapBase**)s, hash_ops, HASHMAP_TYPE_SET);
  845|  1.60M|}
hashmap_ensure_put:
  847|  87.1k|int hashmap_ensure_put(Hashmap **h, const struct hash_ops *hash_ops, const void *key, void *value) {
  848|  87.1k|        int r;
  849|       |
  850|  87.1k|        r = hashmap_ensure_allocated(h, hash_ops);
  851|  87.1k|        if (r < 0)
  ------------------
  |  Branch (851:13): [True: 0, False: 87.1k]
  ------------------
  852|      0|                return r;
  853|       |
  854|  87.1k|        return hashmap_put(*h, key, value);
  855|  87.1k|}
_hashmap_free:
  905|   102k|HashmapBase* _hashmap_free(HashmapBase *h) {
  906|   102k|        if (h) {
  ------------------
  |  Branch (906:13): [True: 87.4k, False: 14.6k]
  ------------------
  907|  87.4k|                _hashmap_clear(h);
  908|  87.4k|                hashmap_free_no_clear(h);
  909|  87.4k|        }
  910|       |
  911|   102k|        return NULL;
  912|   102k|}
_hashmap_clear:
  914|  87.4k|void _hashmap_clear(HashmapBase *h) {
  915|  87.4k|        if (!h)
  ------------------
  |  Branch (915:13): [True: 0, False: 87.4k]
  ------------------
  916|      0|                return;
  917|       |
  918|  87.4k|        if (h->hash_ops->free_key || h->hash_ops->free_value) {
  ------------------
  |  Branch (918:13): [True: 85.4k, False: 2.02k]
  |  Branch (918:38): [True: 2.02k, False: 0]
  ------------------
  919|       |
  920|       |                /* If destructor calls are defined, let's destroy things defensively: let's take the item out of the
  921|       |                 * hash table, and only then call the destructor functions. If these destructors then try to unregister
  922|       |                 * themselves from our hash table a second time, the entry is already gone. */
  923|       |
  924|  1.21M|                while (_hashmap_size(h) > 0) {
  ------------------
  |  Branch (924:24): [True: 1.12M, False: 87.4k]
  ------------------
  925|  1.12M|                        void *k = NULL;
  926|  1.12M|                        void *v;
  927|       |
  928|  1.12M|                        v = _hashmap_first_key_and_value(h, true, &k);
  929|       |
  930|  1.12M|                        if (h->hash_ops->free_key)
  ------------------
  |  Branch (930:29): [True: 1.04M, False: 84.8k]
  ------------------
  931|  1.04M|                                h->hash_ops->free_key(k);
  932|       |
  933|  1.12M|                        if (h->hash_ops->free_value)
  ------------------
  |  Branch (933:29): [True: 84.8k, False: 1.04M]
  ------------------
  934|  84.8k|                                h->hash_ops->free_value(v);
  935|  1.12M|                }
  936|  87.4k|        }
  937|       |
  938|  87.4k|        if (h->has_indirect) {
  ------------------
  |  Branch (938:13): [True: 8.03k, False: 79.4k]
  ------------------
  939|  8.03k|                free(h->indirect.storage);
  940|  8.03k|                h->has_indirect = false;
  941|  8.03k|        }
  942|       |
  943|  87.4k|        h->n_direct_entries = 0;
  944|  87.4k|        reset_direct_storage(h);
  945|       |
  946|  87.4k|        if (h->type == HASHMAP_TYPE_ORDERED) {
  ------------------
  |  Branch (946:13): [True: 0, False: 87.4k]
  ------------------
  947|      0|                OrderedHashmap *lh = (OrderedHashmap*) h;
  948|      0|                lh->iterate_list_head = lh->iterate_list_tail = IDX_NIL;
  ------------------
  |  |  111|      0|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  949|      0|        }
  950|       |
  951|  87.4k|        base_set_dirty(h);
  952|  87.4k|}
hashmap_put:
 1243|  87.1k|int hashmap_put(Hashmap *h, const void *key, void *value) {
 1244|  87.1k|        struct swap_entries swap;
 1245|  87.1k|        struct plain_hashmap_entry *e;
 1246|  87.1k|        unsigned hash, idx;
 1247|       |
 1248|  87.1k|        assert(h);
  ------------------
  |  |   72|  87.1k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  87.1k|        do {                                                            \
  |  |  |  |   59|  87.1k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  87.1k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 87.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  87.1k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  87.1k|        } while (false)
  |  |  ------------------
  ------------------
 1249|       |
 1250|  87.1k|        hash = bucket_hash(h, key);
  ------------------
  |  |  347|  87.1k|#define bucket_hash(h, p) base_bucket_hash(HASHMAP_BASE(h), p)
  |  |  ------------------
  |  |  |  |   46|  87.1k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  87.1k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  87.1k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  87.1k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  87.1k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|  87.1k|                (HashmapBase*)(h), \
  |  |  |  |   48|  87.1k|                (void)0)
  |  |  ------------------
  ------------------
 1251|  87.1k|        idx = bucket_scan(h, hash, key);
  ------------------
  |  | 1241|  87.1k|#define bucket_scan(h, idx, key) base_bucket_scan(HASHMAP_BASE(h), idx, key)
  |  |  ------------------
  |  |  |  |   46|  87.1k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  87.1k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  87.1k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  87.1k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  87.1k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|  87.1k|                (HashmapBase*)(h), \
  |  |  |  |   48|  87.1k|                (void)0)
  |  |  ------------------
  ------------------
 1252|  87.1k|        if (idx != IDX_NIL) {
  ------------------
  |  |  111|  87.1k|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (1252:13): [True: 0, False: 87.1k]
  ------------------
 1253|      0|                e = plain_bucket_at(h, idx);
 1254|      0|                if (e->value == value)
  ------------------
  |  Branch (1254:21): [True: 0, False: 0]
  ------------------
 1255|      0|                        return 0;
 1256|      0|                return -EEXIST;
 1257|      0|        }
 1258|       |
 1259|  87.1k|        e = &bucket_at_swap(&swap, IDX_PUT)->p;
  ------------------
  |  |  106|  87.1k|#define IDX_PUT             (_IDX_SWAP_BEGIN + 0)
  |  |  ------------------
  |  |  |  |  105|  87.1k|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
 1260|  87.1k|        e->b.key = key;
 1261|  87.1k|        e->value = value;
 1262|  87.1k|        return hashmap_put_boldly(h, hash, &swap, true);
  ------------------
  |  | 1072|  87.1k|        hashmap_base_put_boldly(HASHMAP_BASE(h), idx, swap, may_resize)
  |  |  ------------------
  |  |  |  |   46|  87.1k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  87.1k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  87.1k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  87.1k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  87.1k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|  87.1k|                (HashmapBase*)(h), \
  |  |  |  |   48|  87.1k|                (void)0)
  |  |  ------------------
  ------------------
 1263|  87.1k|}
set_put:
 1265|  1.60M|int set_put(Set *s, const void *key) {
 1266|  1.60M|        struct swap_entries swap;
 1267|  1.60M|        struct hashmap_base_entry *e;
 1268|  1.60M|        unsigned hash, idx;
 1269|       |
 1270|  1.60M|        assert(s);
  ------------------
  |  |   72|  1.60M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.60M|        do {                                                            \
  |  |  |  |   59|  1.60M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.60M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.60M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.60M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.60M|        } while (false)
  |  |  ------------------
  ------------------
 1271|       |
 1272|  1.60M|        hash = bucket_hash(s, key);
  ------------------
  |  |  347|  1.60M|#define bucket_hash(h, p) base_bucket_hash(HASHMAP_BASE(h), p)
  |  |  ------------------
  |  |  |  |   46|  1.60M|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.60M|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  1.60M|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  1.60M|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.60M|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|  1.60M|                (HashmapBase*)(h), \
  |  |  |  |   48|  1.60M|                (void)0)
  |  |  ------------------
  ------------------
 1273|  1.60M|        idx = bucket_scan(s, hash, key);
  ------------------
  |  | 1241|  1.60M|#define bucket_scan(h, idx, key) base_bucket_scan(HASHMAP_BASE(h), idx, key)
  |  |  ------------------
  |  |  |  |   46|  1.60M|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.60M|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  1.60M|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  1.60M|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.60M|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|  1.60M|                (HashmapBase*)(h), \
  |  |  |  |   48|  1.60M|                (void)0)
  |  |  ------------------
  ------------------
 1274|  1.60M|        if (idx != IDX_NIL)
  ------------------
  |  |  111|  1.60M|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (1274:13): [True: 561k, False: 1.04M]
  ------------------
 1275|   561k|                return 0;
 1276|       |
 1277|  1.04M|        e = &bucket_at_swap(&swap, IDX_PUT)->p.b;
  ------------------
  |  |  106|  1.04M|#define IDX_PUT             (_IDX_SWAP_BEGIN + 0)
  |  |  ------------------
  |  |  |  |  105|  1.04M|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
 1278|  1.04M|        e->key = key;
 1279|  1.04M|        return hashmap_put_boldly(s, hash, &swap, true);
  ------------------
  |  | 1072|  1.04M|        hashmap_base_put_boldly(HASHMAP_BASE(h), idx, swap, may_resize)
  |  |  ------------------
  |  |  |  |   46|  1.04M|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.04M|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  1.04M|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  1.04M|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.04M|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|  1.04M|                (HashmapBase*)(h), \
  |  |  |  |   48|  1.04M|                (void)0)
  |  |  ------------------
  ------------------
 1280|  1.60M|}
set_ensure_put:
 1282|  1.60M|int set_ensure_put(Set **s, const struct hash_ops *hash_ops, const void *key) {
 1283|  1.60M|        int r;
 1284|       |
 1285|  1.60M|        r = set_ensure_allocated(s, hash_ops);
 1286|  1.60M|        if (r < 0)
  ------------------
  |  Branch (1286:13): [True: 0, False: 1.60M]
  ------------------
 1287|      0|                return r;
 1288|       |
 1289|  1.60M|        return set_put(*s, key);
 1290|  1.60M|}
set_ensure_consume:
 1292|  1.02M|int set_ensure_consume(Set **s, const struct hash_ops *hash_ops, void *key) {
 1293|  1.02M|        int r;
 1294|       |
 1295|  1.02M|        r = set_ensure_put(s, hash_ops, key);
 1296|  1.02M|        if (r <= 0) {
  ------------------
  |  Branch (1296:13): [True: 118k, False: 902k]
  ------------------
 1297|   118k|                if (hash_ops && hash_ops->free_key)
  ------------------
  |  Branch (1297:21): [True: 118k, False: 0]
  |  Branch (1297:33): [True: 118k, False: 0]
  ------------------
 1298|   118k|                        hash_ops->free_key(key);
 1299|      0|                else
 1300|      0|                        free(key);
 1301|   118k|        }
 1302|       |
 1303|  1.02M|        return r;
 1304|  1.02M|}
_hashmap_get:
 1358|   625k|void* _hashmap_get(HashmapBase *h, const void *key) {
 1359|   625k|        struct hashmap_base_entry *e;
 1360|   625k|        unsigned hash, idx;
 1361|       |
 1362|   625k|        if (!h)
  ------------------
  |  Branch (1362:13): [True: 3.17k, False: 622k]
  ------------------
 1363|  3.17k|                return NULL;
 1364|       |
 1365|   622k|        hash = bucket_hash(h, key);
  ------------------
  |  |  347|   622k|#define bucket_hash(h, p) base_bucket_hash(HASHMAP_BASE(h), p)
  |  |  ------------------
  |  |  |  |   46|   622k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   622k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|   622k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   622k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   622k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|   622k|                (HashmapBase*)(h), \
  |  |  |  |   48|   622k|                (void)0)
  |  |  ------------------
  ------------------
 1366|   622k|        idx = bucket_scan(h, hash, key);
  ------------------
  |  | 1241|   622k|#define bucket_scan(h, idx, key) base_bucket_scan(HASHMAP_BASE(h), idx, key)
  |  |  ------------------
  |  |  |  |   46|   622k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   622k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|   622k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   622k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   622k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|   622k|                (HashmapBase*)(h), \
  |  |  |  |   48|   622k|                (void)0)
  |  |  ------------------
  ------------------
 1367|   622k|        if (idx == IDX_NIL)
  ------------------
  |  |  111|   622k|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (1367:13): [True: 86.5k, False: 536k]
  ------------------
 1368|  86.5k|                return NULL;
 1369|       |
 1370|   536k|        e = bucket_at(h, idx);
 1371|   536k|        return entry_value(h, e);
 1372|   622k|}
_hashmap_contains:
 1393|   585k|bool _hashmap_contains(HashmapBase *h, const void *key) {
 1394|   585k|        unsigned hash;
 1395|       |
 1396|   585k|        if (!h)
  ------------------
  |  Branch (1396:13): [True: 81.6k, False: 504k]
  ------------------
 1397|  81.6k|                return false;
 1398|       |
 1399|   504k|        hash = bucket_hash(h, key);
  ------------------
  |  |  347|   504k|#define bucket_hash(h, p) base_bucket_hash(HASHMAP_BASE(h), p)
  |  |  ------------------
  |  |  |  |   46|   504k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   504k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|   504k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   504k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   504k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|   504k|                (HashmapBase*)(h), \
  |  |  |  |   48|   504k|                (void)0)
  |  |  ------------------
  ------------------
 1400|   504k|        return bucket_scan(h, hash, key) != IDX_NIL;
  ------------------
  |  | 1241|   504k|#define bucket_scan(h, idx, key) base_bucket_scan(HASHMAP_BASE(h), idx, key)
  |  |  ------------------
  |  |  |  |   46|   504k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   504k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|   504k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   504k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   504k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|   504k|                (HashmapBase*)(h), \
  |  |  |  |   48|   504k|                (void)0)
  |  |  ------------------
  ------------------
                      return bucket_scan(h, hash, key) != IDX_NIL;
  ------------------
  |  |  111|   504k|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
 1401|   585k|}
_hashmap_remove:
 1403|  2.52k|void* _hashmap_remove(HashmapBase *h, const void *key) {
 1404|  2.52k|        struct hashmap_base_entry *e;
 1405|  2.52k|        unsigned hash, idx;
 1406|  2.52k|        void *data;
 1407|       |
 1408|  2.52k|        if (!h)
  ------------------
  |  Branch (1408:13): [True: 0, False: 2.52k]
  ------------------
 1409|      0|                return NULL;
 1410|       |
 1411|  2.52k|        hash = bucket_hash(h, key);
  ------------------
  |  |  347|  2.52k|#define bucket_hash(h, p) base_bucket_hash(HASHMAP_BASE(h), p)
  |  |  ------------------
  |  |  |  |   46|  2.52k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  2.52k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  2.52k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  2.52k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  2.52k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|  2.52k|                (HashmapBase*)(h), \
  |  |  |  |   48|  2.52k|                (void)0)
  |  |  ------------------
  ------------------
 1412|  2.52k|        idx = bucket_scan(h, hash, key);
  ------------------
  |  | 1241|  2.52k|#define bucket_scan(h, idx, key) base_bucket_scan(HASHMAP_BASE(h), idx, key)
  |  |  ------------------
  |  |  |  |   46|  2.52k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  2.52k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  2.52k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  2.52k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  2.52k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|  2.52k|                (HashmapBase*)(h), \
  |  |  |  |   48|  2.52k|                (void)0)
  |  |  ------------------
  ------------------
 1413|  2.52k|        if (idx == IDX_NIL)
  ------------------
  |  |  111|  2.52k|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (1413:13): [True: 251, False: 2.27k]
  ------------------
 1414|    251|                return NULL;
 1415|       |
 1416|  2.27k|        e = bucket_at(h, idx);
 1417|  2.27k|        data = entry_value(h, e);
 1418|  2.27k|        remove_entry(h, idx);
  ------------------
  |  |  574|  2.27k|#define remove_entry(h, idx) base_remove_entry(HASHMAP_BASE(h), idx)
  |  |  ------------------
  |  |  |  |   46|  2.27k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  2.27k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  2.27k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  2.27k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  2.27k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|  2.27k|                (HashmapBase*)(h), \
  |  |  |  |   48|  2.27k|                (void)0)
  |  |  ------------------
  ------------------
 1419|       |
 1420|  2.27k|        return data;
 1421|  2.52k|}
_hashmap_first_key_and_value:
 1571|  1.12M|void* _hashmap_first_key_and_value(HashmapBase *h, bool remove, void **ret_key) {
 1572|  1.12M|        struct hashmap_base_entry *e;
 1573|  1.12M|        void *key, *data;
 1574|  1.12M|        unsigned idx;
 1575|       |
 1576|  1.12M|        idx = find_first_entry(h);
 1577|  1.12M|        if (idx == IDX_NIL) {
  ------------------
  |  |  111|  1.12M|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (1577:13): [True: 0, False: 1.12M]
  ------------------
 1578|      0|                if (ret_key)
  ------------------
  |  Branch (1578:21): [True: 0, False: 0]
  ------------------
 1579|      0|                        *ret_key = NULL;
 1580|      0|                return NULL;
 1581|      0|        }
 1582|       |
 1583|  1.12M|        e = bucket_at(h, idx);
 1584|  1.12M|        key = (void*) e->key;
 1585|  1.12M|        data = entry_value(h, e);
 1586|       |
 1587|  1.12M|        if (remove)
  ------------------
  |  Branch (1587:13): [True: 1.12M, False: 0]
  ------------------
 1588|  1.12M|                remove_entry(h, idx);
  ------------------
  |  |  574|  1.12M|#define remove_entry(h, idx) base_remove_entry(HASHMAP_BASE(h), idx)
  |  |  ------------------
  |  |  |  |   46|  1.12M|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.12M|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  1.12M|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  1.12M|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.12M|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|  1.12M|                (HashmapBase*)(h), \
  |  |  |  |   48|  1.12M|                (void)0)
  |  |  ------------------
  ------------------
 1589|       |
 1590|  1.12M|        if (ret_key)
  ------------------
  |  Branch (1590:13): [True: 1.12M, False: 0]
  ------------------
 1591|  1.12M|                *ret_key = key;
 1592|       |
 1593|  1.12M|        return data;
 1594|  1.12M|}
_hashmap_size:
 1596|  1.21M|unsigned _hashmap_size(HashmapBase *h) {
 1597|  1.21M|        if (!h)
  ------------------
  |  Branch (1597:13): [True: 0, False: 1.21M]
  ------------------
 1598|      0|                return 0;
 1599|       |
 1600|  1.21M|        return n_entries(h);
 1601|  1.21M|}
hashmap.c:hashmap_iterate_entry:
  682|  1.14M|static unsigned hashmap_iterate_entry(HashmapBase *h, Iterator *i) {
  683|  1.14M|        if (!h) {
  ------------------
  |  Branch (683:13): [True: 111, False: 1.14M]
  ------------------
  684|    111|                i->idx = IDX_NIL;
  ------------------
  |  |  111|    111|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  685|    111|                return IDX_NIL;
  ------------------
  |  |  111|    111|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  686|    111|        }
  687|       |
  688|       |#if ENABLE_DEBUG_HASHMAP
  689|       |        if (i->idx == IDX_FIRST) {
  690|       |                i->put_count = h->debug.put_count;
  691|       |                i->rem_count = h->debug.rem_count;
  692|       |        } else {
  693|       |                /* While iterating, must not add any new entries */
  694|       |                assert(i->put_count == h->debug.put_count);
  695|       |                /* ... or remove entries other than the current one */
  696|       |                assert(i->rem_count == h->debug.rem_count ||
  697|       |                       (i->rem_count == h->debug.rem_count - 1 &&
  698|       |                        i->prev_idx == h->debug.last_rem_idx));
  699|       |                /* Reset our removals counter */
  700|       |                i->rem_count = h->debug.rem_count;
  701|       |        }
  702|       |#endif
  703|       |
  704|  1.14M|        return h->type == HASHMAP_TYPE_ORDERED ? hashmap_iterate_in_insertion_order((OrderedHashmap*) h, i)
  ------------------
  |  Branch (704:16): [True: 0, False: 1.14M]
  ------------------
  705|  1.14M|                                               : hashmap_iterate_in_internal_order(h, i);
  706|  1.14M|}
hashmap.c:hashmap_iterate_in_internal_order:
  627|  1.14M|static unsigned hashmap_iterate_in_internal_order(HashmapBase *h, Iterator *i) {
  628|  1.14M|        unsigned idx;
  629|       |
  630|  1.14M|        assert(h);
  ------------------
  |  |   72|  1.14M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.14M|        do {                                                            \
  |  |  |  |   59|  1.14M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.14M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.14M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.14M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.14M|        } while (false)
  |  |  ------------------
  ------------------
  631|  1.14M|        assert(i);
  ------------------
  |  |   72|  1.14M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.14M|        do {                                                            \
  |  |  |  |   59|  1.14M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.14M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.14M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.14M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.14M|        } while (false)
  |  |  ------------------
  ------------------
  632|       |
  633|  1.14M|        if (i->idx == IDX_NIL)
  ------------------
  |  |  111|  1.14M|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (633:13): [True: 2.47k, False: 1.13M]
  ------------------
  634|  2.47k|                goto at_end;
  635|       |
  636|  1.13M|        if (i->idx == IDX_FIRST) {
  ------------------
  |  |  110|  1.13M|#define IDX_FIRST           (UINT_MAX - 1) /* special index for freshly initialized iterators */
  ------------------
  |  Branch (636:13): [True: 1.13M, False: 6.83k]
  ------------------
  637|       |                /* fast forward to the first occupied bucket */
  638|  1.13M|                if (h->has_indirect) {
  ------------------
  |  Branch (638:21): [True: 1.02M, False: 105k]
  ------------------
  639|  1.02M|                        i->idx = skip_free_buckets(h, h->indirect.idx_lowest_entry);
  640|  1.02M|                        h->indirect.idx_lowest_entry = i->idx;
  641|  1.02M|                } else
  642|   105k|                        i->idx = skip_free_buckets(h, 0);
  643|       |
  644|  1.13M|                if (i->idx == IDX_NIL)
  ------------------
  |  |  111|  1.13M|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (644:21): [True: 0, False: 1.13M]
  ------------------
  645|      0|                        goto at_end;
  646|  1.13M|        } else {
  647|  6.83k|                struct hashmap_base_entry *e;
  648|       |
  649|  6.83k|                assert(i->idx > 0);
  ------------------
  |  |   72|  6.83k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  6.83k|        do {                                                            \
  |  |  |  |   59|  6.83k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  6.83k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 6.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  6.83k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  6.83k|        } while (false)
  |  |  ------------------
  ------------------
  650|       |
  651|  6.83k|                e = bucket_at(h, i->idx);
  652|       |                /*
  653|       |                 * We allow removing the current entry while iterating, but removal may cause
  654|       |                 * a backward shift. The next entry may thus move one bucket to the left.
  655|       |                 * To detect when it happens, we remember the key pointer of the entry we were
  656|       |                 * going to iterate next. If it does not match, there was a backward shift.
  657|       |                 */
  658|  6.83k|                if (e->key != i->next_key)
  ------------------
  |  Branch (658:21): [True: 0, False: 6.83k]
  ------------------
  659|      0|                        e = bucket_at(h, --i->idx);
  660|       |
  661|  6.83k|                assert(e->key == i->next_key);
  ------------------
  |  |   72|  6.83k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  6.83k|        do {                                                            \
  |  |  |  |   59|  6.83k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  6.83k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 6.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  6.83k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  6.83k|        } while (false)
  |  |  ------------------
  ------------------
  662|  6.83k|        }
  663|       |
  664|  1.13M|        idx = i->idx;
  665|       |#if ENABLE_DEBUG_HASHMAP
  666|       |        i->prev_idx = idx;
  667|       |#endif
  668|       |
  669|  1.13M|        i->idx = skip_free_buckets(h, i->idx + 1);
  670|  1.13M|        if (i->idx != IDX_NIL)
  ------------------
  |  |  111|  1.13M|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (670:13): [True: 1.04M, False: 89.9k]
  ------------------
  671|  1.04M|                i->next_key = bucket_at(h, i->idx)->key;
  672|  89.9k|        else
  673|  89.9k|                i->idx = IDX_NIL;
  ------------------
  |  |  111|  89.9k|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  674|       |
  675|  1.13M|        return idx;
  676|       |
  677|  2.47k|at_end:
  678|  2.47k|        i->idx = IDX_NIL;
  ------------------
  |  |  111|  2.47k|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  679|  2.47k|        return IDX_NIL;
  ------------------
  |  |  111|  2.47k|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  680|  1.13M|}
hashmap.c:skip_free_buckets:
  445|  2.27M|static unsigned skip_free_buckets(HashmapBase *h, unsigned idx) {
  446|  2.27M|        dib_raw_t *dibs;
  447|       |
  448|  2.27M|        dibs = dib_raw_ptr(h);
  449|       |
  450|  5.81M|        for ( ; idx < n_buckets(h); idx++)
  ------------------
  |  Branch (450:17): [True: 5.72M, False: 89.9k]
  ------------------
  451|  5.72M|                if (dibs[idx] != DIB_RAW_FREE)
  ------------------
  |  |  126|  5.72M|#define DIB_RAW_FREE     ((dib_raw_t)0xffU)   /* a free bucket */
  ------------------
  |  Branch (451:21): [True: 2.18M, False: 3.54M]
  ------------------
  452|  2.18M|                        return idx;
  453|       |
  454|  89.9k|        return IDX_NIL;
  ------------------
  |  |  111|  89.9k|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  455|  2.27M|}
hashmap.c:dib_raw_ptr:
  408|  14.9M|static dib_raw_t* dib_raw_ptr(HashmapBase *h) {
  409|  14.9M|        return (dib_raw_t*)
  410|  14.9M|                ((uint8_t*) storage_ptr(h) + hashmap_type_info[h->type].entry_size * n_buckets(h));
  411|  14.9M|}
hashmap.c:storage_ptr:
  325|  32.5M|static void* storage_ptr(HashmapBase *h) {
  326|  32.5M|        return h->has_indirect ? h->indirect.storage
  ------------------
  |  Branch (326:16): [True: 30.0M, False: 2.52M]
  ------------------
  327|  32.5M|                               : h->direct.storage;
  328|  32.5M|}
hashmap.c:bucket_at:
  373|  17.5M|static struct hashmap_base_entry* bucket_at(HashmapBase *h, unsigned idx) {
  374|  17.5M|        return CAST_ALIGN_PTR(
  ------------------
  |  |  146|  17.5M|        ({                                                      \
  |  |  147|  17.5M|                const void *_p = (p);                           \
  |  |  148|  17.5M|                assert(((uintptr_t) _p) % alignof(t) == 0); \
  |  |  ------------------
  |  |  |  |   72|  17.5M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  ------------------
  |  |  |  |  |  |   58|  17.5M|        do {                                                            \
  |  |  |  |  |  |   59|  17.5M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   95|  17.5M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 17.5M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  17.5M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   61|  17.5M|        } while (false)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  149|  17.5M|                (t *) _p;                                       \
  |  |  150|  17.5M|        })
  ------------------
  375|  17.5M|                        struct hashmap_base_entry,
  376|  17.5M|                        (uint8_t *) storage_ptr(h) + idx * hashmap_type_info[h->type].entry_size);
  377|  17.5M|}
hashmap.c:entry_value:
  506|  1.67M|static void* entry_value(HashmapBase *h, struct hashmap_base_entry *e) {
  507|  1.67M|        switch (h->type) {
  508|       |
  509|   623k|        case HASHMAP_TYPE_PLAIN:
  ------------------
  |  Branch (509:9): [True: 623k, False: 1.05M]
  ------------------
  510|   623k|        case HASHMAP_TYPE_ORDERED:
  ------------------
  |  Branch (510:9): [True: 0, False: 1.67M]
  ------------------
  511|   623k|                return ((struct plain_hashmap_entry*)e)->value;
  512|       |
  513|  1.05M|        case HASHMAP_TYPE_SET:
  ------------------
  |  Branch (513:9): [True: 1.05M, False: 623k]
  ------------------
  514|  1.05M|                return (void*) e->key;
  515|       |
  516|      0|        default:
  ------------------
  |  Branch (516:9): [True: 0, False: 1.67M]
  ------------------
  517|      0|                assert_not_reached();
  ------------------
  |  |   76|      0|        log_assert_failed_unreachable(PROJECT_FILE, __LINE__, __func__)
  |  |  ------------------
  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  ------------------
  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  518|  1.67M|        }
  519|  1.67M|}
hashmap.c:hashmap_base_new:
  771|  87.4k|static struct HashmapBase* hashmap_base_new(const struct hash_ops *hash_ops, enum HashmapType type) {
  772|  87.4k|        HashmapBase *h;
  773|  87.4k|        const struct hashmap_type_info *hi = &hashmap_type_info[type];
  774|       |
  775|  87.4k|        bool use_pool = mempool_enabled && mempool_enabled();  /* mempool_enabled is a weak symbol */
  ------------------
  |  Branch (775:25): [True: 87.4k, False: 0]
  |  Branch (775:44): [True: 87.4k, False: 0]
  ------------------
  776|       |
  777|  87.4k|        h = use_pool ? mempool_alloc0_tile(hi->mempool) : malloc0(hi->head_size);
  ------------------
  |  |   46|  87.4k|#define malloc0(n) (calloc(1, (n) ?: 1))
  |  |  ------------------
  |  |  |  Branch (46:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (777:13): [True: 87.4k, False: 0]
  ------------------
  778|  87.4k|        if (!h)
  ------------------
  |  Branch (778:13): [True: 0, False: 87.4k]
  ------------------
  779|      0|                return NULL;
  780|       |
  781|  87.4k|        h->type = type;
  782|  87.4k|        h->from_pool = use_pool;
  783|  87.4k|        h->hash_ops = hash_ops ?: &trivial_hash_ops;
  ------------------
  |  Branch (783:23): [True: 87.4k, False: 0]
  ------------------
  784|       |
  785|  87.4k|        if (type == HASHMAP_TYPE_ORDERED) {
  ------------------
  |  Branch (785:13): [True: 0, False: 0]
  ------------------
  786|      0|                OrderedHashmap *lh = (OrderedHashmap*)h;
  787|      0|                lh->iterate_list_head = lh->iterate_list_tail = IDX_NIL;
  ------------------
  |  |  111|      0|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  788|      0|        }
  789|       |
  790|      0|        reset_direct_storage(h);
  791|       |
  792|      0|        static pthread_once_t once = PTHREAD_ONCE_INIT;
  793|      0|        assert_se(pthread_once(&once, shared_hash_key_initialize) == 0);
  ------------------
  |  |   65|      0|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
  794|       |
  795|       |#if ENABLE_DEBUG_HASHMAP
  796|       |        assert_se(pthread_mutex_lock(&hashmap_debug_list_mutex) == 0);
  797|       |        LIST_PREPEND(debug_list, hashmap_debug_list, &h->debug);
  798|       |        assert_se(pthread_mutex_unlock(&hashmap_debug_list_mutex) == 0);
  799|       |#endif
  800|       |
  801|      0|        return h;
  802|  87.4k|}
hashmap.c:shared_hash_key_initialize:
  767|      1|static void shared_hash_key_initialize(void) {
  768|      1|        random_bytes(shared_hash_key, sizeof(shared_hash_key));
  769|      1|}
hashmap.c:hashmap_base_ensure_allocated:
  817|  1.69M|                                         enum HashmapType type) {
  818|  1.69M|        HashmapBase *q;
  819|       |
  820|  1.69M|        assert(h);
  ------------------
  |  |   72|  1.69M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.69M|        do {                                                            \
  |  |  |  |   59|  1.69M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.69M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.69M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.69M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.69M|        } while (false)
  |  |  ------------------
  ------------------
  821|       |
  822|  1.69M|        if (*h) {
  ------------------
  |  Branch (822:13): [True: 1.60M, False: 87.4k]
  ------------------
  823|  1.60M|                assert((*h)->hash_ops == (hash_ops ?: &trivial_hash_ops));
  ------------------
  |  |   72|  1.60M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.60M|        do {                                                            \
  |  |  |  |   59|  1.60M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.60M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.60M]
  |  |  |  |  |  |  |  Branch (95:44): [True: 1.60M, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.60M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.60M|        } while (false)
  |  |  ------------------
  ------------------
  824|  1.60M|                return 0;
  825|  1.60M|        }
  826|       |
  827|  87.4k|        q = hashmap_base_new(hash_ops, type);
  828|  87.4k|        if (!q)
  ------------------
  |  Branch (828:13): [True: 0, False: 87.4k]
  ------------------
  829|      0|                return -ENOMEM;
  830|       |
  831|  87.4k|        *h = q;
  832|  87.4k|        return 1;
  833|  87.4k|}
hashmap.c:hashmap_free_no_clear:
  887|  87.4k|static void hashmap_free_no_clear(HashmapBase *h) {
  888|  87.4k|        assert(!h->has_indirect);
  ------------------
  |  |   72|  87.4k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  87.4k|        do {                                                            \
  |  |  |  |   59|  87.4k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  87.4k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 87.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  87.4k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  87.4k|        } while (false)
  |  |  ------------------
  ------------------
  889|  87.4k|        assert(h->n_direct_entries == 0);
  ------------------
  |  |   72|  87.4k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  87.4k|        do {                                                            \
  |  |  |  |   59|  87.4k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  87.4k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 87.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  87.4k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  87.4k|        } while (false)
  |  |  ------------------
  ------------------
  890|       |
  891|       |#if ENABLE_DEBUG_HASHMAP
  892|       |        assert_se(pthread_mutex_lock(&hashmap_debug_list_mutex) == 0);
  893|       |        LIST_REMOVE(debug_list, hashmap_debug_list, &h->debug);
  894|       |        assert_se(pthread_mutex_unlock(&hashmap_debug_list_mutex) == 0);
  895|       |#endif
  896|       |
  897|  87.4k|        if (h->from_pool) {
  ------------------
  |  Branch (897:13): [True: 87.4k, False: 0]
  ------------------
  898|       |                /* Ensure that the object didn't get migrated between threads. */
  899|  87.4k|                assert_se(is_main_thread());
  ------------------
  |  |   65|  87.4k|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  87.4k|        do {                                                            \
  |  |  |  |   59|  87.4k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  87.4k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 87.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  87.4k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  87.4k|        } while (false)
  |  |  ------------------
  ------------------
  900|  87.4k|                mempool_free_tile(hashmap_type_info[h->type].mempool, h);
  901|  87.4k|        } else
  902|      0|                free(h);
  903|  87.4k|}
hashmap.c:reset_direct_storage:
  757|   174k|static void reset_direct_storage(HashmapBase *h) {
  758|   174k|        const struct hashmap_type_info *hi = &hashmap_type_info[h->type];
  759|   174k|        void *p;
  760|       |
  761|   174k|        assert(!h->has_indirect);
  ------------------
  |  |   72|   174k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   174k|        do {                                                            \
  |  |  |  |   59|   174k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   174k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 174k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   174k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   174k|        } while (false)
  |  |  ------------------
  ------------------
  762|       |
  763|   174k|        p = mempset(h->direct.storage, 0, hi->entry_size * hi->n_direct_buckets);
  764|   174k|        memset(p, DIB_RAW_INIT, sizeof(dib_raw_t) * hi->n_direct_buckets);
  ------------------
  |  |  127|   174k|#define DIB_RAW_INIT     ((char)DIB_RAW_FREE) /* a byte to memset a DIB store with when initializing */
  |  |  ------------------
  |  |  |  |  126|   174k|#define DIB_RAW_FREE     ((dib_raw_t)0xffU)   /* a free bucket */
  |  |  ------------------
  ------------------
  765|   174k|}
hashmap.c:base_set_dirty:
  349|  2.35M|static void base_set_dirty(HashmapBase *h) {
  350|  2.35M|        h->dirty = true;
  351|  2.35M|}
hashmap.c:base_bucket_hash:
  335|  4.42M|static unsigned base_bucket_hash(HashmapBase *h, const void *p) {
  336|  4.42M|        struct siphash state;
  337|  4.42M|        uint64_t hash;
  338|       |
  339|  4.42M|        siphash24_init(&state, hash_key(h));
  340|       |
  341|  4.42M|        h->hash_ops->hash(p, &state);
  342|       |
  343|  4.42M|        hash = siphash24_finalize(&state);
  344|       |
  345|  4.42M|        return (unsigned) (hash % n_buckets(h));
  346|  4.42M|}
hashmap.c:hash_key:
  330|  4.42M|static uint8_t* hash_key(HashmapBase *h) {
  331|  4.42M|        return h->has_indirect ? h->indirect.hash_key
  ------------------
  |  Branch (331:16): [True: 3.66M, False: 762k]
  ------------------
  332|  4.42M|                               : shared_hash_key;
  333|  4.42M|}
hashmap.c:base_bucket_scan:
 1217|  2.82M|static unsigned base_bucket_scan(HashmapBase *h, unsigned idx, const void *key) {
 1218|  2.82M|        struct hashmap_base_entry *e;
 1219|  2.82M|        unsigned dib, distance;
 1220|  2.82M|        dib_raw_t *dibs = dib_raw_ptr(h);
 1221|       |
 1222|  2.82M|        assert(idx < n_buckets(h));
  ------------------
  |  |   72|  2.82M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.82M|        do {                                                            \
  |  |  |  |   59|  2.82M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  2.82M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.82M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.82M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.82M|        } while (false)
  |  |  ------------------
  ------------------
 1223|       |
 1224|  4.78M|        for (distance = 0; ; distance++) {
 1225|  4.78M|                if (dibs[idx] == DIB_RAW_FREE)
  ------------------
  |  |  126|  4.78M|#define DIB_RAW_FREE     ((dib_raw_t)0xffU)   /* a free bucket */
  ------------------
  |  Branch (1225:21): [True: 885k, False: 3.89M]
  ------------------
 1226|   885k|                        return IDX_NIL;
  ------------------
  |  |  111|   885k|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
 1227|       |
 1228|  3.89M|                dib = bucket_calculate_dib(h, idx, dibs[idx]);
 1229|       |
 1230|  3.89M|                if (dib < distance)
  ------------------
  |  Branch (1230:21): [True: 394k, False: 3.50M]
  ------------------
 1231|   394k|                        return IDX_NIL;
  ------------------
  |  |  111|   394k|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
 1232|  3.50M|                if (dib == distance) {
  ------------------
  |  Branch (1232:21): [True: 2.56M, False: 938k]
  ------------------
 1233|  2.56M|                        e = bucket_at(h, idx);
 1234|  2.56M|                        if (h->hash_ops->compare(e->key, key) == 0)
  ------------------
  |  Branch (1234:29): [True: 1.54M, False: 1.02M]
  ------------------
 1235|  1.54M|                                return idx;
 1236|  2.56M|                }
 1237|       |
 1238|  1.95M|                idx = next_idx(h, idx);
 1239|  1.95M|        }
 1240|  2.82M|}
hashmap.c:bucket_calculate_dib:
  418|  8.09M|static unsigned bucket_calculate_dib(HashmapBase *h, unsigned idx, dib_raw_t raw_dib) {
  419|  8.09M|        unsigned initial_bucket;
  420|       |
  421|  8.09M|        if (raw_dib == DIB_RAW_FREE)
  ------------------
  |  |  126|  8.09M|#define DIB_RAW_FREE     ((dib_raw_t)0xffU)   /* a free bucket */
  ------------------
  |  Branch (421:13): [True: 0, False: 8.09M]
  ------------------
  422|      0|                return DIB_FREE;
  ------------------
  |  |  129|      0|#define DIB_FREE UINT_MAX
  ------------------
  423|       |
  424|  8.09M|        if (_likely_(raw_dib < DIB_RAW_OVERFLOW))
  ------------------
  |  |   83|  8.09M|#define _likely_(x) (__builtin_expect(!!(x), 1))
  |  |  ------------------
  |  |  |  Branch (83:21): [True: 8.09M, False: 0]
  |  |  ------------------
  ------------------
  425|  8.09M|                return raw_dib;
  426|       |
  427|       |        /*
  428|       |         * Having an overflow DIB value is very unlikely. The hash function
  429|       |         * would have to be bad. For example, in a table of size 2^24 filled
  430|       |         * to load factor 0.9 the maximum observed DIB is only about 60.
  431|       |         * In theory (assuming I used Maxima correctly), for an infinite size
  432|       |         * hash table with load factor 0.8 the probability of a given entry
  433|       |         * having DIB > 40 is 1.9e-8.
  434|       |         * This returns the correct DIB value by recomputing the hash value in
  435|       |         * the unlikely case. XXX Hitting this case could be a hint to rehash.
  436|       |         */
  437|      0|        initial_bucket = bucket_hash(h, bucket_at(h, idx)->key);
  ------------------
  |  |  347|      0|#define bucket_hash(h, p) base_bucket_hash(HASHMAP_BASE(h), p)
  |  |  ------------------
  |  |  |  |   46|      0|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|      0|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|      0|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|      0|                (HashmapBase*)(h), \
  |  |  |  |   48|      0|                (void)0)
  |  |  ------------------
  ------------------
  438|      0|        return bucket_distance(h, idx, initial_bucket);
  439|  8.09M|}
hashmap.c:next_idx:
  498|  9.02M|static unsigned next_idx(HashmapBase *h, unsigned idx) {
  499|  9.02M|        return (idx + 1U) % n_buckets(h);
  500|  9.02M|}
hashmap.c:bucket_at_swap:
  391|  13.9M|static struct ordered_hashmap_entry* bucket_at_swap(struct swap_entries *swap, unsigned idx) {
  392|  13.9M|        return &swap->e[idx - _IDX_SWAP_BEGIN];
  ------------------
  |  |  105|  13.9M|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  ------------------
  393|  13.9M|}
hashmap.c:hashmap_base_put_boldly:
 1024|  1.13M|                                   struct swap_entries *swap, bool may_resize) {
 1025|  1.13M|        struct ordered_hashmap_entry *new_entry;
 1026|  1.13M|        int r;
 1027|       |
 1028|  1.13M|        assert(idx < n_buckets(h));
  ------------------
  |  |   72|  1.13M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.13M|        do {                                                            \
  |  |  |  |   59|  1.13M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.13M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.13M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.13M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.13M|        } while (false)
  |  |  ------------------
  ------------------
 1029|       |
 1030|  1.13M|        new_entry = bucket_at_swap(swap, IDX_PUT);
  ------------------
  |  |  106|  1.13M|#define IDX_PUT             (_IDX_SWAP_BEGIN + 0)
  |  |  ------------------
  |  |  |  |  105|  1.13M|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
 1031|       |
 1032|  1.13M|        if (may_resize) {
  ------------------
  |  Branch (1032:13): [True: 1.13M, False: 0]
  ------------------
 1033|  1.13M|                r = resize_buckets(h, 1);
 1034|  1.13M|                if (r < 0)
  ------------------
  |  Branch (1034:21): [True: 0, False: 1.13M]
  ------------------
 1035|      0|                        return r;
 1036|  1.13M|                if (r > 0)
  ------------------
  |  Branch (1036:21): [True: 15.6k, False: 1.11M]
  ------------------
 1037|  15.6k|                        idx = bucket_hash(h, new_entry->p.b.key);
  ------------------
  |  |  347|  15.6k|#define bucket_hash(h, p) base_bucket_hash(HASHMAP_BASE(h), p)
  |  |  ------------------
  |  |  |  |   46|  15.6k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  15.6k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  15.6k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  15.6k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  15.6k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|  15.6k|                (HashmapBase*)(h), \
  |  |  |  |   48|  15.6k|                (void)0)
  |  |  ------------------
  ------------------
 1038|  1.13M|        }
 1039|  1.13M|        assert(n_entries(h) < n_buckets(h));
  ------------------
  |  |   72|  1.13M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.13M|        do {                                                            \
  |  |  |  |   59|  1.13M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.13M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.13M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.13M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.13M|        } while (false)
  |  |  ------------------
  ------------------
 1040|       |
 1041|  1.13M|        if (h->type == HASHMAP_TYPE_ORDERED) {
  ------------------
  |  Branch (1041:13): [True: 0, False: 1.13M]
  ------------------
 1042|      0|                OrderedHashmap *lh = (OrderedHashmap*) h;
 1043|       |
 1044|      0|                new_entry->iterate_next = IDX_NIL;
  ------------------
  |  |  111|      0|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
 1045|      0|                new_entry->iterate_previous = lh->iterate_list_tail;
 1046|       |
 1047|      0|                if (lh->iterate_list_tail != IDX_NIL) {
  ------------------
  |  |  111|      0|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (1047:21): [True: 0, False: 0]
  ------------------
 1048|      0|                        struct ordered_hashmap_entry *old_tail;
 1049|       |
 1050|      0|                        old_tail = ordered_bucket_at(lh, lh->iterate_list_tail);
 1051|      0|                        assert(old_tail->iterate_next == IDX_NIL);
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
 1052|      0|                        old_tail->iterate_next = IDX_PUT;
  ------------------
  |  |  106|      0|#define IDX_PUT             (_IDX_SWAP_BEGIN + 0)
  |  |  ------------------
  |  |  |  |  105|      0|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
 1053|      0|                }
 1054|       |
 1055|      0|                lh->iterate_list_tail = IDX_PUT;
  ------------------
  |  |  106|      0|#define IDX_PUT             (_IDX_SWAP_BEGIN + 0)
  |  |  ------------------
  |  |  |  |  105|      0|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
 1056|      0|                if (lh->iterate_list_head == IDX_NIL)
  ------------------
  |  |  111|      0|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (1056:21): [True: 0, False: 0]
  ------------------
 1057|      0|                        lh->iterate_list_head = IDX_PUT;
  ------------------
  |  |  106|      0|#define IDX_PUT             (_IDX_SWAP_BEGIN + 0)
  |  |  ------------------
  |  |  |  |  105|      0|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
 1058|      0|        }
 1059|       |
 1060|  1.13M|        assert_se(hashmap_put_robin_hood(h, idx, swap) == false);
  ------------------
  |  |   65|  1.13M|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.13M|        do {                                                            \
  |  |  |  |   59|  1.13M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.13M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.13M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.13M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.13M|        } while (false)
  |  |  ------------------
  ------------------
 1061|       |
 1062|  1.13M|        n_entries_inc(h);
 1063|       |#if ENABLE_DEBUG_HASHMAP
 1064|       |        h->debug.max_entries = MAX(h->debug.max_entries, n_entries(h));
 1065|       |#endif
 1066|       |
 1067|  1.13M|        base_set_dirty(h);
 1068|       |
 1069|  1.13M|        return 1;
 1070|  1.13M|}
hashmap.c:hashmap_put_robin_hood:
  966|  2.71M|                                   struct swap_entries *swap) {
  967|  2.71M|        dib_raw_t raw_dib, *dibs;
  968|  2.71M|        unsigned dib, distance;
  969|       |
  970|       |#if ENABLE_DEBUG_HASHMAP
  971|       |        h->debug.put_count++;
  972|       |#endif
  973|       |
  974|  2.71M|        dibs = dib_raw_ptr(h);
  975|       |
  976|  6.31M|        for (distance = 0; ; distance++) {
  977|  6.31M|                raw_dib = dibs[idx];
  978|  6.31M|                if (IN_SET(raw_dib, DIB_RAW_FREE, DIB_RAW_REHASH)) {
  ------------------
  |  |  361|  6.31M|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 2.71M, False: 3.59M]
  |  |  ------------------
  |  |  362|  6.31M|                bool _found = false;                                    \
  |  |  363|  6.31M|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  6.31M|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  6.31M|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  6.31M|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  6.31M|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  6.31M|                switch (x) {                                            \
  |  |  368|  2.71M|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|  2.35M|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|  2.35M|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|  2.35M|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|  2.71M|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|  2.71M|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 365k, False: 5.94M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 2.35M, False: 3.96M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|  2.71M|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|  2.71M|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|  2.71M|                        _found = true;                                  \
  |  |  370|  2.71M|                        break;                                          \
  |  |  371|  3.59M|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 3.59M, False: 2.71M]
  |  |  ------------------
  |  |  372|  3.59M|                        ;                                               \
  |  |  373|  6.31M|                }                                                       \
  |  |  374|  6.31M|                _found;                                                 \
  |  |  375|  6.31M|        })
  ------------------
  979|  2.71M|                        if (raw_dib == DIB_RAW_REHASH)
  ------------------
  |  |  125|  2.71M|#define DIB_RAW_REHASH   ((dib_raw_t)0xfeU)   /* entry yet to be rehashed during in-place resize */
  ------------------
  |  Branch (979:29): [True: 365k, False: 2.35M]
  ------------------
  980|   365k|                                bucket_move_entry(h, swap, idx, IDX_TMP);
  ------------------
  |  |  107|   365k|#define IDX_TMP             (_IDX_SWAP_BEGIN + 1)
  |  |  ------------------
  |  |  |  |  105|   365k|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
  981|       |
  982|  2.71M|                        if (h->has_indirect && h->indirect.idx_lowest_entry > idx)
  ------------------
  |  Branch (982:29): [True: 2.58M, False: 133k]
  |  Branch (982:48): [True: 0, False: 2.58M]
  ------------------
  983|      0|                                h->indirect.idx_lowest_entry = idx;
  984|       |
  985|  2.71M|                        bucket_set_dib(h, idx, distance);
  986|  2.71M|                        bucket_move_entry(h, swap, IDX_PUT, idx);
  ------------------
  |  |  106|  2.71M|#define IDX_PUT             (_IDX_SWAP_BEGIN + 0)
  |  |  ------------------
  |  |  |  |  105|  2.71M|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
  987|  2.71M|                        if (raw_dib == DIB_RAW_REHASH) {
  ------------------
  |  |  125|  2.71M|#define DIB_RAW_REHASH   ((dib_raw_t)0xfeU)   /* entry yet to be rehashed during in-place resize */
  ------------------
  |  Branch (987:29): [True: 365k, False: 2.35M]
  ------------------
  988|   365k|                                bucket_move_entry(h, swap, IDX_TMP, IDX_PUT);
  ------------------
  |  |  107|   365k|#define IDX_TMP             (_IDX_SWAP_BEGIN + 1)
  |  |  ------------------
  |  |  |  |  105|   365k|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
                                              bucket_move_entry(h, swap, IDX_TMP, IDX_PUT);
  ------------------
  |  |  106|   365k|#define IDX_PUT             (_IDX_SWAP_BEGIN + 0)
  |  |  ------------------
  |  |  |  |  105|   365k|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
  989|   365k|                                return true;
  990|   365k|                        }
  991|       |
  992|  2.35M|                        return false;
  993|  2.71M|                }
  994|       |
  995|  3.59M|                dib = bucket_calculate_dib(h, idx, raw_dib);
  996|       |
  997|  3.59M|                if (dib < distance) {
  ------------------
  |  Branch (997:21): [True: 1.58M, False: 2.01M]
  ------------------
  998|       |                        /* Found a wealthier entry. Go Robin Hood! */
  999|  1.58M|                        bucket_set_dib(h, idx, distance);
 1000|       |
 1001|       |                        /* swap the entries */
 1002|  1.58M|                        bucket_move_entry(h, swap, idx, IDX_TMP);
  ------------------
  |  |  107|  1.58M|#define IDX_TMP             (_IDX_SWAP_BEGIN + 1)
  |  |  ------------------
  |  |  |  |  105|  1.58M|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
 1003|  1.58M|                        bucket_move_entry(h, swap, IDX_PUT, idx);
  ------------------
  |  |  106|  1.58M|#define IDX_PUT             (_IDX_SWAP_BEGIN + 0)
  |  |  ------------------
  |  |  |  |  105|  1.58M|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
 1004|  1.58M|                        bucket_move_entry(h, swap, IDX_TMP, IDX_PUT);
  ------------------
  |  |  107|  1.58M|#define IDX_TMP             (_IDX_SWAP_BEGIN + 1)
  |  |  ------------------
  |  |  |  |  105|  1.58M|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
                                      bucket_move_entry(h, swap, IDX_TMP, IDX_PUT);
  ------------------
  |  |  106|  1.58M|#define IDX_PUT             (_IDX_SWAP_BEGIN + 0)
  |  |  ------------------
  |  |  |  |  105|  1.58M|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
 1005|       |
 1006|  1.58M|                        distance = dib;
 1007|  1.58M|                }
 1008|       |
 1009|  3.59M|                idx = next_idx(h, idx);
 1010|  3.59M|        }
 1011|  2.71M|}
hashmap.c:bucket_move_entry:
  463|  10.0M|                              unsigned from, unsigned to) {
  464|  10.0M|        struct hashmap_base_entry *e_from, *e_to;
  465|       |
  466|  10.0M|        assert(from != to);
  ------------------
  |  |   72|  10.0M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  10.0M|        do {                                                            \
  |  |  |  |   59|  10.0M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  10.0M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 10.0M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  10.0M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  10.0M|        } while (false)
  |  |  ------------------
  ------------------
  467|       |
  468|  10.0M|        e_from = bucket_at_virtual(h, swap, from);
  469|  10.0M|        e_to   = bucket_at_virtual(h, swap, to);
  470|       |
  471|  10.0M|        memcpy(e_to, e_from, hashmap_type_info[h->type].entry_size);
  472|       |
  473|  10.0M|        if (h->type == HASHMAP_TYPE_ORDERED) {
  ------------------
  |  Branch (473:13): [True: 0, False: 10.0M]
  ------------------
  474|      0|                OrderedHashmap *lh = (OrderedHashmap*) h;
  475|      0|                struct ordered_hashmap_entry *le, *le_to;
  476|       |
  477|      0|                le_to = (struct ordered_hashmap_entry*) e_to;
  478|       |
  479|      0|                if (le_to->iterate_next != IDX_NIL) {
  ------------------
  |  |  111|      0|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (479:21): [True: 0, False: 0]
  ------------------
  480|      0|                        le = (struct ordered_hashmap_entry*)
  481|      0|                             bucket_at_virtual(h, swap, le_to->iterate_next);
  482|      0|                        le->iterate_previous = to;
  483|      0|                }
  484|       |
  485|      0|                if (le_to->iterate_previous != IDX_NIL) {
  ------------------
  |  |  111|      0|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (485:21): [True: 0, False: 0]
  ------------------
  486|      0|                        le = (struct ordered_hashmap_entry*)
  487|      0|                             bucket_at_virtual(h, swap, le_to->iterate_previous);
  488|      0|                        le->iterate_next = to;
  489|      0|                }
  490|       |
  491|      0|                if (lh->iterate_list_head == from)
  ------------------
  |  Branch (491:21): [True: 0, False: 0]
  ------------------
  492|      0|                        lh->iterate_list_head = to;
  493|      0|                if (lh->iterate_list_tail == from)
  ------------------
  |  Branch (493:21): [True: 0, False: 0]
  ------------------
  494|      0|                        lh->iterate_list_tail = to;
  495|      0|        }
  496|  10.0M|}
hashmap.c:bucket_at_virtual:
  398|  20.0M|                                                    unsigned idx) {
  399|  20.0M|        if (idx < _IDX_SWAP_BEGIN)
  ------------------
  |  |  105|  20.0M|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  ------------------
  |  Branch (399:13): [True: 8.66M, False: 11.3M]
  ------------------
  400|  8.66M|                return bucket_at(h, idx);
  401|       |
  402|  11.3M|        if (idx < _IDX_SWAP_END)
  ------------------
  |  |  108|  11.3M|#define _IDX_SWAP_END       (_IDX_SWAP_BEGIN + 2)
  |  |  ------------------
  |  |  |  |  105|  11.3M|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
  |  Branch (402:13): [True: 11.3M, False: 0]
  ------------------
  403|  11.3M|                return &bucket_at_swap(swap, idx)->p.b;
  404|       |
  405|      0|        assert_not_reached();
  ------------------
  |  |   76|      0|        log_assert_failed_unreachable(PROJECT_FILE, __LINE__, __func__)
  |  |  ------------------
  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  ------------------
  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|      0|}
hashmap.c:bucket_set_dib:
  441|  6.03M|static void bucket_set_dib(HashmapBase *h, unsigned idx, unsigned dib) {
  442|  6.03M|        dib_raw_ptr(h)[idx] = dib != DIB_FREE ? MIN(dib, DIB_RAW_OVERFLOW) : DIB_RAW_FREE;
  ------------------
  |  |  129|  6.03M|#define DIB_FREE UINT_MAX
  ------------------
                      dib_raw_ptr(h)[idx] = dib != DIB_FREE ? MIN(dib, DIB_RAW_OVERFLOW) : DIB_RAW_FREE;
  ------------------
  |  |  220|  4.90M|#define MIN(a, b) __MIN(UNIQ, (a), UNIQ, (b))
  |  |  ------------------
  |  |  |  |  222|  4.90M|        ({                                              \
  |  |  |  |  223|  4.90M|                const typeof(a) UNIQ_T(A, aq) = (a);    \
  |  |  |  |  224|  4.90M|                const typeof(b) UNIQ_T(B, bq) = (b);    \
  |  |  |  |  225|  4.90M|                UNIQ_T(A, aq) < UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  4.90M|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  4.90M|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  4.90M|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) < UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  4.90M|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  4.90M|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  4.90M|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) < UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  4.90M|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  4.90M|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  4.90M|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) < UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  4.90M|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  4.90M|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  4.90M|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:17): [True: 4.90M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  226|  4.90M|        })
  |  |  ------------------
  ------------------
                      dib_raw_ptr(h)[idx] = dib != DIB_FREE ? MIN(dib, DIB_RAW_OVERFLOW) : DIB_RAW_FREE;
  ------------------
  |  |  126|  7.16M|#define DIB_RAW_FREE     ((dib_raw_t)0xffU)   /* a free bucket */
  ------------------
  |  Branch (442:31): [True: 4.90M, False: 1.13M]
  ------------------
  443|  6.03M|}
hashmap.c:n_entries_inc:
  311|  1.13M|static void n_entries_inc(HashmapBase *h) {
  312|  1.13M|        if (h->has_indirect)
  ------------------
  |  Branch (312:13): [True: 998k, False: 133k]
  ------------------
  313|   998k|                h->indirect.n_entries++;
  314|   133k|        else
  315|   133k|                h->n_direct_entries++;
  316|  1.13M|}
hashmap.c:base_remove_entry:
  521|  1.13M|static void base_remove_entry(HashmapBase *h, unsigned idx) {
  522|  1.13M|        unsigned left, right, prev, dib;
  523|  1.13M|        dib_raw_t raw_dib, *dibs;
  524|       |
  525|  1.13M|        dibs = dib_raw_ptr(h);
  526|  1.13M|        assert(dibs[idx] != DIB_RAW_FREE);
  ------------------
  |  |   72|  1.13M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.13M|        do {                                                            \
  |  |  |  |   59|  1.13M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.13M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.13M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.13M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.13M|        } while (false)
  |  |  ------------------
  ------------------
  527|       |
  528|       |#if ENABLE_DEBUG_HASHMAP
  529|       |        h->debug.rem_count++;
  530|       |        h->debug.last_rem_idx = idx;
  531|       |#endif
  532|       |
  533|  1.13M|        left = idx;
  534|       |        /* Find the stop bucket ("right"). It is either free or has DIB == 0. */
  535|  1.73M|        for (right = next_idx(h, left); ; right = next_idx(h, right)) {
  536|  1.73M|                raw_dib = dibs[right];
  537|  1.73M|                if (IN_SET(raw_dib, 0, DIB_RAW_FREE))
  ------------------
  |  |  361|  1.73M|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 1.13M, False: 600k]
  |  |  ------------------
  |  |  362|  1.73M|                bool _found = false;                                    \
  |  |  363|  1.73M|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  1.73M|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  1.73M|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  1.73M|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  1.73M|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  1.73M|                switch (x) {                                            \
  |  |  368|  1.13M|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|   420k|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|   420k|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|   420k|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|  1.13M|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|  1.13M|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 711k, False: 1.02M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 420k, False: 1.31M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|  1.13M|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|  1.13M|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|  1.13M|                        _found = true;                                  \
  |  |  370|  1.13M|                        break;                                          \
  |  |  371|   600k|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 600k, False: 1.13M]
  |  |  ------------------
  |  |  372|   600k|                        ;                                               \
  |  |  373|  1.73M|                }                                                       \
  |  |  374|  1.73M|                _found;                                                 \
  |  |  375|  1.73M|        })
  ------------------
  538|  1.13M|                        break;
  539|       |
  540|       |                /* The buckets are not supposed to be all occupied and with DIB > 0.
  541|       |                 * That would mean we could make everyone better off by shifting them
  542|       |                 * backward. This scenario is impossible. */
  543|   600k|                assert(left != right);
  ------------------
  |  |   72|   600k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   600k|        do {                                                            \
  |  |  |  |   59|   600k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   600k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 600k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   600k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   600k|        } while (false)
  |  |  ------------------
  ------------------
  544|   600k|        }
  545|       |
  546|  1.13M|        if (h->type == HASHMAP_TYPE_ORDERED) {
  ------------------
  |  Branch (546:13): [True: 0, False: 1.13M]
  ------------------
  547|      0|                OrderedHashmap *lh = (OrderedHashmap*) h;
  548|      0|                struct ordered_hashmap_entry *le = ordered_bucket_at(lh, idx);
  549|       |
  550|      0|                if (le->iterate_next != IDX_NIL)
  ------------------
  |  |  111|      0|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (550:21): [True: 0, False: 0]
  ------------------
  551|      0|                        ordered_bucket_at(lh, le->iterate_next)->iterate_previous = le->iterate_previous;
  552|      0|                else
  553|      0|                        lh->iterate_list_tail = le->iterate_previous;
  554|       |
  555|      0|                if (le->iterate_previous != IDX_NIL)
  ------------------
  |  |  111|      0|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
  |  Branch (555:21): [True: 0, False: 0]
  ------------------
  556|      0|                        ordered_bucket_at(lh, le->iterate_previous)->iterate_next = le->iterate_next;
  557|      0|                else
  558|      0|                        lh->iterate_list_head = le->iterate_next;
  559|      0|        }
  560|       |
  561|       |        /* Now shift all buckets in the interval (left, right) one step backwards */
  562|  1.73M|        for (prev = left, left = next_idx(h, left); left != right;
  ------------------
  |  Branch (562:53): [True: 600k, False: 1.13M]
  ------------------
  563|  1.13M|             prev = left, left = next_idx(h, left)) {
  564|   600k|                dib = bucket_calculate_dib(h, left, dibs[left]);
  565|   600k|                assert(dib != 0);
  ------------------
  |  |   72|   600k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   600k|        do {                                                            \
  |  |  |  |   59|   600k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   600k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 600k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   600k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   600k|        } while (false)
  |  |  ------------------
  ------------------
  566|   600k|                bucket_move_entry(h, NULL, left, prev);
  567|   600k|                bucket_set_dib(h, prev, dib - 1);
  568|   600k|        }
  569|       |
  570|  1.13M|        bucket_mark_free(h, prev);
  571|  1.13M|        n_entries_dec(h);
  572|  1.13M|        base_set_dirty(h);
  573|  1.13M|}
hashmap.c:bucket_mark_free:
  457|  1.13M|static void bucket_mark_free(HashmapBase *h, unsigned idx) {
  458|  1.13M|        memzero(bucket_at(h, idx), hashmap_type_info[h->type].entry_size);
  ------------------
  |  |   17|  1.13M|        ({                                                      \
  |  |   18|  1.13M|                size_t _l_ = (l);                               \
  |  |   19|  1.13M|                _l_ > 0 ? memset((x), 0, _l_) : (x);            \
  |  |  ------------------
  |  |  |  Branch (19:17): [True: 1.13M, False: 0]
  |  |  ------------------
  |  |   20|  1.13M|        })
  ------------------
  459|  1.13M|        bucket_set_dib(h, idx, DIB_FREE);
  ------------------
  |  |  129|  1.13M|#define DIB_FREE UINT_MAX
  ------------------
  460|  1.13M|}
hashmap.c:n_entries_dec:
  318|  1.13M|static void n_entries_dec(HashmapBase *h) {
  319|  1.13M|        if (h->has_indirect)
  ------------------
  |  Branch (319:13): [True: 1.02M, False: 102k]
  ------------------
  320|  1.02M|                h->indirect.n_entries--;
  321|   102k|        else
  322|   102k|                h->n_direct_entries--;
  323|  1.13M|}
hashmap.c:find_first_entry:
 1562|  1.12M|static unsigned find_first_entry(HashmapBase *h) {
 1563|  1.12M|        Iterator i = ITERATOR_FIRST;
  ------------------
  |  |   20|  1.12M|#define ITERATOR_FIRST ((Iterator) { .idx = _IDX_ITERATOR_FIRST, .next_key = NULL })
  |  |  ------------------
  |  |  |  |   19|  1.12M|#define _IDX_ITERATOR_FIRST (UINT_MAX - 1)
  |  |  ------------------
  ------------------
 1564|       |
 1565|  1.12M|        if (!h || !n_entries(h))
  ------------------
  |  Branch (1565:13): [True: 0, False: 1.12M]
  |  Branch (1565:19): [True: 0, False: 1.12M]
  ------------------
 1566|      0|                return IDX_NIL;
  ------------------
  |  |  111|      0|#define IDX_NIL             UINT_MAX       /* special index value meaning "none" or "end" */
  ------------------
 1567|       |
 1568|  1.12M|        return hashmap_iterate_entry(h, &i);
 1569|  1.12M|}
hashmap.c:n_entries:
  306|  4.62M|static unsigned n_entries(HashmapBase *h) {
  307|  4.62M|        return h->has_indirect ? h->indirect.n_entries
  ------------------
  |  Branch (307:16): [True: 4.06M, False: 558k]
  ------------------
  308|  4.62M|                               : h->n_direct_entries;
  309|  4.62M|}
hashmap.c:n_buckets:
  301|  40.3M|static unsigned n_buckets(HashmapBase *h) {
  302|  40.3M|        return h->has_indirect ? h->indirect.n_buckets
  ------------------
  |  Branch (302:16): [True: 36.3M, False: 4.07M]
  ------------------
  303|  40.3M|                               : hashmap_type_info[h->type].n_direct_buckets;
  304|  40.3M|}
hashmap.c:resize_buckets:
 1079|  1.13M|static int resize_buckets(HashmapBase *h, unsigned entries_add) {
 1080|  1.13M|        struct swap_entries swap;
 1081|  1.13M|        void *new_storage;
 1082|  1.13M|        dib_raw_t *old_dibs, *new_dibs;
 1083|  1.13M|        const struct hashmap_type_info *hi;
 1084|  1.13M|        unsigned idx, optimal_idx;
 1085|  1.13M|        unsigned old_n_buckets, new_n_buckets, n_rehashed, new_n_entries;
 1086|  1.13M|        uint8_t new_shift;
 1087|  1.13M|        bool rehash_next;
 1088|       |
 1089|  1.13M|        assert(h);
  ------------------
  |  |   72|  1.13M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.13M|        do {                                                            \
  |  |  |  |   59|  1.13M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.13M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.13M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.13M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.13M|        } while (false)
  |  |  ------------------
  ------------------
 1090|       |
 1091|  1.13M|        hi = &hashmap_type_info[h->type];
 1092|  1.13M|        new_n_entries = n_entries(h) + entries_add;
 1093|       |
 1094|       |        /* overflow? */
 1095|  1.13M|        if (_unlikely_(new_n_entries < entries_add))
  ------------------
  |  |   95|  1.13M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:23): [True: 0, False: 1.13M]
  |  |  ------------------
  ------------------
 1096|      0|                return -ENOMEM;
 1097|       |
 1098|       |        /* For direct storage we allow 100% load, because it's tiny. */
 1099|  1.13M|        if (!h->has_indirect && new_n_entries <= hi->n_direct_buckets)
  ------------------
  |  Branch (1099:13): [True: 141k, False: 990k]
  |  Branch (1099:33): [True: 133k, False: 8.03k]
  ------------------
 1100|   133k|                return 0;
 1101|       |
 1102|       |        /*
 1103|       |         * Load factor = n/m = 1 - (1/INV_KEEP_FREE).
 1104|       |         * From it follows: m = n + n/(INV_KEEP_FREE - 1)
 1105|       |         */
 1106|   998k|        new_n_buckets = new_n_entries + new_n_entries / (INV_KEEP_FREE - 1);
  ------------------
  |  |   78|   998k|#define INV_KEEP_FREE            5U
  ------------------
 1107|       |        /* overflow? */
 1108|   998k|        if (_unlikely_(new_n_buckets < new_n_entries))
  ------------------
  |  |   95|   998k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:23): [True: 0, False: 998k]
  |  |  ------------------
  ------------------
 1109|      0|                return -ENOMEM;
 1110|       |
 1111|   998k|        if (_unlikely_(new_n_buckets > UINT_MAX / (hi->entry_size + sizeof(dib_raw_t))))
  ------------------
  |  |   95|   998k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:23): [True: 0, False: 998k]
  |  |  ------------------
  ------------------
 1112|      0|                return -ENOMEM;
 1113|       |
 1114|   998k|        old_n_buckets = n_buckets(h);
 1115|       |
 1116|   998k|        if (_likely_(new_n_buckets <= old_n_buckets))
  ------------------
  |  |   83|   998k|#define _likely_(x) (__builtin_expect(!!(x), 1))
  |  |  ------------------
  |  |  |  Branch (83:21): [True: 983k, False: 15.6k]
  |  |  ------------------
  ------------------
 1117|   983k|                return 0;
 1118|       |
 1119|  15.6k|        new_shift = log2u_round_up(MAX(
  ------------------
  |  |  163|  15.6k|#define MAX(a, b) __MAX(UNIQ, (a), UNIQ, (b))
  |  |  ------------------
  |  |  |  |  165|  15.6k|        ({                                              \
  |  |  |  |  166|  15.6k|                const typeof(a) UNIQ_T(A, aq) = (a);    \
  |  |  |  |  167|  15.6k|                const typeof(b) UNIQ_T(B, bq) = (b);    \
  |  |  |  |  168|  15.6k|                UNIQ_T(A, aq) > UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  15.6k|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  15.6k|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  15.6k|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) > UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  15.6k|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  15.6k|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  15.6k|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) > UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  15.6k|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  15.6k|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  15.6k|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) > UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  15.6k|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  15.6k|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  15.6k|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (168:17): [True: 7.66k, False: 8.03k]
  |  |  |  |  ------------------
  |  |  |  |  169|  15.6k|        })
  |  |  ------------------
  ------------------
 1120|  15.6k|                        new_n_buckets * (hi->entry_size + sizeof(dib_raw_t)),
 1121|  15.6k|                        2 * sizeof(struct direct_storage)));
 1122|       |
 1123|       |        /* Realloc storage (buckets and DIB array). */
 1124|  15.6k|        new_storage = realloc(h->has_indirect ? h->indirect.storage : NULL,
  ------------------
  |  Branch (1124:31): [True: 7.66k, False: 8.03k]
  ------------------
 1125|  15.6k|                              1U << new_shift);
 1126|  15.6k|        if (!new_storage)
  ------------------
  |  Branch (1126:13): [True: 0, False: 15.6k]
  ------------------
 1127|      0|                return -ENOMEM;
 1128|       |
 1129|       |        /* Must upgrade direct to indirect storage. */
 1130|  15.6k|        if (!h->has_indirect) {
  ------------------
  |  Branch (1130:13): [True: 8.03k, False: 7.66k]
  ------------------
 1131|  8.03k|                memcpy(new_storage, h->direct.storage,
 1132|  8.03k|                       old_n_buckets * (hi->entry_size + sizeof(dib_raw_t)));
 1133|  8.03k|                h->indirect.n_entries = h->n_direct_entries;
 1134|  8.03k|                h->indirect.idx_lowest_entry = 0;
 1135|  8.03k|                h->n_direct_entries = 0;
 1136|  8.03k|        }
 1137|       |
 1138|       |        /* Get a new hash key. If we've just upgraded to indirect storage,
 1139|       |         * allow reusing a previously generated key. It's still a different key
 1140|       |         * from the shared one that we used for direct storage. */
 1141|  15.6k|        get_hash_key(h->indirect.hash_key, !h->has_indirect);
 1142|       |
 1143|  15.6k|        h->has_indirect = true;
 1144|  15.6k|        h->indirect.storage = new_storage;
 1145|  15.6k|        h->indirect.n_buckets = (1U << new_shift) /
 1146|  15.6k|                                (hi->entry_size + sizeof(dib_raw_t));
 1147|       |
 1148|  15.6k|        old_dibs = (dib_raw_t*)((uint8_t*) new_storage + hi->entry_size * old_n_buckets);
 1149|  15.6k|        new_dibs = dib_raw_ptr(h);
 1150|       |
 1151|       |        /*
 1152|       |         * Move the DIB array to the new place, replacing valid DIB values with
 1153|       |         * DIB_RAW_REHASH to indicate all of the used buckets need rehashing.
 1154|       |         * Note: Overlap is not possible, because we have at least doubled the
 1155|       |         * number of buckets and dib_raw_t is smaller than any entry type.
 1156|       |         */
 1157|  1.99M|        for (idx = 0; idx < old_n_buckets; idx++) {
  ------------------
  |  Branch (1157:23): [True: 1.97M, False: 15.6k]
  ------------------
 1158|  1.97M|                assert(old_dibs[idx] != DIB_RAW_REHASH);
  ------------------
  |  |   72|  1.97M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.97M|        do {                                                            \
  |  |  |  |   59|  1.97M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.97M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.97M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.97M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.97M|        } while (false)
  |  |  ------------------
  ------------------
 1159|  1.97M|                new_dibs[idx] = old_dibs[idx] == DIB_RAW_FREE ? DIB_RAW_FREE
  ------------------
  |  |  126|  1.97M|#define DIB_RAW_FREE     ((dib_raw_t)0xffU)   /* a free bucket */
  ------------------
                              new_dibs[idx] = old_dibs[idx] == DIB_RAW_FREE ? DIB_RAW_FREE
  ------------------
  |  |  126|   388k|#define DIB_RAW_FREE     ((dib_raw_t)0xffU)   /* a free bucket */
  ------------------
  |  Branch (1159:33): [True: 388k, False: 1.58M]
  ------------------
 1160|  1.97M|                                                              : DIB_RAW_REHASH;
  ------------------
  |  |  125|  3.56M|#define DIB_RAW_REHASH   ((dib_raw_t)0xfeU)   /* entry yet to be rehashed during in-place resize */
  ------------------
 1161|  1.97M|        }
 1162|       |
 1163|       |        /* Zero the area of newly added entries (including the old DIB area) */
 1164|  15.6k|        memzero(bucket_at(h, old_n_buckets),
  ------------------
  |  |   17|  15.6k|        ({                                                      \
  |  |   18|  15.6k|                size_t _l_ = (l);                               \
  |  |   19|  15.6k|                _l_ > 0 ? memset((x), 0, _l_) : (x);            \
  |  |  ------------------
  |  |  |  Branch (19:17): [True: 15.6k, False: 0]
  |  |  ------------------
  |  |   20|  15.6k|        })
  ------------------
 1165|  15.6k|               (n_buckets(h) - old_n_buckets) * hi->entry_size);
 1166|       |
 1167|       |        /* The upper half of the new DIB array needs initialization */
 1168|  15.6k|        memset(&new_dibs[old_n_buckets], DIB_RAW_INIT,
  ------------------
  |  |  127|  15.6k|#define DIB_RAW_INIT     ((char)DIB_RAW_FREE) /* a byte to memset a DIB store with when initializing */
  |  |  ------------------
  |  |  |  |  126|  15.6k|#define DIB_RAW_FREE     ((dib_raw_t)0xffU)   /* a free bucket */
  |  |  ------------------
  ------------------
 1169|  15.6k|               (n_buckets(h) - old_n_buckets) * sizeof(dib_raw_t));
 1170|       |
 1171|       |        /* Rehash entries that need it */
 1172|  15.6k|        n_rehashed = 0;
 1173|  1.99M|        for (idx = 0; idx < old_n_buckets; idx++) {
  ------------------
  |  Branch (1173:23): [True: 1.97M, False: 15.6k]
  ------------------
 1174|  1.97M|                if (new_dibs[idx] != DIB_RAW_REHASH)
  ------------------
  |  |  125|  1.97M|#define DIB_RAW_REHASH   ((dib_raw_t)0xfeU)   /* entry yet to be rehashed during in-place resize */
  ------------------
  |  Branch (1174:21): [True: 753k, False: 1.22M]
  ------------------
 1175|   753k|                        continue;
 1176|       |
 1177|  1.22M|                optimal_idx = bucket_hash(h, bucket_at(h, idx)->key);
  ------------------
  |  |  347|  1.22M|#define bucket_hash(h, p) base_bucket_hash(HASHMAP_BASE(h), p)
  |  |  ------------------
  |  |  |  |   46|  1.22M|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.22M|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  1.22M|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  1.22M|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.22M|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|  1.22M|                (HashmapBase*)(h), \
  |  |  |  |   48|  1.22M|                (void)0)
  |  |  ------------------
  ------------------
 1178|       |
 1179|       |                /*
 1180|       |                 * Not much to do if by luck the entry hashes to its current
 1181|       |                 * location. Just set its DIB.
 1182|       |                 */
 1183|  1.22M|                if (optimal_idx == idx) {
  ------------------
  |  Branch (1183:21): [True: 4.46k, False: 1.21M]
  ------------------
 1184|  4.46k|                        new_dibs[idx] = 0;
 1185|  4.46k|                        n_rehashed++;
 1186|  4.46k|                        continue;
 1187|  4.46k|                }
 1188|       |
 1189|  1.21M|                new_dibs[idx] = DIB_RAW_FREE;
  ------------------
  |  |  126|  1.21M|#define DIB_RAW_FREE     ((dib_raw_t)0xffU)   /* a free bucket */
  ------------------
 1190|  1.21M|                bucket_move_entry(h, &swap, idx, IDX_PUT);
  ------------------
  |  |  106|  1.21M|#define IDX_PUT             (_IDX_SWAP_BEGIN + 0)
  |  |  ------------------
  |  |  |  |  105|  1.21M|#define _IDX_SWAP_BEGIN     (UINT_MAX - 3)
  |  |  ------------------
  ------------------
 1191|       |                /* bucket_move_entry does not clear the source */
 1192|  1.21M|                memzero(bucket_at(h, idx), hi->entry_size);
  ------------------
  |  |   17|  1.21M|        ({                                                      \
  |  |   18|  1.21M|                size_t _l_ = (l);                               \
  |  |   19|  1.21M|                _l_ > 0 ? memset((x), 0, _l_) : (x);            \
  |  |  ------------------
  |  |  |  Branch (19:17): [True: 1.21M, False: 0]
  |  |  ------------------
  |  |   20|  1.21M|        })
  ------------------
 1193|       |
 1194|  1.58M|                do {
 1195|       |                        /*
 1196|       |                         * Find the new bucket for the current entry. This may make
 1197|       |                         * another entry homeless and load it into IDX_PUT.
 1198|       |                         */
 1199|  1.58M|                        rehash_next = hashmap_put_robin_hood(h, optimal_idx, &swap);
 1200|  1.58M|                        n_rehashed++;
 1201|       |
 1202|       |                        /* Did the current entry displace another one? */
 1203|  1.58M|                        if (rehash_next)
  ------------------
  |  Branch (1203:29): [True: 365k, False: 1.21M]
  ------------------
 1204|   365k|                                optimal_idx = bucket_hash(h, bucket_at_swap(&swap, IDX_PUT)->p.b.key);
  ------------------
  |  |  347|   365k|#define bucket_hash(h, p) base_bucket_hash(HASHMAP_BASE(h), p)
  |  |  ------------------
  |  |  |  |   46|   365k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   365k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   37|   365k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   365k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   365k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   47|   365k|                (HashmapBase*)(h), \
  |  |  |  |   48|   365k|                (void)0)
  |  |  ------------------
  ------------------
 1205|  1.58M|                } while (rehash_next);
  ------------------
  |  Branch (1205:26): [True: 365k, False: 1.21M]
  ------------------
 1206|  1.21M|        }
 1207|       |
 1208|  15.6k|        assert_se(n_rehashed == n_entries(h));
  ------------------
  |  |   65|  15.6k|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  15.6k|        do {                                                            \
  |  |  |  |   59|  15.6k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  15.6k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 15.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  15.6k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  15.6k|        } while (false)
  |  |  ------------------
  ------------------
 1209|       |
 1210|  15.6k|        return 1;
 1211|  15.6k|}
hashmap.c:get_hash_key:
  354|  15.6k|static void get_hash_key(uint8_t hash_key[HASH_KEY_SIZE], bool reuse_is_ok) {
  355|  15.6k|        static uint8_t current[HASH_KEY_SIZE];
  356|  15.6k|        static bool current_initialized = false;
  357|       |
  358|       |        /* Returns a hash function key to use. In order to keep things
  359|       |         * fast we will not generate a new key each time we allocate a
  360|       |         * new hash table. Instead, we'll just reuse the most recently
  361|       |         * generated one, except if we never generated one or when we
  362|       |         * are rehashing an entire hash table because we reached a
  363|       |         * fill level */
  364|       |
  365|  15.6k|        if (!current_initialized || !reuse_is_ok) {
  ------------------
  |  Branch (365:13): [True: 1, False: 15.6k]
  |  Branch (365:37): [True: 7.66k, False: 8.03k]
  ------------------
  366|  7.66k|                random_bytes(current, sizeof(current));
  367|  7.66k|                current_initialized = true;
  368|  7.66k|        }
  369|       |
  370|  15.6k|        memcpy(hash_key, current, sizeof(current));
  371|  15.6k|}

resolved-etc-hosts.c:hashmap_free:
   64|  9.97k|static inline Hashmap* hashmap_free(Hashmap *h) {
   65|  9.97k|        return (void*) _hashmap_free(HASHMAP_BASE(h));
  ------------------
  |  |   46|  9.97k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  ------------------
  |  |  |  |   36|  9.97k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   37|  9.97k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   38|  9.97k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   39|  9.97k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|  9.97k|                (HashmapBase*)(h), \
  |  |   48|  9.97k|                (void)0)
  ------------------
   66|  9.97k|}
resolved-etc-hosts.c:hashmap_get:
  119|   625k|static inline void *hashmap_get(Hashmap *h, const void *key) {
  120|   625k|        return _hashmap_get(HASHMAP_BASE(h), key);
  ------------------
  |  |   46|   625k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  ------------------
  |  |  |  |   36|   625k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   37|   625k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   38|   625k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   39|   625k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|   625k|                (HashmapBase*)(h), \
  |  |   48|   625k|                (void)0)
  ------------------
  121|   625k|}
resolved-etc-hosts.c:hashmap_remove:
  140|  2.52k|static inline void *hashmap_remove(Hashmap *h, const void *key) {
  141|  2.52k|        return _hashmap_remove(HASHMAP_BASE(h), key);
  ------------------
  |  |   46|  2.52k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  ------------------
  |  |  |  |   36|  2.52k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   37|  2.52k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   38|  2.52k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   39|  2.52k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|  2.52k|                (HashmapBase*)(h), \
  |  |   48|  2.52k|                (void)0)
  ------------------
  142|  2.52k|}

valid_ldh_char:
   40|  15.5M|bool valid_ldh_char(char c) {
   41|       |        /* "LDH" → "Letters, digits, hyphens", as per RFC 5890, Section 2.3.1 */
   42|       |
   43|  15.5M|        return ascii_isalpha(c) ||
  ------------------
  |  Branch (43:16): [True: 14.6M, False: 932k]
  ------------------
   44|  15.5M|                ascii_isdigit(c) ||
  ------------------
  |  Branch (44:17): [True: 754k, False: 177k]
  ------------------
   45|  15.5M|                c == '-';
  ------------------
  |  Branch (45:17): [True: 146k, False: 31.7k]
  ------------------
   46|  15.5M|}
is_localhost:
  141|  2.95k|bool is_localhost(const char *hostname) {
  142|  2.95k|        assert(hostname);
  ------------------
  |  |   72|  2.95k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.95k|        do {                                                            \
  |  |  |  |   59|  2.95k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  2.95k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.95k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.95k|        } while (false)
  |  |  ------------------
  ------------------
  143|       |
  144|       |        /* This tries to identify local host and domain names
  145|       |         * described in RFC6761 plus the redhatism of localdomain */
  146|       |
  147|  2.95k|        return STRCASE_IN_SET(
  ------------------
  |  |  170|  2.95k|#define STRCASE_IN_SET(x, ...) strv_contains_case(STRV_MAKE(__VA_ARGS__), x)
  |  |  ------------------
  |  |  |  |   17|  5.90k|#define strv_contains_case(l, s) (!!strv_find_case((l), (s)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:34): [True: 137, False: 2.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  2.95k|                        hostname,
  149|  2.95k|                        "localhost",
  150|  2.95k|                        "localhost.",
  151|  2.95k|                        "localhost.localdomain",
  152|  2.95k|                        "localhost.localdomain.") ||
  153|  2.95k|                endswith_no_case(hostname, ".localhost") ||
  ------------------
  |  Branch (153:17): [True: 1.84k, False: 972]
  ------------------
  154|  2.95k|                endswith_no_case(hostname, ".localhost.") ||
  ------------------
  |  Branch (154:17): [True: 209, False: 763]
  ------------------
  155|  2.95k|                endswith_no_case(hostname, ".localhost.localdomain") ||
  ------------------
  |  Branch (155:17): [True: 126, False: 637]
  ------------------
  156|  2.95k|                endswith_no_case(hostname, ".localhost.localdomain.");
  ------------------
  |  Branch (156:17): [True: 124, False: 513]
  ------------------
  157|  2.95k|}

in4_addr_is_null:
   19|   733k|bool in4_addr_is_null(const struct in_addr *a) {
   20|   733k|        assert(a);
  ------------------
  |  |   72|   733k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   733k|        do {                                                            \
  |  |  |  |   59|   733k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   733k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 733k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   733k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   733k|        } while (false)
  |  |  ------------------
  ------------------
   21|       |
   22|   733k|        return a->s_addr == 0;
   23|   733k|}
in6_addr_is_null:
   25|  33.6k|bool in6_addr_is_null(const struct in6_addr *a) {
   26|  33.6k|        assert(a);
  ------------------
  |  |   72|  33.6k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  33.6k|        do {                                                            \
  |  |  |  |   59|  33.6k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  33.6k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 33.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  33.6k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  33.6k|        } while (false)
  |  |  ------------------
  ------------------
   27|       |
   28|  33.6k|        return eqzero(a->s6_addr32);
  ------------------
  |  |   64|  33.6k|#define eqzero(x) memeqzero(x, sizeof(x))
  |  |  ------------------
  |  |  |  |   62|  33.6k|#define memeqzero(data, length) memeqbyte(0x00, data, length)
  |  |  ------------------
  ------------------
   29|  33.6k|}
in_addr_is_null:
   31|   766k|int in_addr_is_null(int family, const union in_addr_union *u) {
   32|   766k|        assert(u);
  ------------------
  |  |   72|   766k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   766k|        do {                                                            \
  |  |  |  |   59|   766k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   766k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 766k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   766k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   766k|        } while (false)
  |  |  ------------------
  ------------------
   33|       |
   34|   766k|        if (family == AF_INET)
  ------------------
  |  Branch (34:13): [True: 733k, False: 33.6k]
  ------------------
   35|   733k|                return in4_addr_is_null(&u->in);
   36|       |
   37|  33.6k|        if (family == AF_INET6)
  ------------------
  |  Branch (37:13): [True: 33.6k, False: 0]
  ------------------
   38|  33.6k|                return in6_addr_is_null(&u->in6);
   39|       |
   40|      0|        return -EAFNOSUPPORT;
   41|  33.6k|}
in4_addr_is_localhost:
  121|  1.05k|bool in4_addr_is_localhost(const struct in_addr *a) {
  122|  1.05k|        assert(a);
  ------------------
  |  |   72|  1.05k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.05k|        do {                                                            \
  |  |  |  |   59|  1.05k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.05k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.05k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.05k|        } while (false)
  |  |  ------------------
  ------------------
  123|       |
  124|       |        /* All of 127.x.x.x is localhost. */
  125|  1.05k|        return (be32toh(a->s_addr) & UINT32_C(0xFF000000)) == UINT32_C(127) << 24;
  126|  1.05k|}
in_addr_is_localhost:
  140|  2.55k|int in_addr_is_localhost(int family, const union in_addr_union *u) {
  141|  2.55k|        assert(u);
  ------------------
  |  |   72|  2.55k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.55k|        do {                                                            \
  |  |  |  |   59|  2.55k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  2.55k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.55k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.55k|        } while (false)
  |  |  ------------------
  ------------------
  142|       |
  143|  2.55k|        if (family == AF_INET)
  ------------------
  |  Branch (143:13): [True: 1.05k, False: 1.49k]
  ------------------
  144|  1.05k|                return in4_addr_is_localhost(&u->in);
  145|       |
  146|  1.49k|        if (family == AF_INET6)
  ------------------
  |  Branch (146:13): [True: 1.49k, False: 0]
  ------------------
  147|  1.49k|                return in6_addr_is_loopback(&u->in6);
  148|       |
  149|      0|        return -EAFNOSUPPORT;
  150|  1.49k|}
in_addr_from_string:
  582|  1.00M|int in_addr_from_string(int family, const char *s, union in_addr_union *ret) {
  583|  1.00M|        union in_addr_union buffer;
  584|  1.00M|        assert(s);
  ------------------
  |  |   72|  1.00M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.00M|        do {                                                            \
  |  |  |  |   59|  1.00M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.00M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.00M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.00M|        } while (false)
  |  |  ------------------
  ------------------
  585|       |
  586|  1.00M|        if (!IN_SET(family, AF_INET, AF_INET6))
  ------------------
  |  |  361|  1.00M|        ({                                                              \
  |  |  362|  1.00M|                bool _found = false;                                    \
  |  |  363|  1.00M|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  1.00M|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  1.00M|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  1.00M|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  1.00M|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  1.00M|                switch (x) {                                            \
  |  |  368|  1.00M|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|   972k|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|   972k|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|   972k|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|  1.00M|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|  1.00M|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 34.5k, False: 972k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 972k, False: 34.5k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|  1.00M|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|  1.00M|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|  1.00M|                        _found = true;                                  \
  |  |  370|  1.00M|                        break;                                          \
  |  |  371|   972k|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 0, False: 1.00M]
  |  |  ------------------
  |  |  372|      0|                        ;                                               \
  |  |  373|  1.00M|                }                                                       \
  |  |  374|  1.00M|                _found;                                                 \
  |  |  375|  1.00M|        })
  ------------------
  |  Branch (586:13): [True: 0, False: 1.00M]
  ------------------
  587|      0|                return -EAFNOSUPPORT;
  588|       |
  589|  1.00M|        errno = 0;
  590|  1.00M|        if (inet_pton(family, s, ret ?: &buffer) <= 0)
  ------------------
  |  Branch (590:13): [True: 240k, False: 766k]
  |  Branch (590:34): [True: 1.00M, False: 0]
  ------------------
  591|   240k|                return errno_or_else(EINVAL);
  592|       |
  593|   766k|        return 0;
  594|  1.00M|}
in_addr_hash_func:
  960|   734k|void in_addr_hash_func(const union in_addr_union *u, int family, struct siphash *state) {
  961|   734k|        assert(u);
  ------------------
  |  |   72|   734k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   734k|        do {                                                            \
  |  |  |  |   59|   734k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   734k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 734k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   734k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   734k|        } while (false)
  |  |  ------------------
  ------------------
  962|   734k|        assert(state);
  ------------------
  |  |   72|   734k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   734k|        do {                                                            \
  |  |  |  |   59|   734k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   734k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 734k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   734k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   734k|        } while (false)
  |  |  ------------------
  ------------------
  963|       |
  964|   734k|        siphash24_compress(u->bytes, FAMILY_ADDRESS_SIZE(family), state);
  965|   734k|}
in_addr_data_hash_func:
  967|   734k|void in_addr_data_hash_func(const struct in_addr_data *a, struct siphash *state) {
  968|   734k|        assert(a);
  ------------------
  |  |   72|   734k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   734k|        do {                                                            \
  |  |  |  |   59|   734k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   734k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 734k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   734k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   734k|        } while (false)
  |  |  ------------------
  ------------------
  969|   734k|        assert(state);
  ------------------
  |  |   72|   734k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   734k|        do {                                                            \
  |  |  |  |   59|   734k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   734k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 734k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   734k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   734k|        } while (false)
  |  |  ------------------
  ------------------
  970|       |
  971|   734k|        siphash24_compress_typesafe(a->family, state);
  ------------------
  |  |   20|   734k|        siphash24_compress(&(in), sizeof(typeof(in)), (state))
  ------------------
  972|   734k|        in_addr_hash_func(&a->address, a->family, state);
  973|   734k|}
in_addr_data_compare_func:
  975|   561k|int in_addr_data_compare_func(const struct in_addr_data *x, const struct in_addr_data *y) {
  976|   561k|        int r;
  977|       |
  978|   561k|        assert(x);
  ------------------
  |  |   72|   561k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   561k|        do {                                                            \
  |  |  |  |   59|   561k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   561k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 561k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   561k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   561k|        } while (false)
  |  |  ------------------
  ------------------
  979|   561k|        assert(y);
  ------------------
  |  |   72|   561k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   561k|        do {                                                            \
  |  |  |  |   59|   561k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   561k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 561k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   561k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   561k|        } while (false)
  |  |  ------------------
  ------------------
  980|       |
  981|   561k|        r = CMP(x->family, y->family);
  ------------------
  |  |  288|   561k|#define CMP(a, b) __CMP(UNIQ, (a), UNIQ, (b))
  |  |  ------------------
  |  |  |  |  290|   561k|        ({                                              \
  |  |  |  |  291|   561k|                const typeof(a) UNIQ_T(A, aq) = (a);    \
  |  |  |  |  292|   561k|                const typeof(b) UNIQ_T(B, bq) = (b);    \
  |  |  |  |  293|   561k|                UNIQ_T(A, aq) < UNIQ_T(B, bq) ? -1 :    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|   561k|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|   561k|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|   561k|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) < UNIQ_T(B, bq) ? -1 :    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|   561k|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|   561k|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|   561k|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:17): [True: 20.4k, False: 541k]
  |  |  |  |  ------------------
  |  |  |  |  294|   561k|                UNIQ_T(A, aq) > UNIQ_T(B, bq) ? 1 : 0;  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|   541k|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|   541k|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|   541k|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) > UNIQ_T(B, bq) ? 1 : 0;  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|   541k|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|   541k|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|   541k|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (294:17): [True: 18.5k, False: 522k]
  |  |  |  |  ------------------
  |  |  |  |  295|   561k|        })
  |  |  ------------------
  ------------------
  982|   561k|        if (r != 0)
  ------------------
  |  Branch (982:13): [True: 38.9k, False: 522k]
  ------------------
  983|  38.9k|                return r;
  984|       |
  985|   522k|        return memcmp(&x->address, &y->address, FAMILY_ADDRESS_SIZE(x->family));
  986|   561k|}
in-addr-util.c:in6_addr_is_loopback:
  136|  1.49k|static bool in6_addr_is_loopback(const struct in6_addr *a) {
  137|  1.49k|        return memcmp(a, &(struct in6_addr) IN6ADDR_LOOPBACK_INIT, sizeof(struct in6_addr)) == 0;
  138|  1.49k|}

resolved-etc-hosts.c:in_addr_data_is_null:
   31|   766k|static inline int in_addr_data_is_null(const struct in_addr_data *a) {
   32|   766k|        assert(a);
  ------------------
  |  |   72|   766k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   766k|        do {                                                            \
  |  |  |  |   59|   766k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   766k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 766k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   766k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   766k|        } while (false)
  |  |  ------------------
  ------------------
   33|   766k|        return in_addr_is_null(a->family, &a->address);
   34|   766k|}
in-addr-util.c:FAMILY_ADDRESS_SIZE:
  179|  1.25M|static inline size_t FAMILY_ADDRESS_SIZE(int family) {
  180|  1.25M|        switch (family) {
  181|   128k|                case AF_INET:
  ------------------
  |  Branch (181:17): [True: 128k, False: 1.12M]
  ------------------
  182|   128k|                        return 4;
  183|  1.12M|                case AF_INET6:
  ------------------
  |  Branch (183:17): [True: 1.12M, False: 128k]
  ------------------
  184|  1.12M|                        return 16;
  185|      0|                default:
  ------------------
  |  Branch (185:17): [True: 0, False: 1.25M]
  ------------------
  186|      0|                        assert_not_reached();
  ------------------
  |  |   76|      0|        log_assert_failed_unreachable(PROJECT_FILE, __LINE__, __func__)
  |  |  ------------------
  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  ------------------
  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  187|  1.25M|        }
  188|  1.25M|}

stderr_is_journal:
  233|  1.66k|bool stderr_is_journal(void) {
  234|  1.66k|        _cleanup_free_ char *w = NULL;
  ------------------
  |  |   82|  1.66k|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  1.66k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  235|  1.66k|        const char *e;
  236|  1.66k|        uint64_t dev, ino;
  237|  1.66k|        struct stat st;
  238|       |
  239|  1.66k|        e = getenv("JOURNAL_STREAM");
  240|  1.66k|        if (!e)
  ------------------
  |  Branch (240:13): [True: 1.66k, False: 0]
  ------------------
  241|  1.66k|                return false;
  242|       |
  243|      0|        if (extract_first_word(&e, &w, ":", EXTRACT_DONT_COALESCE_SEPARATORS) <= 0)
  ------------------
  |  Branch (243:13): [True: 0, False: 0]
  ------------------
  244|      0|                return false;
  245|      0|        if (!e)
  ------------------
  |  Branch (245:13): [True: 0, False: 0]
  ------------------
  246|      0|                return false;
  247|       |
  248|      0|        if (safe_atou64(w, &dev) < 0)
  ------------------
  |  Branch (248:13): [True: 0, False: 0]
  ------------------
  249|      0|                return false;
  250|      0|        if (safe_atou64(e, &ino) < 0)
  ------------------
  |  Branch (250:13): [True: 0, False: 0]
  ------------------
  251|      0|                return false;
  252|       |
  253|      0|        if (fstat(STDERR_FILENO, &st) < 0)
  ------------------
  |  Branch (253:13): [True: 0, False: 0]
  ------------------
  254|      0|                return false;
  255|       |
  256|      0|        return st.st_dev == dev && st.st_ino == ino;
  ------------------
  |  Branch (256:16): [True: 0, False: 0]
  |  Branch (256:36): [True: 0, False: 0]
  ------------------
  257|      0|}
log_open:
  259|  1.66k|int log_open(void) {
  260|  1.66k|        int r;
  261|       |
  262|       |        /* Do not call from library code. */
  263|       |
  264|       |        /* This function is often called in preparation for logging. Let's make sure we don't clobber errno,
  265|       |         * so that a call to a logging function immediately following a log_open() call can still easily
  266|       |         * reference an error that happened immediately before the log_open() call. */
  267|  1.66k|        PROTECT_ERRNO;
  ------------------
  |  |   31|  1.66k|        _cleanup_(_reset_errno_) _unused_ int _saved_errno_ = errno
  |  |  ------------------
  |  |  |  |   78|  1.66k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  268|       |
  269|       |        /* If we don't use the console, we close it here to not get killed by SAK. If we don't use syslog, we
  270|       |         * close it here too, so that we are not confused by somebody deleting the socket in the fs, and to
  271|       |         * make sure we don't use it if prohibit_ipc is set. If we don't use /dev/kmsg we still keep it open,
  272|       |         * because there is no reason to close it. */
  273|       |
  274|  1.66k|        if (log_target == LOG_TARGET_NULL) {
  ------------------
  |  Branch (274:13): [True: 0, False: 1.66k]
  ------------------
  275|      0|                log_close_journal();
  276|      0|                log_close_syslog();
  277|      0|                log_close_console();
  278|      0|                return 0;
  279|      0|        }
  280|       |
  281|  1.66k|        if (getpid_cached() == 1 ||
  ------------------
  |  Branch (281:13): [True: 0, False: 1.66k]
  ------------------
  282|  1.66k|            stderr_is_journal() ||
  ------------------
  |  Branch (282:13): [True: 0, False: 1.66k]
  ------------------
  283|  1.66k|            IN_SET(log_target,
  ------------------
  |  |  361|  1.66k|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 1.66k]
  |  |  ------------------
  |  |  362|  1.66k|                bool _found = false;                                    \
  |  |  363|  1.66k|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  1.66k|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  1.66k|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  1.66k|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  1.66k|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  1.66k|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  337|      0|#define  CASE_F_5(X, ...) case X:  CASE_F_4( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  336|      0|#define  CASE_F_4(X, ...) case X:  CASE_F_3( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  335|      0|#define  CASE_F_3(X, ...) case X:  CASE_F_2( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 1.66k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 1.66k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (335:27): [True: 0, False: 1.66k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (336:27): [True: 0, False: 1.66k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (337:27): [True: 0, False: 1.66k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|  1.66k|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 1.66k, False: 0]
  |  |  ------------------
  |  |  372|  1.66k|                        ;                                               \
  |  |  373|  1.66k|                }                                                       \
  |  |  374|  1.66k|                _found;                                                 \
  |  |  375|  1.66k|        })
  ------------------
  284|  1.66k|                   LOG_TARGET_KMSG,
  285|  1.66k|                   LOG_TARGET_JOURNAL,
  286|  1.66k|                   LOG_TARGET_JOURNAL_OR_KMSG,
  287|  1.66k|                   LOG_TARGET_SYSLOG,
  288|  1.66k|                   LOG_TARGET_SYSLOG_OR_KMSG)) {
  289|       |
  290|      0|                if (!prohibit_ipc) {
  ------------------
  |  Branch (290:21): [True: 0, False: 0]
  ------------------
  291|      0|                        if (IN_SET(log_target,
  ------------------
  |  |  361|      0|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  362|      0|                bool _found = false;                                    \
  |  |  363|      0|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|      0|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|      0|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|      0|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|      0|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|      0|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  335|      0|#define  CASE_F_3(X, ...) case X:  CASE_F_2( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (335:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|      0|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  372|      0|                        ;                                               \
  |  |  373|      0|                }                                                       \
  |  |  374|      0|                _found;                                                 \
  |  |  375|      0|        })
  ------------------
  292|      0|                                   LOG_TARGET_AUTO,
  293|      0|                                   LOG_TARGET_JOURNAL_OR_KMSG,
  294|      0|                                   LOG_TARGET_JOURNAL)) {
  295|       |
  296|      0|                                r = log_open_journal();
  297|      0|                                if (r >= 0) {
  ------------------
  |  Branch (297:37): [True: 0, False: 0]
  ------------------
  298|      0|                                        log_close_syslog();
  299|      0|                                        log_close_console();
  300|      0|                                        return r;
  301|      0|                                }
  302|      0|                        }
  303|       |
  304|      0|                        if (IN_SET(log_target,
  ------------------
  |  |  361|      0|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  362|      0|                bool _found = false;                                    \
  |  |  363|      0|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|      0|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|      0|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|      0|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|      0|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|      0|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|      0|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  372|      0|                        ;                                               \
  |  |  373|      0|                }                                                       \
  |  |  374|      0|                _found;                                                 \
  |  |  375|      0|        })
  ------------------
  305|      0|                                   LOG_TARGET_SYSLOG_OR_KMSG,
  306|      0|                                   LOG_TARGET_SYSLOG)) {
  307|       |
  308|      0|                                r = log_open_syslog();
  309|      0|                                if (r >= 0) {
  ------------------
  |  Branch (309:37): [True: 0, False: 0]
  ------------------
  310|      0|                                        log_close_journal();
  311|      0|                                        log_close_console();
  312|      0|                                        return r;
  313|      0|                                }
  314|      0|                        }
  315|      0|                }
  316|       |
  317|      0|                if (IN_SET(log_target, LOG_TARGET_AUTO,
  ------------------
  |  |  361|      0|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  362|      0|                bool _found = false;                                    \
  |  |  363|      0|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|      0|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|      0|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|      0|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|      0|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|      0|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  336|      0|#define  CASE_F_4(X, ...) case X:  CASE_F_3( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  335|      0|#define  CASE_F_3(X, ...) case X:  CASE_F_2( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (335:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (336:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|      0|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  372|      0|                        ;                                               \
  |  |  373|      0|                }                                                       \
  |  |  374|      0|                _found;                                                 \
  |  |  375|      0|        })
  ------------------
  318|      0|                                       LOG_TARGET_JOURNAL_OR_KMSG,
  319|      0|                                       LOG_TARGET_SYSLOG_OR_KMSG,
  320|      0|                                       LOG_TARGET_KMSG)) {
  321|      0|                        r = log_open_kmsg();
  322|      0|                        if (r >= 0) {
  ------------------
  |  Branch (322:29): [True: 0, False: 0]
  ------------------
  323|      0|                                log_close_journal();
  324|      0|                                log_close_syslog();
  325|      0|                                log_close_console();
  326|      0|                                return r;
  327|      0|                        }
  328|      0|                }
  329|      0|        }
  330|       |
  331|  1.66k|        log_close_journal();
  332|  1.66k|        log_close_syslog();
  333|       |
  334|  1.66k|        return log_open_console();
  335|  1.66k|}
log_set_target:
  337|  1.66k|void log_set_target(LogTarget target) {
  338|  1.66k|        assert(target >= 0);
  ------------------
  |  |   72|  1.66k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.66k|        do {                                                            \
  |  |  |  |   59|  1.66k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.66k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.66k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.66k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.66k|        } while (false)
  |  |  ------------------
  ------------------
  339|  1.66k|        assert(target < _LOG_TARGET_MAX);
  ------------------
  |  |   72|  1.66k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.66k|        do {                                                            \
  |  |  |  |   59|  1.66k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.66k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.66k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.66k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.66k|        } while (false)
  |  |  ------------------
  ------------------
  340|       |
  341|  1.66k|        if (upgrade_syslog_to_journal) {
  ------------------
  |  Branch (341:13): [True: 0, False: 1.66k]
  ------------------
  342|      0|                if (target == LOG_TARGET_SYSLOG)
  ------------------
  |  Branch (342:21): [True: 0, False: 0]
  ------------------
  343|      0|                        target = LOG_TARGET_JOURNAL;
  344|      0|                else if (target == LOG_TARGET_SYSLOG_OR_KMSG)
  ------------------
  |  Branch (344:26): [True: 0, False: 0]
  ------------------
  345|      0|                        target = LOG_TARGET_JOURNAL_OR_KMSG;
  346|      0|        }
  347|       |
  348|  1.66k|        log_target = target;
  349|  1.66k|}
log_set_max_level:
  372|  1.66k|int log_set_max_level(int level) {
  373|  1.66k|        assert(level == LOG_NULL || log_level_is_valid(level));
  ------------------
  |  |   72|  1.66k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.66k|        do {                                                            \
  |  |  |  |   59|  1.66k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  3.32k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.66k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 1.66k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 1.66k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.66k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.66k|        } while (false)
  |  |  ------------------
  ------------------
  374|       |
  375|  1.66k|        int old = log_max_level;
  376|  1.66k|        log_max_level = level;
  377|       |
  378|       |        /* Also propagate max log level to libc's syslog(), just in case some other component loaded into our
  379|       |         * process logs directly via syslog(). You might wonder why we maintain our own log level variable if
  380|       |         * libc has the same functionality. This has multiple reasons, first and foremost that we want to
  381|       |         * apply this to all our log targets, not just syslog and console. Moreover, we cannot query the
  382|       |         * current log mask from glibc without changing it, but that's useful for testing the current log
  383|       |         * level before even entering the log functions like we do in our macros. */
  384|  1.66k|        setlogmask(LOG_UPTO(level));
  385|       |
  386|       |        /* Ensure that our own LOG_NULL define maps sanely to the log mask */
  387|  1.66k|        assert_cc(LOG_UPTO(LOG_NULL) == 0);
  ------------------
  |  |  142|  1.66k|#define assert_cc(expr) _Static_assert(expr, #expr)
  ------------------
  388|       |
  389|  1.66k|        return old;
  390|  1.66k|}
log_parse_environment_variables:
 1321|  1.66k|void log_parse_environment_variables(void) {
 1322|  1.66k|        const char *e;
 1323|  1.66k|        int r;
 1324|       |
 1325|  1.66k|        e = getenv("SYSTEMD_LOG_TARGET");
 1326|  1.66k|        if (e && log_set_target_from_string(e) < 0)
  ------------------
  |  Branch (1326:13): [True: 0, False: 1.66k]
  |  Branch (1326:18): [True: 0, False: 0]
  ------------------
 1327|  1.66k|                log_warning("Failed to parse log target '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1328|       |
 1329|  1.66k|        e = getenv("SYSTEMD_LOG_LEVEL");
 1330|  1.66k|        if (e) {
  ------------------
  |  Branch (1330:13): [True: 0, False: 1.66k]
  ------------------
 1331|      0|                r = log_set_max_level_from_string(e);
 1332|      0|                if (r < 0)
  ------------------
  |  Branch (1332:21): [True: 0, False: 0]
  ------------------
 1333|      0|                        log_warning_errno(r, "Failed to parse log level '%s', ignoring: %m", e);
  ------------------
  |  |  231|      0|#define log_warning_errno(error, ...)   log_full_errno(LOG_WARNING, error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
 1334|  1.66k|        } else {
 1335|       |                /* If no explicit log level is specified then let's see if this is a debug invocation, and if
 1336|       |                 * so raise the log level to debug too. Note that this is not symmetric: just because
 1337|       |                 * DEBUG_INVOCATION is explicitly set to 0 we won't lower the log level below debug. This
 1338|       |                 * follows the logic that debug logging is an opt-in thing anyway, and if there's any reason
 1339|       |                 * to enable it we should not disable it here automatically. */
 1340|  1.66k|                r = getenv_bool("DEBUG_INVOCATION");
 1341|  1.66k|                if (r < 0 && r != -ENXIO)
  ------------------
  |  Branch (1341:21): [True: 1.66k, False: 0]
  |  Branch (1341:30): [True: 0, False: 1.66k]
  ------------------
 1342|  1.66k|                        log_warning_errno(r, "Failed to parse $DEBUG_INVOCATION value, ignoring: %m");
  ------------------
  |  |  231|      0|#define log_warning_errno(error, ...)   log_full_errno(LOG_WARNING, error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
 1343|  1.66k|                else if (r > 0)
  ------------------
  |  Branch (1343:26): [True: 0, False: 1.66k]
  ------------------
 1344|      0|                        log_set_max_level(LOG_DEBUG);
 1345|  1.66k|        }
 1346|       |
 1347|  1.66k|        e = getenv("SYSTEMD_LOG_COLOR");
 1348|  1.66k|        if (e && log_show_color_from_string(e) < 0)
  ------------------
  |  Branch (1348:13): [True: 0, False: 1.66k]
  |  Branch (1348:18): [True: 0, False: 0]
  ------------------
 1349|  1.66k|                log_warning("Failed to parse log color '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1350|       |
 1351|  1.66k|        e = getenv("SYSTEMD_LOG_LOCATION");
 1352|  1.66k|        if (e && log_show_location_from_string(e) < 0)
  ------------------
  |  Branch (1352:13): [True: 0, False: 1.66k]
  |  Branch (1352:18): [True: 0, False: 0]
  ------------------
 1353|  1.66k|                log_warning("Failed to parse log location '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1354|       |
 1355|  1.66k|        e = getenv("SYSTEMD_LOG_TIME");
 1356|  1.66k|        if (e && log_show_time_from_string(e) < 0)
  ------------------
  |  Branch (1356:13): [True: 0, False: 1.66k]
  |  Branch (1356:18): [True: 0, False: 0]
  ------------------
 1357|  1.66k|                log_warning("Failed to parse log time '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1358|       |
 1359|  1.66k|        e = getenv("SYSTEMD_LOG_TID");
 1360|  1.66k|        if (e && log_show_tid_from_string(e) < 0)
  ------------------
  |  Branch (1360:13): [True: 0, False: 1.66k]
  |  Branch (1360:18): [True: 0, False: 0]
  ------------------
 1361|  1.66k|                log_warning("Failed to parse log tid '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1362|       |
 1363|  1.66k|        e = getenv("SYSTEMD_LOG_RATELIMIT_KMSG");
 1364|  1.66k|        if (e && log_set_ratelimit_kmsg_from_string(e) < 0)
  ------------------
  |  Branch (1364:13): [True: 0, False: 1.66k]
  |  Branch (1364:18): [True: 0, False: 0]
  ------------------
 1365|  1.66k|                log_warning("Failed to parse log ratelimit kmsg boolean '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1366|  1.66k|}
log_parse_environment:
 1368|  1.66k|void log_parse_environment(void) {
 1369|       |        /* Do not call from library code. */
 1370|       |
 1371|  1.66k|        if (should_parse_proc_cmdline())
  ------------------
  |  Branch (1371:13): [True: 0, False: 1.66k]
  ------------------
 1372|      0|                (void) proc_cmdline_parse(parse_proc_cmdline_item, NULL, PROC_CMDLINE_STRIP_RD_PREFIX);
 1373|       |
 1374|  1.66k|        log_parse_environment_variables();
 1375|  1.66k|}
log_get_max_level:
 1399|   311k|int log_get_max_level(void) {
 1400|   311k|        return log_max_level;
 1401|   311k|}
log_show_color:
 1409|      1|void log_show_color(bool b) {
 1410|      1|        show_color = b;
 1411|      1|}
log_on_console:
 1485|  1.66k|bool log_on_console(void) {
 1486|  1.66k|        if (IN_SET(log_target, LOG_TARGET_CONSOLE,
  ------------------
  |  |  361|  1.66k|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 1.66k]
  |  |  ------------------
  |  |  362|  1.66k|                bool _found = false;                                    \
  |  |  363|  1.66k|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  1.66k|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  1.66k|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  1.66k|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  1.66k|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  1.66k|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 1.66k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 1.66k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|  1.66k|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 1.66k, False: 0]
  |  |  ------------------
  |  |  372|  1.66k|                        ;                                               \
  |  |  373|  1.66k|                }                                                       \
  |  |  374|  1.66k|                _found;                                                 \
  |  |  375|  1.66k|        })
  ------------------
 1487|  1.66k|                               LOG_TARGET_CONSOLE_PREFIXED))
 1488|      0|                return true;
 1489|       |
 1490|  1.66k|        return syslog_fd < 0 && kmsg_fd < 0 && journal_fd < 0;
  ------------------
  |  Branch (1490:16): [True: 1.66k, False: 0]
  |  Branch (1490:33): [True: 1.66k, False: 0]
  |  Branch (1490:48): [True: 1.66k, False: 0]
  ------------------
 1491|  1.66k|}
log_setup:
 1714|  1.66k|void log_setup(void) {
 1715|  1.66k|        log_set_target(LOG_TARGET_AUTO);
 1716|  1.66k|        log_parse_environment();
 1717|  1.66k|        (void) log_open();
 1718|  1.66k|        if (log_on_console() && show_color < 0)
  ------------------
  |  Branch (1718:13): [True: 1.66k, False: 0]
  |  Branch (1718:33): [True: 1, False: 1.66k]
  ------------------
 1719|      1|                log_show_color(true);
 1720|  1.66k|}
log.c:log_close_journal:
  202|  1.66k|static void log_close_journal(void) {
  203|       |        /* If the journal FD is bad, safe_close will fail, and will try to log, which will fail, so we'll
  204|       |         * try to close the journal FD, which is bad, so safe_close will fail... Whether we can close it
  205|       |         * or not, invalidate it immediately so that we don't get in a recursive loop until we run out of
  206|       |         * stack. */
  207|  1.66k|        (void) safe_close(TAKE_FD(journal_fd));
  ------------------
  |  |   99|  1.66k|#define TAKE_FD(fd) TAKE_GENERIC(fd, int, -EBADF)
  |  |  ------------------
  |  |  |  |  380|  1.66k|        ({                                                       \
  |  |  |  |  381|  1.66k|                type *_pvar_ = &(var);                           \
  |  |  |  |  382|  1.66k|                type _var_ = *_pvar_;                            \
  |  |  |  |  383|  1.66k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  384|  1.66k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  385|  1.66k|                _var_;                                           \
  |  |  |  |  386|  1.66k|        })
  |  |  ------------------
  ------------------
  208|  1.66k|}
log.c:log_close_syslog:
  136|  1.66k|static void log_close_syslog(void) {
  137|       |        /* See comment in log_close_journal() */
  138|  1.66k|        (void) safe_close(TAKE_FD(syslog_fd));
  ------------------
  |  |   99|  1.66k|#define TAKE_FD(fd) TAKE_GENERIC(fd, int, -EBADF)
  |  |  ------------------
  |  |  |  |  380|  1.66k|        ({                                                       \
  |  |  |  |  381|  1.66k|                type *_pvar_ = &(var);                           \
  |  |  |  |  382|  1.66k|                type _var_ = *_pvar_;                            \
  |  |  |  |  383|  1.66k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  384|  1.66k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  385|  1.66k|                _var_;                                           \
  |  |  |  |  386|  1.66k|        })
  |  |  ------------------
  ------------------
  139|  1.66k|}
log.c:log_open_console:
   96|  1.66k|static int log_open_console(void) {
   97|       |
   98|  1.66k|        if (!always_reopen_console) {
  ------------------
  |  Branch (98:13): [True: 1.66k, False: 0]
  ------------------
   99|  1.66k|                console_fd = STDERR_FILENO;
  100|  1.66k|                console_fd_is_tty = -1;
  101|  1.66k|                return 0;
  102|  1.66k|        }
  103|       |
  104|      0|        if (console_fd < 3) {
  ------------------
  |  Branch (104:13): [True: 0, False: 0]
  ------------------
  105|      0|                int fd;
  106|       |
  107|      0|                fd = open_terminal("/dev/console", O_WRONLY|O_NOCTTY|O_CLOEXEC);
  108|      0|                if (fd < 0)
  ------------------
  |  Branch (108:21): [True: 0, False: 0]
  ------------------
  109|      0|                        return fd;
  110|       |
  111|      0|                console_fd = fd_move_above_stdio(fd);
  112|      0|                console_fd_is_tty = true;
  113|      0|        }
  114|       |
  115|      0|        return 0;
  116|      0|}
log.c:should_parse_proc_cmdline:
 1312|  1.66k|static bool should_parse_proc_cmdline(void) {
 1313|       |        /* PID1 always reads the kernel command line. */
 1314|  1.66k|        if (getpid_cached() == 1)
  ------------------
  |  Branch (1314:13): [True: 0, False: 1.66k]
  ------------------
 1315|      0|                return true;
 1316|       |
 1317|       |        /* Otherwise, parse the command line if invoked directly by systemd. */
 1318|  1.66k|        return invoked_by_systemd();
 1319|  1.66k|}

page_size:
    9|      6|size_t page_size(void) {
   10|      6|        static thread_local size_t pgsz = 0;
   11|      6|        long r;
   12|       |
   13|      6|        if (_likely_(pgsz > 0))
  ------------------
  |  |   83|      6|#define _likely_(x) (__builtin_expect(!!(x), 1))
  |  |  ------------------
  |  |  |  Branch (83:21): [True: 5, False: 1]
  |  |  ------------------
  ------------------
   14|      5|                return pgsz;
   15|       |
   16|      1|        r = sysconf(_SC_PAGESIZE);
   17|      1|        assert(r > 0);
  ------------------
  |  |   72|      1|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      1|        do {                                                            \
  |  |  |  |   59|      1|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      1|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      1|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      1|        } while (false)
  |  |  ------------------
  ------------------
   18|       |
   19|      1|        pgsz = (size_t) r;
   20|      1|        return pgsz;
   21|      6|}
memeqbyte:
   23|  33.6k|bool memeqbyte(uint8_t byte, const void *data, size_t length) {
   24|       |        /* Does the buffer consist entirely of the same specific byte value?
   25|       |         * Copied from https://github.com/systemd/casync/, copied in turn from
   26|       |         * https://github.com/rustyrussell/ccan/blob/master/ccan/mem/mem.c#L92,
   27|       |         * which is licensed CC-0.
   28|       |         */
   29|       |
   30|  33.6k|        const uint8_t *p = data;
   31|       |
   32|       |        /* Check first 16 bytes manually */
   33|   504k|        for (size_t i = 0; i < 16; i++, length--) {
  ------------------
  |  Branch (33:28): [True: 503k, False: 881]
  ------------------
   34|   503k|                if (length == 0)
  ------------------
  |  Branch (34:21): [True: 0, False: 503k]
  ------------------
   35|      0|                        return true;
   36|   503k|                if (p[i] != byte)
  ------------------
  |  Branch (36:21): [True: 32.7k, False: 471k]
  ------------------
   37|  32.7k|                        return false;
   38|   503k|        }
   39|       |
   40|       |        /* Now we know first 16 bytes match, memcmp() with self.  */
   41|    881|        return memcmp(data, p + 16, length) == 0;
   42|  33.6k|}

alloc-util.c:memcpy_safe:
   18|   142k|static inline void* memcpy_safe(void *dst, const void *src, size_t n) {
   19|   142k|        if (n == 0)
  ------------------
  |  Branch (19:13): [True: 0, False: 142k]
  ------------------
   20|      0|                return dst;
   21|   142k|        assert(src);
  ------------------
  |  |   72|   142k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   142k|        do {                                                            \
  |  |  |  |   59|   142k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   142k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 142k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   142k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   142k|        } while (false)
  |  |  ------------------
  ------------------
   22|   142k|        return memcpy(dst, src, n);
   23|   142k|}
hashmap.c:mempset:
   66|   174k|static inline void* mempset(void *s, int c, size_t n) {
   67|   174k|        memset(s, c, n);
   68|   174k|        return (uint8_t*) s + n;
   69|   174k|}

mempool_alloc_tile:
   21|  87.4k|void* mempool_alloc_tile(struct mempool *mp) {
   22|  87.4k|        size_t i;
   23|       |
   24|       |        /* When a tile is released we add it to the list and simply
   25|       |         * place the next pointer at its offset 0. */
   26|       |
   27|  87.4k|        assert(mp);
  ------------------
  |  |   72|  87.4k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  87.4k|        do {                                                            \
  |  |  |  |   59|  87.4k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  87.4k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 87.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  87.4k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  87.4k|        } while (false)
  |  |  ------------------
  ------------------
   28|  87.4k|        assert(mp->tile_size >= sizeof(void*));
  ------------------
  |  |   72|  87.4k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  87.4k|        do {                                                            \
  |  |  |  |   59|  87.4k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  87.4k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 87.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  87.4k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  87.4k|        } while (false)
  |  |  ------------------
  ------------------
   29|  87.4k|        assert(mp->at_least > 0);
  ------------------
  |  |   72|  87.4k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  87.4k|        do {                                                            \
  |  |  |  |   59|  87.4k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  87.4k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 87.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  87.4k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  87.4k|        } while (false)
  |  |  ------------------
  ------------------
   30|       |
   31|  87.4k|        if (mp->freelist) {
  ------------------
  |  Branch (31:13): [True: 84.9k, False: 2.47k]
  ------------------
   32|  84.9k|                void *t;
   33|       |
   34|  84.9k|                t = mp->freelist;
   35|  84.9k|                mp->freelist = *(void**) mp->freelist;
   36|  84.9k|                return t;
   37|  84.9k|        }
   38|       |
   39|  2.47k|        if (_unlikely_(!mp->first_pool) ||
  ------------------
  |  |   95|  4.95k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:23): [True: 1, False: 2.47k]
  |  |  ------------------
  ------------------
   40|  2.47k|            _unlikely_(mp->first_pool->n_used >= mp->first_pool->n_tiles)) {
  ------------------
  |  |   95|  2.47k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:23): [True: 5, False: 2.47k]
  |  |  ------------------
  ------------------
   41|      6|                size_t size, n;
   42|      6|                struct pool *p;
   43|       |
   44|      6|                n = mp->first_pool ? mp->first_pool->n_tiles : 0;
  ------------------
  |  Branch (44:21): [True: 5, False: 1]
  ------------------
   45|      6|                n = MAX(mp->at_least, n * 2);
  ------------------
  |  |  163|      6|#define MAX(a, b) __MAX(UNIQ, (a), UNIQ, (b))
  |  |  ------------------
  |  |  |  |  165|      6|        ({                                              \
  |  |  |  |  166|      6|                const typeof(a) UNIQ_T(A, aq) = (a);    \
  |  |  |  |  167|      6|                const typeof(b) UNIQ_T(B, bq) = (b);    \
  |  |  |  |  168|      6|                UNIQ_T(A, aq) > UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      6|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|      6|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|      6|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) > UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      6|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|      6|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|      6|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) > UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      6|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|      6|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|      6|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) > UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      6|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|      6|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|      6|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (168:17): [True: 1, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  169|      6|        })
  |  |  ------------------
  ------------------
   46|      6|                size = PAGE_ALIGN(ALIGN(sizeof(struct pool)) + n*mp->tile_size);
  ------------------
  |  |   10|      6|#define PAGE_ALIGN(l)          ALIGN_TO(l, page_size())
  ------------------
   47|      6|                n = (size - ALIGN(sizeof(struct pool))) / mp->tile_size;
  ------------------
  |  |  124|      6|#define ALIGN(l)  ALIGN_TO(l, sizeof(void*))
  ------------------
   48|       |
   49|      6|                p = malloc(size);
   50|      6|                if (!p)
  ------------------
  |  Branch (50:21): [True: 0, False: 6]
  ------------------
   51|      0|                        return NULL;
   52|       |
   53|      6|                p->next = mp->first_pool;
   54|      6|                p->n_tiles = n;
   55|      6|                p->n_used = 0;
   56|       |
   57|      6|                mp->first_pool = p;
   58|      6|        }
   59|       |
   60|  2.47k|        i = mp->first_pool->n_used++;
   61|       |
   62|  2.47k|        return (uint8_t*) pool_ptr(mp->first_pool) + i*mp->tile_size;
   63|  2.47k|}
mempool_alloc0_tile:
   65|  87.4k|void* mempool_alloc0_tile(struct mempool *mp) {
   66|  87.4k|        void *p;
   67|       |
   68|  87.4k|        p = mempool_alloc_tile(mp);
   69|  87.4k|        if (p)
  ------------------
  |  Branch (69:13): [True: 87.4k, False: 0]
  ------------------
   70|  87.4k|                memzero(p, mp->tile_size);
  ------------------
  |  |   17|  87.4k|        ({                                                      \
  |  |   18|  87.4k|                size_t _l_ = (l);                               \
  |  |   19|  87.4k|                _l_ > 0 ? memset((x), 0, _l_) : (x);            \
  |  |  ------------------
  |  |  |  Branch (19:17): [True: 87.4k, False: 0]
  |  |  ------------------
  |  |   20|  87.4k|        })
  ------------------
   71|  87.4k|        return p;
   72|  87.4k|}
mempool_free_tile:
   74|  87.4k|void* mempool_free_tile(struct mempool *mp, void *p) {
   75|  87.4k|        assert(mp);
  ------------------
  |  |   72|  87.4k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  87.4k|        do {                                                            \
  |  |  |  |   59|  87.4k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  87.4k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 87.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  87.4k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  87.4k|        } while (false)
  |  |  ------------------
  ------------------
   76|       |
   77|  87.4k|        if (!p)
  ------------------
  |  Branch (77:13): [True: 0, False: 87.4k]
  ------------------
   78|      0|                return NULL;
   79|       |
   80|  87.4k|        *(void**) p = mp->freelist;
   81|  87.4k|        mp->freelist = p;
   82|       |
   83|  87.4k|        return NULL;
   84|  87.4k|}
mempool.c:pool_ptr:
   17|  2.47k|static void* pool_ptr(struct pool *p) {
   18|  2.47k|        return ((uint8_t*) ASSERT_PTR(p)) + ALIGN(sizeof(struct pool));
  ------------------
  |  |   81|  2.47k|#define ASSERT_PTR(expr) _ASSERT_PTR(expr, UNIQ_T(_expr_, UNIQ), assert)
  |  |  ------------------
  |  |  |  |   84|  2.47k|        ({                                 \
  |  |  |  |   85|  2.47k|                typeof(expr) var = (expr); \
  |  |  |  |   86|  2.47k|                check(var);                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|  2.47k|#define ASSERT_PTR(expr) _ASSERT_PTR(expr, UNIQ_T(_expr_, UNIQ), assert)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|  2.47k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|  2.47k|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|  2.47k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|  2.47k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.47k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|  2.47k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|  2.47k|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   87|  2.47k|                var;                       \
  |  |  |  |   88|  2.47k|        })
  |  |  ------------------
  ------------------
                      return ((uint8_t*) ASSERT_PTR(p)) + ALIGN(sizeof(struct pool));
  ------------------
  |  |  124|  2.47k|#define ALIGN(l)  ALIGN_TO(l, sizeof(void*))
  ------------------
   19|  2.47k|}

is_main_thread:
 1239|   174k|bool is_main_thread(void) {
 1240|   174k|        static thread_local int cached = -1;
 1241|       |
 1242|   174k|        if (cached < 0)
  ------------------
  |  Branch (1242:13): [True: 1, False: 174k]
  ------------------
 1243|      1|                cached = getpid_cached() == gettid();
 1244|       |
 1245|   174k|        return cached;
 1246|   174k|}
getpid_cached:
 1387|  3.32k|pid_t getpid_cached(void) {
 1388|  3.32k|        static bool installed = false;
 1389|  3.32k|        pid_t current_value = CACHED_PID_UNSET;
  ------------------
  |  | 1377|  3.32k|#define CACHED_PID_UNSET ((pid_t) 0)
  ------------------
 1390|       |
 1391|       |        /* getpid_cached() is much like getpid(), but caches the value in local memory, to avoid having to invoke a
 1392|       |         * system call each time. This restores glibc behaviour from before 2.24, when getpid() was unconditionally
 1393|       |         * cached. Starting with 2.24 getpid() started to become prohibitively expensive when used for detecting when
 1394|       |         * objects were used across fork()s. With this caching the old behaviour is somewhat restored.
 1395|       |         *
 1396|       |         * https://bugzilla.redhat.com/show_bug.cgi?id=1443976
 1397|       |         * https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c579f48edba88380635ab98cb612030e3ed8691e
 1398|       |         */
 1399|       |
 1400|  3.32k|        (void) __atomic_compare_exchange_n(
 1401|  3.32k|                        &cached_pid,
 1402|  3.32k|                        &current_value,
 1403|  3.32k|                        CACHED_PID_BUSY,
  ------------------
  |  | 1378|  3.32k|#define CACHED_PID_BUSY ((pid_t) -1)
  ------------------
 1404|  3.32k|                        false,
 1405|  3.32k|                        __ATOMIC_SEQ_CST,
 1406|  3.32k|                        __ATOMIC_SEQ_CST);
 1407|       |
 1408|  3.32k|        switch (current_value) {
 1409|       |
 1410|      1|        case CACHED_PID_UNSET: { /* Not initialized yet, then do so now */
  ------------------
  |  | 1377|      1|#define CACHED_PID_UNSET ((pid_t) 0)
  ------------------
  |  Branch (1410:9): [True: 1, False: 3.32k]
  ------------------
 1411|      1|                pid_t new_pid;
 1412|       |
 1413|      1|                new_pid = getpid();
 1414|       |
 1415|      1|                if (!installed) {
  ------------------
  |  Branch (1415:21): [True: 1, False: 0]
  ------------------
 1416|       |                        /* __register_atfork() either returns 0 or -ENOMEM, in its glibc implementation. Since it's
 1417|       |                         * only half-documented (glibc doesn't document it but LSB does — though only superficially)
 1418|       |                         * we'll check for errors only in the most generic fashion possible. */
 1419|       |
 1420|      1|                        if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) {
  ------------------
  |  Branch (1420:29): [True: 0, False: 1]
  ------------------
 1421|       |                                /* OOM? Let's try again later */
 1422|      0|                                cached_pid = CACHED_PID_UNSET;
  ------------------
  |  | 1377|      0|#define CACHED_PID_UNSET ((pid_t) 0)
  ------------------
 1423|      0|                                return new_pid;
 1424|      0|                        }
 1425|       |
 1426|      1|                        installed = true;
 1427|      1|                }
 1428|       |
 1429|      1|                cached_pid = new_pid;
 1430|      1|                return new_pid;
 1431|      1|        }
 1432|       |
 1433|      0|        case CACHED_PID_BUSY: /* Somebody else is currently initializing */
  ------------------
  |  | 1378|      0|#define CACHED_PID_BUSY ((pid_t) -1)
  ------------------
  |  Branch (1433:9): [True: 0, False: 3.32k]
  ------------------
 1434|      0|                return getpid();
 1435|       |
 1436|  3.32k|        default: /* Properly initialized */
  ------------------
  |  Branch (1436:9): [True: 3.32k, False: 1]
  ------------------
 1437|  3.32k|                return current_value;
 1438|  3.32k|        }
 1439|  3.32k|}

random_bytes:
   69|  7.66k|void random_bytes(void *p, size_t n) {
   70|  7.66k|        static bool have_grndinsecure = true;
   71|       |
   72|  7.66k|        assert(p || n == 0);
  ------------------
  |  |   72|  7.66k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  7.66k|        do {                                                            \
  |  |  |  |   59|  7.66k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  7.66k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 7.66k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 7.66k, False: 0]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  7.66k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  7.66k|        } while (false)
  |  |  ------------------
  ------------------
   73|       |
   74|  7.66k|        if (n == 0)
  ------------------
  |  Branch (74:13): [True: 0, False: 7.66k]
  ------------------
   75|      0|                return;
   76|       |
   77|  7.66k|        for (;;) {
   78|  7.66k|                ssize_t l;
   79|       |
   80|  7.66k|                l = getrandom(p, n, have_grndinsecure ? GRND_INSECURE : GRND_NONBLOCK);
  ------------------
  |  Branch (80:37): [True: 7.66k, False: 0]
  ------------------
   81|  7.66k|                if (l < 0 && errno == EINVAL && have_grndinsecure) {
  ------------------
  |  Branch (81:21): [True: 0, False: 7.66k]
  |  Branch (81:30): [True: 0, False: 0]
  |  Branch (81:49): [True: 0, False: 0]
  ------------------
   82|       |                        /* No GRND_INSECURE; fallback to GRND_NONBLOCK. */
   83|      0|                        have_grndinsecure = false;
   84|      0|                        continue;
   85|      0|                }
   86|  7.66k|                if (l <= 0)
  ------------------
  |  Branch (86:21): [True: 0, False: 7.66k]
  ------------------
   87|      0|                        break; /* Will block (with GRND_NONBLOCK), or unexpected error. Give up and fallback
   88|       |                                  to /dev/urandom. */
   89|       |
   90|  7.66k|                if ((size_t) l == n)
  ------------------
  |  Branch (90:21): [True: 7.66k, False: 0]
  ------------------
   91|  7.66k|                        return; /* Done reading, success. */
   92|       |
   93|      0|                p = (uint8_t *) p + l;
   94|      0|                n -= l;
   95|       |                /* Interrupted by a signal; keep going. */
   96|      0|        }
   97|       |
   98|      0|        _cleanup_close_ int fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY);
  ------------------
  |  |   60|      0|#define _cleanup_close_ _cleanup_(closep)
  |  |  ------------------
  |  |  |  |   78|      0|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
   99|      0|        if (fd >= 0 && loop_read_exact(fd, p, n, false) >= 0)
  ------------------
  |  Branch (99:13): [True: 0, False: 0]
  |  Branch (99:24): [True: 0, False: 0]
  ------------------
  100|      0|                return;
  101|       |
  102|       |        /* This is a terrible fallback. Oh well. */
  103|      0|        fallback_random_bytes(p, n);
  104|      0|}

resolved-etc-hosts.c:set_free:
   12|  92.1k|static inline Set* set_free(Set *s) {
   13|  92.1k|        return (Set*) _hashmap_free(HASHMAP_BASE(s));
  ------------------
  |  |   46|  92.1k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  ------------------
  |  |  |  |   36|  92.1k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   37|  92.1k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   38|  92.1k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   39|  92.1k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|  92.1k|                (HashmapBase*)(h), \
  |  |   48|  92.1k|                (void)0)
  ------------------
   14|  92.1k|}
resolved-etc-hosts.c:set_contains:
   28|   585k|static inline bool set_contains(const Set *s, const void *key) {
   29|   585k|        return _hashmap_contains(HASHMAP_BASE((Set *) s), key);
  ------------------
  |  |   46|   585k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  ------------------
  |  |  |  |   36|   585k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   37|   585k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   38|   585k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   39|   585k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|   585k|                (HashmapBase*)(h), \
  |  |   48|   585k|                (void)0)
  ------------------
   30|   585k|}
resolved-etc-hosts.c:set_iterate:
   66|  12.4k|static inline bool set_iterate(const Set *s, Iterator *i, void **value) {
   67|  12.4k|        return _hashmap_iterate(HASHMAP_BASE((Set*) s), i, value, NULL);
  ------------------
  |  |   46|  12.4k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  ------------------
  |  |  |  |   36|  12.4k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   37|  12.4k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   38|  12.4k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   39|  12.4k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|  12.4k|                (HashmapBase*)(h), \
  |  |   48|  12.4k|                (void)0)
  ------------------
   68|  12.4k|}

siphash24_init:
   53|  4.42M|void siphash24_init(struct siphash *state, const uint8_t k[static 16]) {
   54|  4.42M|        uint64_t k0, k1;
   55|       |
   56|  4.42M|        assert(state);
  ------------------
  |  |   72|  4.42M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  4.42M|        do {                                                            \
  |  |  |  |   59|  4.42M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  4.42M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 4.42M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  4.42M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  4.42M|        } while (false)
  |  |  ------------------
  ------------------
   57|  4.42M|        assert(k);
  ------------------
  |  |   72|  4.42M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  4.42M|        do {                                                            \
  |  |  |  |   59|  4.42M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  4.42M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 4.42M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  4.42M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  4.42M|        } while (false)
  |  |  ------------------
  ------------------
   58|       |
   59|  4.42M|        k0 = unaligned_read_le64(k);
   60|  4.42M|        k1 = unaligned_read_le64(k + 8);
   61|       |
   62|  4.42M|        *state = (struct siphash) {
   63|       |                /* "somepseudorandomlygeneratedbytes" */
   64|  4.42M|                .v0 = 0x736f6d6570736575ULL ^ k0,
   65|  4.42M|                .v1 = 0x646f72616e646f6dULL ^ k1,
   66|  4.42M|                .v2 = 0x6c7967656e657261ULL ^ k0,
   67|  4.42M|                .v3 = 0x7465646279746573ULL ^ k1,
   68|  4.42M|                .padding = 0,
   69|  4.42M|                .inlen = 0,
   70|  4.42M|        };
   71|  4.42M|}
siphash24_compress:
   73|  18.7M|void siphash24_compress(const void *_in, size_t inlen, struct siphash *state) {
   74|       |
   75|  18.7M|        const uint8_t *in = ASSERT_PTR(_in);
  ------------------
  |  |   81|  18.7M|#define ASSERT_PTR(expr) _ASSERT_PTR(expr, UNIQ_T(_expr_, UNIQ), assert)
  |  |  ------------------
  |  |  |  |   84|  18.7M|        ({                                 \
  |  |  |  |   85|  18.7M|                typeof(expr) var = (expr); \
  |  |  |  |   86|  18.7M|                check(var);                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|  18.7M|#define ASSERT_PTR(expr) _ASSERT_PTR(expr, UNIQ_T(_expr_, UNIQ), assert)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|  18.7M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|  18.7M|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|  18.7M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|  18.7M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 18.7M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|  18.7M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|  18.7M|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   87|  18.7M|                var;                       \
  |  |  |  |   88|  18.7M|        })
  |  |  ------------------
  ------------------
   76|  18.7M|        const uint8_t *end = in + inlen;
   77|  18.7M|        size_t left = state->inlen & 7;
   78|  18.7M|        uint64_t m;
   79|       |
   80|  18.7M|        assert(state);
  ------------------
  |  |   72|  18.7M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  18.7M|        do {                                                            \
  |  |  |  |   59|  18.7M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  18.7M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 18.7M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  18.7M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  18.7M|        } while (false)
  |  |  ------------------
  ------------------
   81|       |
   82|       |        /* Update total length */
   83|  18.7M|        state->inlen += inlen;
   84|       |
   85|       |        /* If padding exists, fill it out */
   86|  18.7M|        if (left > 0) {
  ------------------
  |  Branch (86:13): [True: 13.0M, False: 5.63M]
  ------------------
   87|  33.9M|                for ( ; in < end && left < 8; in ++, left ++)
  ------------------
  |  Branch (87:25): [True: 22.8M, False: 11.0M]
  |  Branch (87:37): [True: 20.8M, False: 1.97M]
  ------------------
   88|  20.8M|                        state->padding |= ((uint64_t) *in) << (left * 8);
   89|       |
   90|  13.0M|                if (in == end && left < 8)
  ------------------
  |  Branch (90:21): [True: 11.0M, False: 1.97M]
  |  Branch (90:34): [True: 9.78M, False: 1.31M]
  ------------------
   91|       |                        /* We did not have enough input to fill out the padding completely */
   92|  9.78M|                        return;
   93|       |
   94|       |#if ENABLE_DEBUG_SIPHASH
   95|       |                printf("(%3zu) v0 %08x %08x\n", state->inlen, (uint32_t) (state->v0 >> 32), (uint32_t) state->v0);
   96|       |                printf("(%3zu) v1 %08x %08x\n", state->inlen, (uint32_t) (state->v1 >> 32), (uint32_t) state->v1);
   97|       |                printf("(%3zu) v2 %08x %08x\n", state->inlen, (uint32_t) (state->v2 >> 32), (uint32_t) state->v2);
   98|       |                printf("(%3zu) v3 %08x %08x\n", state->inlen, (uint32_t) (state->v3 >> 32), (uint32_t) state->v3);
   99|       |                printf("(%3zu) compress padding %08x %08x\n", state->inlen, (uint32_t) (state->padding >> 32), (uint32_t)state->padding);
  100|       |#endif
  101|       |
  102|  3.28M|                state->v3 ^= state->padding;
  103|  3.28M|                sipround(state);
  104|  3.28M|                sipround(state);
  105|  3.28M|                state->v0 ^= state->padding;
  106|       |
  107|  3.28M|                state->padding = 0;
  108|  3.28M|        }
  109|       |
  110|  8.92M|        end -= (state->inlen % sizeof(uint64_t));
  111|       |
  112|  11.2M|        for ( ; in < end; in += 8) {
  ------------------
  |  Branch (112:17): [True: 2.29M, False: 8.92M]
  ------------------
  113|  2.29M|                m = unaligned_read_le64(in);
  114|       |#if ENABLE_DEBUG_SIPHASH
  115|       |                printf("(%3zu) v0 %08x %08x\n", state->inlen, (uint32_t) (state->v0 >> 32), (uint32_t) state->v0);
  116|       |                printf("(%3zu) v1 %08x %08x\n", state->inlen, (uint32_t) (state->v1 >> 32), (uint32_t) state->v1);
  117|       |                printf("(%3zu) v2 %08x %08x\n", state->inlen, (uint32_t) (state->v2 >> 32), (uint32_t) state->v2);
  118|       |                printf("(%3zu) v3 %08x %08x\n", state->inlen, (uint32_t) (state->v3 >> 32), (uint32_t) state->v3);
  119|       |                printf("(%3zu) compress %08x %08x\n", state->inlen, (uint32_t) (m >> 32), (uint32_t) m);
  120|       |#endif
  121|  2.29M|                state->v3 ^= m;
  122|  2.29M|                sipround(state);
  123|  2.29M|                sipround(state);
  124|  2.29M|                state->v0 ^= m;
  125|  2.29M|        }
  126|       |
  127|  8.92M|        left = state->inlen & 7;
  128|  8.92M|        switch (left) {
  ------------------
  |  Branch (128:17): [True: 0, False: 8.92M]
  ------------------
  129|   304k|                case 7:
  ------------------
  |  Branch (129:17): [True: 304k, False: 8.62M]
  ------------------
  130|   304k|                        state->padding |= ((uint64_t) in[6]) << 48;
  131|   304k|                        _fallthrough_;
  ------------------
  |  |  111|   304k|#  define _fallthrough_ __attribute__((__fallthrough__))
  ------------------
  132|   646k|                case 6:
  ------------------
  |  Branch (132:17): [True: 341k, False: 8.58M]
  ------------------
  133|   646k|                        state->padding |= ((uint64_t) in[5]) << 40;
  134|   646k|                        _fallthrough_;
  ------------------
  |  |  111|   646k|#  define _fallthrough_ __attribute__((__fallthrough__))
  ------------------
  135|  1.01M|                case 5:
  ------------------
  |  Branch (135:17): [True: 372k, False: 8.55M]
  ------------------
  136|  1.01M|                        state->padding |= ((uint64_t) in[4]) << 32;
  137|  1.01M|                        _fallthrough_;
  ------------------
  |  |  111|  1.01M|#  define _fallthrough_ __attribute__((__fallthrough__))
  ------------------
  138|  2.86M|                case 4:
  ------------------
  |  Branch (138:17): [True: 1.84M, False: 7.08M]
  ------------------
  139|  2.86M|                        state->padding |= ((uint64_t) in[3]) << 24;
  140|  2.86M|                        _fallthrough_;
  ------------------
  |  |  111|  2.86M|#  define _fallthrough_ __attribute__((__fallthrough__))
  ------------------
  141|  3.90M|                case 3:
  ------------------
  |  Branch (141:17): [True: 1.04M, False: 7.88M]
  ------------------
  142|  3.90M|                        state->padding |= ((uint64_t) in[2]) << 16;
  143|  3.90M|                        _fallthrough_;
  ------------------
  |  |  111|  3.90M|#  define _fallthrough_ __attribute__((__fallthrough__))
  ------------------
  144|  5.06M|                case 2:
  ------------------
  |  Branch (144:17): [True: 1.15M, False: 7.76M]
  ------------------
  145|  5.06M|                        state->padding |= ((uint64_t) in[1]) <<  8;
  146|  5.06M|                        _fallthrough_;
  ------------------
  |  |  111|  5.06M|#  define _fallthrough_ __attribute__((__fallthrough__))
  ------------------
  147|  7.35M|                case 1:
  ------------------
  |  Branch (147:17): [True: 2.28M, False: 6.64M]
  ------------------
  148|  7.35M|                        state->padding |= ((uint64_t) in[0]);
  149|  7.35M|                        _fallthrough_;
  ------------------
  |  |  111|  7.35M|#  define _fallthrough_ __attribute__((__fallthrough__))
  ------------------
  150|  8.92M|                case 0:
  ------------------
  |  Branch (150:17): [True: 1.57M, False: 7.35M]
  ------------------
  151|  8.92M|                        break;
  152|  8.92M|        }
  153|  8.92M|}
siphash24_finalize:
  159|  4.42M|uint64_t siphash24_finalize(struct siphash *state) {
  160|  4.42M|        uint64_t b;
  161|       |
  162|  4.42M|        assert(state);
  ------------------
  |  |   72|  4.42M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  4.42M|        do {                                                            \
  |  |  |  |   59|  4.42M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  4.42M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 4.42M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  4.42M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  4.42M|        } while (false)
  |  |  ------------------
  ------------------
  163|       |
  164|  4.42M|        b = state->padding | (((uint64_t) state->inlen) << 56);
  165|       |
  166|       |#if ENABLE_DEBUG_SIPHASH
  167|       |        printf("(%3zu) v0 %08x %08x\n", state->inlen, (uint32_t) (state->v0 >> 32), (uint32_t) state->v0);
  168|       |        printf("(%3zu) v1 %08x %08x\n", state->inlen, (uint32_t) (state->v1 >> 32), (uint32_t) state->v1);
  169|       |        printf("(%3zu) v2 %08x %08x\n", state->inlen, (uint32_t) (state->v2 >> 32), (uint32_t) state->v2);
  170|       |        printf("(%3zu) v3 %08x %08x\n", state->inlen, (uint32_t) (state->v3 >> 32), (uint32_t) state->v3);
  171|       |        printf("(%3zu) padding   %08x %08x\n", state->inlen, (uint32_t) (state->padding >> 32), (uint32_t) state->padding);
  172|       |#endif
  173|       |
  174|  4.42M|        state->v3 ^= b;
  175|  4.42M|        sipround(state);
  176|  4.42M|        sipround(state);
  177|  4.42M|        state->v0 ^= b;
  178|       |
  179|       |#if ENABLE_DEBUG_SIPHASH
  180|       |        printf("(%3zu) v0 %08x %08x\n", state->inlen, (uint32_t) (state->v0 >> 32), (uint32_t) state->v0);
  181|       |        printf("(%3zu) v1 %08x %08x\n", state->inlen, (uint32_t) (state->v1 >> 32), (uint32_t) state->v1);
  182|       |        printf("(%3zu) v2 %08x %08x\n", state->inlen, (uint32_t) (state->v2 >> 32), (uint32_t) state->v2);
  183|       |        printf("(%3zu) v3 %08x %08x\n", state->inlen, (uint32_t) (state->v3 >> 32), (uint32_t) state->v3);
  184|       |#endif
  185|  4.42M|        state->v2 ^= 0xff;
  186|       |
  187|  4.42M|        sipround(state);
  188|  4.42M|        sipround(state);
  189|  4.42M|        sipround(state);
  190|  4.42M|        sipround(state);
  191|       |
  192|  4.42M|        return state->v0 ^ state->v1 ^ state->v2  ^ state->v3;
  193|  4.42M|}
siphash24.c:sipround:
   34|  37.7M|static void sipround(struct siphash *state) {
   35|  37.7M|        assert(state);
  ------------------
  |  |   72|  37.7M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  37.7M|        do {                                                            \
  |  |  |  |   59|  37.7M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  37.7M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 37.7M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  37.7M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  37.7M|        } while (false)
  |  |  ------------------
  ------------------
   36|       |
   37|  37.7M|        state->v0 += state->v1;
   38|  37.7M|        state->v1 = rotate_left(state->v1, 13);
   39|  37.7M|        state->v1 ^= state->v0;
   40|  37.7M|        state->v0 = rotate_left(state->v0, 32);
   41|  37.7M|        state->v2 += state->v3;
   42|  37.7M|        state->v3 = rotate_left(state->v3, 16);
   43|  37.7M|        state->v3 ^= state->v2;
   44|  37.7M|        state->v0 += state->v3;
   45|  37.7M|        state->v3 = rotate_left(state->v3, 21);
   46|  37.7M|        state->v3 ^= state->v0;
   47|  37.7M|        state->v2 += state->v1;
   48|  37.7M|        state->v1 = rotate_left(state->v1, 17);
   49|  37.7M|        state->v1 ^= state->v2;
   50|  37.7M|        state->v2 = rotate_left(state->v2, 32);
   51|  37.7M|}
siphash24.c:rotate_left:
   28|   226M|static uint64_t rotate_left(uint64_t x, uint8_t b) {
   29|   226M|        assert(b < 64);
  ------------------
  |  |   72|   226M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   226M|        do {                                                            \
  |  |  |  |   59|   226M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   226M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 226M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   226M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|   226M|        } while (false)
  |  |  ------------------
  ------------------
   30|       |
   31|   226M|        return (x << b) | (x >> (64 - b));
   32|   226M|}

strstrip:
   67|  1.64M|char* strstrip(char *s) {
   68|  1.64M|        if (!s)
  ------------------
  |  Branch (68:13): [True: 0, False: 1.64M]
  ------------------
   69|      0|                return NULL;
   70|       |
   71|       |        /* Drops trailing whitespace. Modifies the string in place. Returns pointer to first non-space character */
   72|       |
   73|  1.64M|        return delete_trailing_chars(skip_leading_chars(s, WHITESPACE), WHITESPACE);
  ------------------
  |  |   15|  1.64M|#define WHITESPACE          " \t\n\r"
  ------------------
                      return delete_trailing_chars(skip_leading_chars(s, WHITESPACE), WHITESPACE);
  ------------------
  |  |   15|  1.64M|#define WHITESPACE          " \t\n\r"
  ------------------
   74|  1.64M|}
delete_trailing_chars:
   99|  1.64M|char* delete_trailing_chars(char *s, const char *bad) {
  100|  1.64M|        char *c = s;
  101|       |
  102|       |        /* Drops all specified bad characters, at the end of the string */
  103|       |
  104|  1.64M|        if (!s)
  ------------------
  |  Branch (104:13): [True: 0, False: 1.64M]
  ------------------
  105|      0|                return NULL;
  106|       |
  107|  1.64M|        if (!bad)
  ------------------
  |  Branch (107:13): [True: 0, False: 1.64M]
  ------------------
  108|      0|                bad = WHITESPACE;
  ------------------
  |  |   15|      0|#define WHITESPACE          " \t\n\r"
  ------------------
  109|       |
  110|  31.9M|        for (char *p = s; *p; p++)
  ------------------
  |  Branch (110:27): [True: 30.3M, False: 1.64M]
  ------------------
  111|  30.3M|                if (!strchr(bad, *p))
  ------------------
  |  Branch (111:21): [True: 28.7M, False: 1.62M]
  ------------------
  112|  28.7M|                        c = p + 1;
  113|       |
  114|  1.64M|        *c = 0;
  115|       |
  116|  1.64M|        return s;
  117|  1.64M|}
ascii_tolower:
  131|  44.3M|char ascii_tolower(char x) {
  132|       |
  133|  44.3M|        if (x >= 'A' && x <= 'Z')
  ------------------
  |  Branch (133:13): [True: 41.2M, False: 3.10M]
  |  Branch (133:25): [True: 2.88M, False: 38.4M]
  ------------------
  134|  2.88M|                return x - 'A' + 'a';
  135|       |
  136|  41.5M|        return x;
  137|  44.3M|}
ascii_strlower_n:
  165|  6.77M|char* ascii_strlower_n(char *t, size_t n) {
  166|  6.77M|        if (n <= 0)
  ------------------
  |  Branch (166:13): [True: 0, False: 6.77M]
  ------------------
  167|      0|                return t;
  168|       |
  169|  43.1M|        for (size_t i = 0; i < n; i++)
  ------------------
  |  Branch (169:28): [True: 36.3M, False: 6.77M]
  ------------------
  170|  36.3M|                t[i] = ascii_tolower(t[i]);
  171|       |
  172|  6.77M|        return t;
  173|  6.77M|}
ascii_strcasecmp_n:
  175|  2.28M|int ascii_strcasecmp_n(const char *a, const char *b, size_t n) {
  176|       |
  177|  5.49M|        for (; n > 0; a++, b++, n--) {
  ------------------
  |  Branch (177:16): [True: 3.99M, False: 1.49M]
  ------------------
  178|  3.99M|                int x, y;
  179|       |
  180|  3.99M|                x = (int) (uint8_t) ascii_tolower(*a);
  181|  3.99M|                y = (int) (uint8_t) ascii_tolower(*b);
  182|       |
  183|  3.99M|                if (x != y)
  ------------------
  |  Branch (183:21): [True: 788k, False: 3.20M]
  ------------------
  184|   788k|                        return x - y;
  185|  3.99M|        }
  186|       |
  187|  1.49M|        return 0;
  188|  2.28M|}
ascii_strcasecmp_nn:
  190|  2.28M|int ascii_strcasecmp_nn(const char *a, size_t n, const char *b, size_t m) {
  191|  2.28M|        int r;
  192|       |
  193|  2.28M|        r = ascii_strcasecmp_n(a, b, MIN(n, m));
  ------------------
  |  |  220|  2.28M|#define MIN(a, b) __MIN(UNIQ, (a), UNIQ, (b))
  |  |  ------------------
  |  |  |  |  222|  2.28M|        ({                                              \
  |  |  |  |  223|  2.28M|                const typeof(a) UNIQ_T(A, aq) = (a);    \
  |  |  |  |  224|  2.28M|                const typeof(b) UNIQ_T(B, bq) = (b);    \
  |  |  |  |  225|  2.28M|                UNIQ_T(A, aq) < UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  2.28M|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  2.28M|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  2.28M|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) < UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  2.28M|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  2.28M|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  2.28M|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) < UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  2.28M|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  2.28M|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  2.28M|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) < UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  2.28M|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  2.28M|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  2.28M|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:17): [True: 260k, False: 2.02M]
  |  |  |  |  ------------------
  |  |  |  |  226|  2.28M|        })
  |  |  ------------------
  ------------------
  194|  2.28M|        if (r != 0)
  ------------------
  |  Branch (194:13): [True: 788k, False: 1.49M]
  ------------------
  195|   788k|                return r;
  196|       |
  197|  1.49M|        return CMP(n, m);
  ------------------
  |  |  288|  1.49M|#define CMP(a, b) __CMP(UNIQ, (a), UNIQ, (b))
  |  |  ------------------
  |  |  |  |  290|  1.49M|        ({                                              \
  |  |  |  |  291|  1.49M|                const typeof(a) UNIQ_T(A, aq) = (a);    \
  |  |  |  |  292|  1.49M|                const typeof(b) UNIQ_T(B, bq) = (b);    \
  |  |  |  |  293|  1.49M|                UNIQ_T(A, aq) < UNIQ_T(B, bq) ? -1 :    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  1.49M|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  1.49M|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  1.49M|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) < UNIQ_T(B, bq) ? -1 :    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  1.49M|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  1.49M|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  1.49M|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (293:17): [True: 7.62k, False: 1.48M]
  |  |  |  |  ------------------
  |  |  |  |  294|  1.49M|                UNIQ_T(A, aq) > UNIQ_T(B, bq) ? 1 : 0;  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  1.48M|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  1.48M|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  1.48M|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                               UNIQ_T(A, aq) > UNIQ_T(B, bq) ? 1 : 0;  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  1.48M|#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  140|  1.48M|#define CONCATENATE(x, y) XCONCATENATE(x, y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  139|  1.48M|#define XCONCATENATE(x, y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (294:17): [True: 135k, False: 1.35M]
  |  |  |  |  ------------------
  |  |  |  |  295|  1.49M|        })
  |  |  ------------------
  ------------------
  198|  2.28M|}

string-util.c:skip_leading_chars:
  116|  1.64M|static inline char* skip_leading_chars(const char *s, const char *bad) {
  117|  1.64M|        if (!s)
  ------------------
  |  Branch (117:13): [True: 0, False: 1.64M]
  ------------------
  118|      0|                return NULL;
  119|       |
  120|  1.64M|        if (!bad)
  ------------------
  |  Branch (120:13): [True: 0, False: 1.64M]
  ------------------
  121|      0|                bad = WHITESPACE;
  ------------------
  |  |   15|      0|#define WHITESPACE          " \t\n\r"
  ------------------
  122|       |
  123|  1.64M|        return (char*) s + strspn(s, bad);
  124|  1.64M|}

strv_find_case:
   30|  2.95k|char* strv_find_case(char * const *l, const char *name) {
   31|  2.95k|        assert(name);
  ------------------
  |  |   72|  2.95k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.95k|        do {                                                            \
  |  |  |  |   59|  2.95k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  2.95k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.95k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.95k|        } while (false)
  |  |  ------------------
  ------------------
   32|       |
   33|  2.95k|        STRV_FOREACH(i, l)
  ------------------
  |  |   10|  2.95k|        _STRV_FOREACH(s, l, UNIQ_T(i, UNIQ))
  |  |  ------------------
  |  |  |  |    7|  14.2k|        for (typeof(*(l)) *s, *i = (l); (s = i) && *i; i++)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (7:41): [True: 14.2k, False: 0]
  |  |  |  |  |  Branch (7:52): [True: 11.4k, False: 2.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   34|  11.4k|                if (strcaseeq(*i, name))
  ------------------
  |  |   48|  11.4k|#define strcaseeq(a,b) (strcasecmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (48:24): [True: 137, False: 11.2k]
  |  |  ------------------
  ------------------
   35|    137|                        return *i;
   36|       |
   37|  2.81k|        return NULL;
   38|  2.95k|}

log_level_is_valid:
  101|  1.66k|bool log_level_is_valid(int level) {
  102|  1.66k|        return level >= 0 && level <= LOG_DEBUG;
  ------------------
  |  Branch (102:16): [True: 1.66k, False: 0]
  |  Branch (102:30): [True: 1.66k, False: 0]
  ------------------
  103|  1.66k|}

siphash24.c:unaligned_read_le64:
   61|  11.1M|static inline uint64_t unaligned_read_le64(const void *_u) {
   62|  11.1M|        const struct __attribute__((__packed__, __may_alias__)) { uint64_t x; } *u = _u;
   63|       |
   64|  11.1M|        return le64toh(u->x);
   65|  11.1M|}

resolved-etc-hosts.c:etc_hosts_item_by_address_freep:
   15|  5.43k|        static inline void func##p(type *p) {           \
   16|  5.43k|                if (*p)                                 \
  ------------------
  |  Branch (16:21): [True: 0, False: 5.43k]
  ------------------
   17|  5.43k|                        *p = func(*p);                  \
   18|  5.43k|        }
resolved-etc-hosts.c:etc_hosts_item_by_name_freep:
   15|  81.6k|        static inline void func##p(type *p) {           \
   16|  81.6k|                if (*p)                                 \
  ------------------
  |  Branch (16:21): [True: 0, False: 81.6k]
  ------------------
   17|  81.6k|                        *p = func(*p);                  \
   18|  81.6k|        }
fileio.c:funlockfilep:
   23|  1.64M|        static inline void func##p(type *p) {                   \
   24|  1.64M|                if (*p != (empty)) {                            \
  ------------------
  |  Branch (24:21): [True: 1.64M, False: 0]
  ------------------
   25|  1.64M|                        DISABLE_WARNING_ADDRESS;                \
  ------------------
  |  |   43|  1.64M|        _Pragma("GCC diagnostic push");                                 \
  |  |   44|  1.64M|        _Pragma("GCC diagnostic ignored \"-Waddress\"")
  ------------------
   26|  1.64M|                        assert(func);                           \
  ------------------
  |  |   72|  1.64M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.64M|        do {                                                            \
  |  |  |  |   59|  1.64M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.64M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.64M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.64M|        } while (false)
  |  |  ------------------
  ------------------
   27|  1.64M|                        REENABLE_WARNING;                       \
   28|  1.64M|                        func(*p);                               \
   29|  1.64M|                        *p = (empty);                           \
   30|  1.64M|                }                                               \
   31|  1.64M|        }

hashmap.c:log2u_round_up:
   54|  15.6k|static inline unsigned log2u_round_up(unsigned x) {
   55|  15.6k|        if (x <= 1)
  ------------------
  |  Branch (55:13): [True: 0, False: 15.6k]
  ------------------
   56|      0|                return 0;
   57|       |
   58|  15.6k|        return log2u(x - 1) + 1;
   59|  15.6k|}
hashmap.c:log2u:
   50|  15.6k|static inline unsigned log2u(unsigned x) {
   51|  15.6k|        return LOG2U(x);
  ------------------
  |  |   44|  15.6k|#define LOG2U(x) __builtin_choose_expr(__builtin_constant_p(x), CONST_LOG2U(x), NONCONST_LOG2U(x))
  |  |  ------------------
  |  |  |  |   39|  15.6k|#define CONST_LOG2U(x) ((x) > 1 ? __SIZEOF_INT__ * 8 - __builtin_clz(x) - 1 : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:25): [True: 0, False: 15.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOG2U(x) __builtin_choose_expr(__builtin_constant_p(x), CONST_LOG2U(x), NONCONST_LOG2U(x))
  |  |  ------------------
  |  |  |  |   40|  15.6k|#define NONCONST_LOG2U(x) ({                                             \
  |  |  |  |   41|  15.6k|                unsigned _x = (x);                                       \
  |  |  |  |   42|  15.6k|                _x > 1 ? __SIZEOF_INT__ * 8 - __builtin_clz(_x) - 1 : 0; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:17): [True: 15.6k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   43|  15.6k|        })
  |  |  ------------------
  ------------------
   52|  15.6k|}

mempool.c:ALIGN_TO:
   76|  2.49k|static inline size_t ALIGN_TO(size_t l, size_t ali) {
   77|  2.49k|        assert(ISPOWEROF2(ali));
  ------------------
  |  |   72|  2.49k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.49k|        do {                                                            \
  |  |  |  |   59|  2.49k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  7.48k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.49k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 2.49k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (95:44): [True: 2.49k, False: 0]
  |  |  |  |  |  |  |  Branch (95:44): [True: 2.49k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.49k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.49k|        } while (false)
  |  |  ------------------
  ------------------
   78|       |
   79|  2.49k|        if (l > SIZE_MAX - (ali - 1))
  ------------------
  |  Branch (79:13): [True: 0, False: 2.49k]
  ------------------
   80|      0|                return SIZE_MAX; /* indicate overflow */
   81|       |
   82|  2.49k|        return ((l + (ali - 1)) & ~(ali - 1));
   83|  2.49k|}

endswith_no_case:
   53|  5.18k|sd_char* endswith_no_case(const sd_char *s, const sd_char *suffix) {
   54|  5.18k|        size_t sl, pl;
   55|       |
   56|  5.18k|        assert(s);
  ------------------
  |  |   72|  5.18k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  5.18k|        do {                                                            \
  |  |  |  |   59|  5.18k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  5.18k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 5.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  5.18k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  5.18k|        } while (false)
  |  |  ------------------
  ------------------
   57|  5.18k|        assert(suffix);
  ------------------
  |  |   72|  5.18k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  5.18k|        do {                                                            \
  |  |  |  |   59|  5.18k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  5.18k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 5.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  5.18k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  5.18k|        } while (false)
  |  |  ------------------
  ------------------
   58|       |
   59|  5.18k|        sl = strlen(s);
   60|  5.18k|        pl = strlen(suffix);
   61|       |
   62|  5.18k|        if (pl == 0)
  ------------------
  |  Branch (62:13): [True: 0, False: 5.18k]
  ------------------
   63|      0|                return (sd_char*) s + sl;
   64|       |
   65|  5.18k|        if (sl < pl)
  ------------------
  |  Branch (65:13): [True: 1.59k, False: 3.59k]
  ------------------
   66|  1.59k|                return NULL;
   67|       |
   68|  3.59k|        if (!strcaseeq(s + sl - pl, suffix))
  ------------------
  |  |   48|  3.59k|#define strcaseeq(a,b) (strcasecmp((a),(b)) == 0)
  ------------------
  |  Branch (68:13): [True: 1.28k, False: 2.30k]
  ------------------
   69|  1.28k|                return NULL;
   70|       |
   71|  2.30k|        return (sd_char*) s + sl - pl;
   72|  3.59k|}

resolved-etc-hosts.c:isempty:
   85|  1.64M|static inline bool isempty(const sd_char *a) {
   86|  1.64M|        return !a || a[0] == '\0';
  ------------------
  |  Branch (86:16): [True: 0, False: 1.64M]
  |  Branch (86:22): [True: 639k, False: 1.00M]
  ------------------
   87|  1.64M|}
dns-domain.c:ascii_isdigit:
  123|  15.0M|static inline bool ascii_isdigit(sd_char a) {
  124|       |        /* A pure ASCII, locale independent version of isdigit() */
  125|  15.0M|        return a >= '0' && a <= '9';
  ------------------
  |  Branch (125:16): [True: 15.0M, False: 0]
  |  Branch (125:28): [True: 739k, False: 14.2M]
  ------------------
  126|  15.0M|}
dns-domain.c:ascii_isalpha:
  132|  14.2M|static inline bool ascii_isalpha(sd_char a) {
  133|       |        /* A pure ASCII, locale independent version of isalpha() */
  134|  14.2M|        return (a >= 'a' && a <= 'z') || (a >= 'A' && a <= 'Z');
  ------------------
  |  Branch (134:17): [True: 12.4M, False: 1.85M]
  |  Branch (134:29): [True: 12.4M, False: 0]
  |  Branch (134:43): [True: 1.85M, False: 0]
  |  Branch (134:55): [True: 1.85M, False: 0]
  ------------------
  135|  14.2M|}
hostname-util.c:ascii_isalpha:
  132|  15.5M|static inline bool ascii_isalpha(sd_char a) {
  133|       |        /* A pure ASCII, locale independent version of isalpha() */
  134|  15.5M|        return (a >= 'a' && a <= 'z') || (a >= 'A' && a <= 'Z');
  ------------------
  |  Branch (134:17): [True: 12.7M, False: 2.87M]
  |  Branch (134:29): [True: 12.7M, False: 537]
  |  Branch (134:43): [True: 1.94M, False: 930k]
  |  Branch (134:55): [True: 1.94M, False: 2.10k]
  ------------------
  135|  15.5M|}
hostname-util.c:ascii_isdigit:
  123|   932k|static inline bool ascii_isdigit(sd_char a) {
  124|       |        /* A pure ASCII, locale independent version of isdigit() */
  125|   932k|        return a >= '0' && a <= '9';
  ------------------
  |  Branch (125:16): [True: 770k, False: 162k]
  |  Branch (125:28): [True: 754k, False: 15.3k]
  ------------------
  126|   932k|}

fuzz-etc-hosts.c:fuzz_setup_logging:
   32|  1.66k|static inline void fuzz_setup_logging(void) {
   33|       |        /* We don't want to fill the logs and slow down stuff when running
   34|       |         * in a fuzzing mode, so disable most of the logging. */
   35|  1.66k|        log_set_assert_return_is_critical(true);
   36|  1.66k|        log_set_max_level(LOG_CRIT);
   37|  1.66k|        log_setup();
   38|  1.66k|}
fuzz-etc-hosts.c:data_to_file:
   14|  1.66k|static inline FILE* data_to_file(const uint8_t *data, size_t size) {
   15|  1.66k|        if (size == 0)
  ------------------
  |  Branch (15:13): [True: 0, False: 1.66k]
  ------------------
   16|      0|                return fopen("/dev/null", "re");
   17|  1.66k|        else
   18|  1.66k|                return fmemopen_unlocked((char*) data, size, "r");
   19|  1.66k|}

LLVMFuzzerTestOneInput:
    7|  1.66k|int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
    8|  1.66k|        _cleanup_fclose_ FILE *f = NULL;
  ------------------
  |  |   61|  1.66k|#define _cleanup_fclose_ _cleanup_(fclosep)
  |  |  ------------------
  |  |  |  |   78|  1.66k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
    9|  1.66k|        _cleanup_(etc_hosts_clear) EtcHosts h = {};
  ------------------
  |  |   78|  1.66k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  ------------------
   10|       |
   11|  1.66k|        fuzz_setup_logging();
   12|       |
   13|  1.66k|        f = data_to_file(data, size);
   14|  1.66k|        assert_se(f);
  ------------------
  |  |   65|  1.66k|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.66k|        do {                                                            \
  |  |  |  |   59|  1.66k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.66k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.66k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.66k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.66k|        } while (false)
  |  |  ------------------
  ------------------
   15|       |
   16|  1.66k|        (void) etc_hosts_parse(&h, f);
   17|       |
   18|  1.66k|        return 0;
   19|  1.66k|}

etc_hosts_clear:
   64|  4.98k|void etc_hosts_clear(EtcHosts *hosts) {
   65|  4.98k|        assert(hosts);
  ------------------
  |  |   72|  4.98k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  4.98k|        do {                                                            \
  |  |  |  |   59|  4.98k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  4.98k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 4.98k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  4.98k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  4.98k|        } while (false)
  |  |  ------------------
  ------------------
   66|       |
   67|  4.98k|        hosts->by_address = hashmap_free(hosts->by_address);
   68|  4.98k|        hosts->by_name = hashmap_free(hosts->by_name);
   69|  4.98k|        hosts->no_address = set_free(hosts->no_address);
   70|  4.98k|}
etc_hosts_parse:
  298|  1.66k|int etc_hosts_parse(EtcHosts *hosts, FILE *f) {
  299|  1.66k|        _cleanup_(etc_hosts_clear) EtcHosts t = {};
  ------------------
  |  |   78|  1.66k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  ------------------
  300|  1.66k|        unsigned nr = 0;
  301|  1.66k|        int r;
  302|       |
  303|  1.66k|        assert(hosts);
  ------------------
  |  |   72|  1.66k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.66k|        do {                                                            \
  |  |  |  |   59|  1.66k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.66k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.66k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.66k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.66k|        } while (false)
  |  |  ------------------
  ------------------
  304|       |
  305|  1.64M|        for (;;) {
  306|  1.64M|                _cleanup_free_ char *line = NULL;
  ------------------
  |  |   82|  1.64M|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  1.64M|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  307|  1.64M|                char *l;
  308|       |
  309|  1.64M|                r = read_line(f, LONG_LINE_MAX, &line);
  ------------------
  |  |    6|  1.64M|#define LONG_LINE_MAX (1U*1024U*1024U)
  ------------------
  310|  1.64M|                if (r < 0)
  ------------------
  |  Branch (310:21): [True: 1, False: 1.64M]
  ------------------
  311|      1|                        return log_error_errno(r, "Failed to read /etc/hosts: %m");
  ------------------
  |  |  232|      1|#define log_error_errno(error, ...)     log_full_errno(LOG_ERR,     error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      1|        ({                                                              \
  |  |  |  |  205|      1|                int _error = (error);                                   \
  |  |  |  |  206|      1|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      1|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      1|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      1|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      1|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      1|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      1|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      1|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      1|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      1|        ({                                                              \
  |  |  |  |  |  |  190|      1|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      1|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      1|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      1|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      2|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      1|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      1|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      1|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      1|        })
  |  |  ------------------
  ------------------
  312|  1.64M|                if (r == 0)
  ------------------
  |  Branch (312:21): [True: 1.66k, False: 1.64M]
  ------------------
  313|  1.66k|                        break;
  314|       |
  315|  1.64M|                nr++;
  316|       |
  317|  1.64M|                l = strchr(line, '#');
  318|  1.64M|                if (l)
  ------------------
  |  Branch (318:21): [True: 23.4k, False: 1.62M]
  ------------------
  319|  23.4k|                        *l = '\0';
  320|       |
  321|  1.64M|                l = strstrip(line);
  322|  1.64M|                if (isempty(l))
  ------------------
  |  Branch (322:21): [True: 639k, False: 1.00M]
  ------------------
  323|   639k|                        continue;
  324|       |
  325|  1.00M|                r = parse_line(&t, nr, l);
  326|  1.00M|                if (r < 0)
  ------------------
  |  Branch (326:21): [True: 0, False: 1.00M]
  ------------------
  327|      0|                        return r;
  328|  1.00M|        }
  329|       |
  330|  1.66k|        strip_localhost(&t);
  331|       |
  332|  1.66k|        etc_hosts_clear(hosts);
  333|  1.66k|        *hosts = TAKE_STRUCT(t);
  ------------------
  |  |  390|  1.66k|#define TAKE_STRUCT(s) TAKE_STRUCT_TYPE(s, typeof(s))
  |  |  ------------------
  |  |  |  |  389|  1.66k|#define TAKE_STRUCT_TYPE(s, type) TAKE_GENERIC(s, type, {})
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|  1.66k|        ({                                                       \
  |  |  |  |  |  |  381|  1.66k|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|  1.66k|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|  1.66k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|  1.66k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|  1.66k|                _var_;                                           \
  |  |  |  |  |  |  386|  1.66k|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  334|  1.66k|        return 0;
  335|  1.66k|}
resolved-etc-hosts.c:parse_line:
   77|  1.00M|static int parse_line(EtcHosts *hosts, unsigned nr, const char *line) {
   78|  1.00M|        _cleanup_free_ char *address_str = NULL;
  ------------------
  |  |   82|  1.00M|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  1.00M|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
   79|  1.00M|        struct in_addr_data address = {};
   80|  1.00M|        bool found = false;
   81|  1.00M|        EtcHostsItemByAddress *item;
   82|  1.00M|        int r;
   83|       |
   84|  1.00M|        assert(hosts);
  ------------------
  |  |   72|  1.00M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.00M|        do {                                                            \
  |  |  |  |   59|  1.00M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.00M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.00M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.00M|        } while (false)
  |  |  ------------------
  ------------------
   85|  1.00M|        assert(line);
  ------------------
  |  |   72|  1.00M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.00M|        do {                                                            \
  |  |  |  |   59|  1.00M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.00M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.00M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.00M|        } while (false)
  |  |  ------------------
  ------------------
   86|       |
   87|  1.00M|        r = extract_first_word(&line, &address_str, NULL, EXTRACT_RELAX);
   88|  1.00M|        if (r < 0)
  ------------------
  |  Branch (88:13): [True: 0, False: 1.00M]
  ------------------
   89|      0|                return log_error_errno(r, "/etc/hosts:%u: failed to extract address: %m", nr);
  ------------------
  |  |  232|      0|#define log_error_errno(error, ...)     log_full_errno(LOG_ERR,     error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
   90|  1.00M|        assert(r > 0); /* We already checked that the line is not empty, so it should contain *something* */
  ------------------
  |  |   72|  1.00M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.00M|        do {                                                            \
  |  |  |  |   59|  1.00M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.00M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.00M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.00M|        } while (false)
  |  |  ------------------
  ------------------
   91|       |
   92|  1.00M|        r = in_addr_ifindex_from_string_auto(address_str, &address.family, &address.address, NULL);
   93|  1.00M|        if (r < 0) {
  ------------------
  |  Branch (93:13): [True: 240k, False: 766k]
  ------------------
   94|   240k|                log_warning_errno(r, "/etc/hosts:%u: address '%s' is invalid, ignoring: %m", nr, address_str);
  ------------------
  |  |  231|   240k|#define log_warning_errno(error, ...)   log_full_errno(LOG_WARNING, error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|   240k|        ({                                                              \
  |  |  |  |  205|   240k|                int _error = (error);                                   \
  |  |  |  |  206|   240k|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|   240k|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|   240k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|   240k|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|   240k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|   240k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 240k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|   240k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|   240k|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|   240k|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|   240k|        ({                                                              \
  |  |  |  |  |  |  190|   240k|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|   240k|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 240k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|   240k|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|   240k|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|   481k|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|   240k|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|   240k|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 240k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|   240k|        })
  |  |  |  |  ------------------
  |  |  |  |  208|   240k|        })
  |  |  ------------------
  ------------------
   95|   240k|                return 0;
   96|   240k|        }
   97|       |
   98|   766k|        r = in_addr_data_is_null(&address);
   99|   766k|        if (r < 0) {
  ------------------
  |  Branch (99:13): [True: 0, False: 766k]
  ------------------
  100|      0|                log_warning_errno(r, "/etc/hosts:%u: address '%s' is invalid, ignoring: %m", nr, address_str);
  ------------------
  |  |  231|      0|#define log_warning_errno(error, ...)   log_full_errno(LOG_WARNING, error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
  101|      0|                return 0;
  102|      0|        }
  103|   766k|        if (r > 0)
  ------------------
  |  Branch (103:13): [True: 732k, False: 34.6k]
  ------------------
  104|       |                /* This is an 0.0.0.0 or :: item, which we assume means that we shall map the specified hostname to
  105|       |                 * nothing. */
  106|   732k|                item = NULL;
  107|  34.6k|        else {
  108|       |                /* If this is a normal address, then simply add entry mapping it to the specified names */
  109|       |
  110|  34.6k|                item = hashmap_get(hosts->by_address, &address);
  111|  34.6k|                if (!item) {
  ------------------
  |  Branch (111:21): [True: 5.43k, False: 29.2k]
  ------------------
  112|  5.43k|                        _cleanup_(etc_hosts_item_by_address_freep) EtcHostsItemByAddress *new_item = NULL;
  ------------------
  |  |   78|  5.43k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  ------------------
  113|       |
  114|  5.43k|                        new_item = new(EtcHostsItemByAddress, 1);
  ------------------
  |  |   17|  5.43k|#define new(t, n) ((t*) malloc_multiply(n, sizeof(t)))
  ------------------
  115|  5.43k|                        if (!new_item)
  ------------------
  |  Branch (115:29): [True: 0, False: 5.43k]
  ------------------
  116|      0|                                return log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  117|       |
  118|  5.43k|                        *new_item = (EtcHostsItemByAddress) {
  119|  5.43k|                                .address = address,
  120|  5.43k|                        };
  121|       |
  122|  5.43k|                        r = hashmap_ensure_put(&hosts->by_address, &by_address_hash_ops, &new_item->address, new_item);
  123|  5.43k|                        if (r < 0)
  ------------------
  |  Branch (123:29): [True: 0, False: 5.43k]
  ------------------
  124|      0|                                return log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  125|       |
  126|  5.43k|                        item = TAKE_PTR(new_item);
  ------------------
  |  |  388|  5.43k|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|  5.43k|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|  5.43k|        ({                                                       \
  |  |  |  |  |  |  381|  5.43k|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|  5.43k|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|  5.43k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|  5.43k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|  5.43k|                _var_;                                           \
  |  |  |  |  |  |  386|  5.43k|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  127|  5.43k|                }
  128|  34.6k|        }
  129|       |
  130|  2.29M|        for (;;) {
  131|  2.29M|                _cleanup_free_ char *name = NULL;
  ------------------
  |  |   82|  2.29M|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  2.29M|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  132|  2.29M|                EtcHostsItemByName *bn;
  133|       |
  134|  2.29M|                r = extract_first_word(&line, &name, NULL, EXTRACT_RELAX);
  135|  2.29M|                if (r < 0)
  ------------------
  |  Branch (135:21): [True: 0, False: 2.29M]
  ------------------
  136|      0|                        return log_error_errno(r, "/etc/hosts:%u: couldn't extract hostname: %m", nr);
  ------------------
  |  |  232|      0|#define log_error_errno(error, ...)     log_full_errno(LOG_ERR,     error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
  137|  2.29M|                if (r == 0)
  ------------------
  |  Branch (137:21): [True: 766k, False: 1.53M]
  ------------------
  138|   766k|                        break;
  139|       |
  140|  1.53M|                r = dns_name_is_valid_ldh(name);
  141|  1.53M|                if (r <= 0) {
  ------------------
  |  Branch (141:21): [True: 67.2k, False: 1.46M]
  ------------------
  142|  67.2k|                        if (r < 0)
  ------------------
  |  Branch (142:29): [True: 0, False: 67.2k]
  ------------------
  143|  67.2k|                                log_warning_errno(r, "/etc/hosts:%u: Failed to check the validity of hostname \"%s\", ignoring: %m", nr, name);
  ------------------
  |  |  231|      0|#define log_warning_errno(error, ...)   log_full_errno(LOG_WARNING, error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
  144|  67.2k|                        else
  145|  67.2k|                                log_warning("/etc/hosts:%u: hostname \"%s\" is not valid, ignoring.", nr, name);
  ------------------
  |  |  223|  67.2k|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|  67.2k|        ({                                                             \
  |  |  |  |  212|  67.2k|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  67.2k|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|  67.2k|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  67.2k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  67.2k|        do {                                                            \
  |  |  |  |  |  |  |  |   59|  67.2k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|  67.2k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 67.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  67.2k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  67.2k|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|  67.2k|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|  67.2k|        ({                                                              \
  |  |  |  |  |  |  190|  67.2k|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|  67.2k|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 67.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|  67.2k|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|  67.2k|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|   134k|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|  67.2k|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|  67.2k|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 67.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|  67.2k|        })
  |  |  |  |  ------------------
  |  |  |  |  215|  67.2k|        })
  |  |  ------------------
  ------------------
  146|  67.2k|                        continue;
  147|  67.2k|                }
  148|       |
  149|  1.46M|                found = true;
  150|       |
  151|  1.46M|                if (!item) {
  ------------------
  |  Branch (151:21): [True: 877k, False: 585k]
  ------------------
  152|       |                        /* Optimize the case where we don't need to store any addresses, by storing
  153|       |                         * only the name in a dedicated Set instead of the hashmap */
  154|       |
  155|   877k|                        r = set_ensure_consume(&hosts->no_address, &dns_name_hash_ops_free, TAKE_PTR(name));
  ------------------
  |  |  388|   877k|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|   877k|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|   877k|        ({                                                       \
  |  |  |  |  |  |  381|   877k|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|   877k|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|   877k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|   877k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|   877k|                _var_;                                           \
  |  |  |  |  |  |  386|   877k|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  156|   877k|                        if (r < 0)
  ------------------
  |  Branch (156:29): [True: 0, False: 877k]
  ------------------
  157|      0|                                return log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  158|       |
  159|   877k|                        continue;
  160|   877k|                }
  161|       |
  162|   585k|                bn = hashmap_get(hosts->by_name, name);
  163|   585k|                if (!bn) {
  ------------------
  |  Branch (163:21): [True: 81.6k, False: 504k]
  ------------------
  164|  81.6k|                        _cleanup_(etc_hosts_item_by_name_freep) EtcHostsItemByName *new_item = NULL;
  ------------------
  |  |   78|  81.6k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  ------------------
  165|  81.6k|                        _cleanup_free_ char *name_copy = NULL;
  ------------------
  |  |   82|  81.6k|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  81.6k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  166|       |
  167|  81.6k|                        name_copy = strdup(name);
  168|  81.6k|                        if (!name_copy)
  ------------------
  |  Branch (168:29): [True: 0, False: 81.6k]
  ------------------
  169|      0|                                return log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  170|       |
  171|  81.6k|                        new_item = new(EtcHostsItemByName, 1);
  ------------------
  |  |   17|  81.6k|#define new(t, n) ((t*) malloc_multiply(n, sizeof(t)))
  ------------------
  172|  81.6k|                        if (!new_item)
  ------------------
  |  Branch (172:29): [True: 0, False: 81.6k]
  ------------------
  173|      0|                                return log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  174|       |
  175|  81.6k|                        *new_item = (EtcHostsItemByName) {
  176|  81.6k|                                .name = TAKE_PTR(name_copy),
  ------------------
  |  |  388|  81.6k|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|  81.6k|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|  81.6k|        ({                                                       \
  |  |  |  |  |  |  381|  81.6k|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|  81.6k|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|  81.6k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|  81.6k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|  81.6k|                _var_;                                           \
  |  |  |  |  |  |  386|  81.6k|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  177|  81.6k|                        };
  178|       |
  179|  81.6k|                        r = hashmap_ensure_put(&hosts->by_name, &by_name_hash_ops, new_item->name, new_item);
  180|  81.6k|                        if (r < 0)
  ------------------
  |  Branch (180:29): [True: 0, False: 81.6k]
  ------------------
  181|      0|                                return log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|       |
  183|  81.6k|                        bn = TAKE_PTR(new_item);
  ------------------
  |  |  388|  81.6k|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|  81.6k|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|  81.6k|        ({                                                       \
  |  |  |  |  |  |  381|  81.6k|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|  81.6k|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|  81.6k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|  81.6k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|  81.6k|                _var_;                                           \
  |  |  |  |  |  |  386|  81.6k|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  184|  81.6k|                }
  185|       |
  186|   585k|                if (!set_contains(bn->addresses, &address)) {
  ------------------
  |  Branch (186:21): [True: 142k, False: 442k]
  ------------------
  187|   142k|                        _cleanup_free_ struct in_addr_data *address_copy = NULL;
  ------------------
  |  |   82|   142k|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|   142k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  188|       |
  189|   142k|                        address_copy = newdup(struct in_addr_data, &address, 1);
  ------------------
  |  |   42|   142k|#define newdup(t, p, n) ((t*) memdup_multiply(p, n, sizeof(t)))
  ------------------
  190|   142k|                        if (!address_copy)
  ------------------
  |  Branch (190:29): [True: 0, False: 142k]
  ------------------
  191|      0|                                return log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  192|       |
  193|   142k|                        r = set_ensure_consume(&bn->addresses, &in_addr_data_hash_ops_free, TAKE_PTR(address_copy));
  ------------------
  |  |  388|   142k|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|   142k|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|   142k|        ({                                                       \
  |  |  |  |  |  |  381|   142k|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|   142k|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|   142k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|   142k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|   142k|                _var_;                                           \
  |  |  |  |  |  |  386|   142k|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  194|   142k|                        if (r < 0)
  ------------------
  |  Branch (194:29): [True: 0, False: 142k]
  ------------------
  195|      0|                                return log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  196|   142k|                }
  197|       |
  198|   585k|                r = set_ensure_put(&item->names, &dns_name_hash_ops_free, name);
  199|   585k|                if (r < 0)
  ------------------
  |  Branch (199:21): [True: 0, False: 585k]
  ------------------
  200|      0|                        return log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|   585k|                if (r == 0) /* the name is already listed */
  ------------------
  |  Branch (201:21): [True: 442k, False: 142k]
  ------------------
  202|   442k|                        continue;
  203|       |                /*
  204|       |                 * Keep track of the first name listed for this address.
  205|       |                 * This name will be used in responses as the canonical name.
  206|       |                 */
  207|   142k|                if (!item->canonical_name)
  ------------------
  |  Branch (207:21): [True: 3.48k, False: 139k]
  ------------------
  208|  3.48k|                        item->canonical_name = name;
  209|   142k|                TAKE_PTR(name);
  ------------------
  |  |  388|   142k|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|   142k|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|   142k|        ({                                                       \
  |  |  |  |  |  |  381|   142k|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|   142k|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|   142k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|   142k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|   142k|                _var_;                                           \
  |  |  |  |  |  |  386|   142k|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|   142k|        }
  211|       |
  212|   766k|        if (!found)
  ------------------
  |  Branch (212:13): [True: 4.01k, False: 762k]
  ------------------
  213|   766k|                log_warning("/etc/hosts:%u: line is missing any valid hostnames", nr);
  ------------------
  |  |  223|  4.01k|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|  4.01k|        ({                                                             \
  |  |  |  |  212|  4.01k|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  4.01k|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|  4.01k|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  4.01k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  4.01k|        do {                                                            \
  |  |  |  |  |  |  |  |   59|  4.01k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|  4.01k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 4.01k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  4.01k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  4.01k|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|  4.01k|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|  4.01k|        ({                                                              \
  |  |  |  |  |  |  190|  4.01k|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|  4.01k|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 4.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|  4.01k|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|  4.01k|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|  8.02k|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|  4.01k|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|  4.01k|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 4.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|  4.01k|        })
  |  |  |  |  ------------------
  |  |  |  |  215|  4.01k|        })
  |  |  ------------------
  ------------------
  214|       |
  215|   766k|        return 0;
  216|   766k|}
resolved-etc-hosts.c:etc_hosts_item_by_address_free:
   27|  5.43k|static EtcHostsItemByAddress *etc_hosts_item_by_address_free(EtcHostsItemByAddress *item) {
   28|  5.43k|        if (!item)
  ------------------
  |  Branch (28:13): [True: 0, False: 5.43k]
  ------------------
   29|      0|                return NULL;
   30|       |
   31|  5.43k|        set_free(item->names);
   32|  5.43k|        return mfree(item);
  ------------------
  |  |  404|  5.43k|        ({                                      \
  |  |  405|  5.43k|                free(memory);                   \
  |  |  406|  5.43k|                (typeof(memory)) NULL;          \
  |  |  407|  5.43k|        })
  ------------------
   33|  5.43k|}
resolved-etc-hosts.c:etc_hosts_item_by_name_free:
   45|  81.9k|static EtcHostsItemByName *etc_hosts_item_by_name_free(EtcHostsItemByName *item) {
   46|  81.9k|        if (!item)
  ------------------
  |  Branch (46:13): [True: 251, False: 81.6k]
  ------------------
   47|    251|                return NULL;
   48|       |
   49|  81.6k|        free(item->name);
   50|  81.6k|        set_free(item->addresses);
   51|  81.6k|        return mfree(item);
  ------------------
  |  |  404|  81.6k|        ({                                      \
  |  |  405|  81.6k|                free(memory);                   \
  |  |  406|  81.6k|                (typeof(memory)) NULL;          \
  |  |  407|  81.6k|        })
  ------------------
   52|  81.9k|}
resolved-etc-hosts.c:strip_localhost:
  218|  1.66k|static void strip_localhost(EtcHosts *hosts) {
  219|  1.66k|        static const struct in_addr_data local_in_addrs[] = {
  220|  1.66k|                {
  221|  1.66k|                        .family = AF_INET,
  222|  1.66k|#if __BYTE_ORDER == __LITTLE_ENDIAN
  223|       |                        /* We want constant expressions here, that's why we don't use htole32() here */
  224|  1.66k|                        .address.in.s_addr = UINT32_C(0x0100007F),
  225|       |#else
  226|       |                        .address.in.s_addr = UINT32_C(0x7F000001),
  227|       |#endif
  228|  1.66k|                },
  229|  1.66k|                {
  230|  1.66k|                        .family = AF_INET6,
  231|  1.66k|                        .address.in6 = IN6ADDR_LOOPBACK_INIT,
  232|  1.66k|                },
  233|  1.66k|        };
  234|       |
  235|  1.66k|        assert(hosts);
  ------------------
  |  |   72|  1.66k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.66k|        do {                                                            \
  |  |  |  |   59|  1.66k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.66k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.66k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.66k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.66k|        } while (false)
  |  |  ------------------
  ------------------
  236|       |
  237|       |        /* Removes the 'localhost' entry from what we loaded. But only if the mapping is exclusively between
  238|       |         * 127.0.0.1 and localhost (or aliases to that we recognize). If there's any other name assigned to
  239|       |         * it, we leave the entry in.
  240|       |         *
  241|       |         * This way our regular synthesizing can take over, but only if it would result in the exact same
  242|       |         * mappings.  */
  243|       |
  244|  3.32k|        FOREACH_ELEMENT(local_in_addr, local_in_addrs) {
  ------------------
  |  |  466|  1.66k|        FOREACH_ARRAY(i, array, ELEMENTSOF(array))
  |  |  ------------------
  |  |  |  |  463|  1.66k|        _FOREACH_ARRAY(i, array, num, UNIQ_T(m, UNIQ), UNIQ_T(end, UNIQ))
  |  |  |  |  ------------------
  |  |  |  |  |  |  457|  1.66k|        for (typeof(array[0]) *i = (array), *end = ({                   \
  |  |  |  |  |  |  458|  1.66k|                                typeof(num) m = (num);                  \
  |  |  |  |  |  |  459|  1.66k|                                (i && m > 0) ? i + m : NULL;            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (459:34): [True: 1.66k, False: 0]
  |  |  |  |  |  |  |  Branch (459:39): [True: 1.66k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  460|  4.98k|                        }); end && i < end; i++)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (460:29): [True: 4.98k, False: 0]
  |  |  |  |  |  |  |  Branch (460:36): [True: 3.32k, False: 1.66k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  245|  3.32k|                bool all_localhost, all_local_address;
  246|  3.32k|                EtcHostsItemByAddress *item;
  247|  3.32k|                const char *name;
  248|       |
  249|  3.32k|                item = hashmap_get(hosts->by_address, local_in_addr);
  250|  3.32k|                if (!item)
  ------------------
  |  Branch (250:21): [True: 2.59k, False: 730]
  ------------------
  251|  2.59k|                        continue;
  252|       |
  253|       |                /* Check whether all hostnames the loopback address points to are localhost ones */
  254|    730|                all_localhost = true;
  255|    730|                SET_FOREACH(name, item->names)
  ------------------
  |  |  112|    730|        _SET_FOREACH(e, s, UNIQ_T(i, UNIQ))
  |  |  ------------------
  |  |  |  |  110|  3.17k|        for (Iterator i = ITERATOR_FIRST; set_iterate((s), &i, (void**)&(e)); )
  |  |  |  |  ------------------
  |  |  |  |  |  |   20|    730|#define ITERATOR_FIRST ((Iterator) { .idx = _IDX_ITERATOR_FIRST, .next_key = NULL })
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   19|    730|#define _IDX_ITERATOR_FIRST (UINT_MAX - 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (110:43): [True: 2.95k, False: 217]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  256|  2.95k|                        if (!is_localhost(name)) {
  ------------------
  |  Branch (256:29): [True: 513, False: 2.44k]
  ------------------
  257|    513|                                all_localhost = false;
  258|    513|                                break;
  259|    513|                        }
  260|       |
  261|    730|                if (!all_localhost) /* Not all names are localhost, hence keep the entries for this address. */
  ------------------
  |  Branch (261:21): [True: 513, False: 217]
  ------------------
  262|    513|                        continue;
  263|       |
  264|       |                /* Now check if the names listed for this address actually all point back just to this
  265|       |                 * address (or the other loopback address). If not, let's stay away from this too. */
  266|    217|                all_local_address = true;
  267|  2.05k|                SET_FOREACH(name, item->names) {
  ------------------
  |  |  112|    217|        _SET_FOREACH(e, s, UNIQ_T(i, UNIQ))
  |  |  ------------------
  |  |  |  |  110|  2.22k|        for (Iterator i = ITERATOR_FIRST; set_iterate((s), &i, (void**)&(e)); )
  |  |  |  |  ------------------
  |  |  |  |  |  |   20|    217|#define ITERATOR_FIRST ((Iterator) { .idx = _IDX_ITERATOR_FIRST, .next_key = NULL })
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   19|    217|#define _IDX_ITERATOR_FIRST (UINT_MAX - 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (110:43): [True: 2.05k, False: 172]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|  2.05k|                        EtcHostsItemByName *n;
  269|  2.05k|                        struct in_addr_data *a;
  270|       |
  271|  2.05k|                        n = hashmap_get(hosts->by_name, name);
  272|  2.05k|                        if (!n) /* No reverse entry? Then almost certainly the entry already got deleted from
  ------------------
  |  Branch (272:29): [True: 19, False: 2.03k]
  ------------------
  273|       |                                 * the previous iteration of this loop, i.e. via the other protocol */
  274|     19|                                break;
  275|       |
  276|       |                        /* Now check if the addresses of this item are all localhost addresses */
  277|  2.03k|                        SET_FOREACH(a, n->addresses)
  ------------------
  |  |  112|  2.03k|        _SET_FOREACH(e, s, UNIQ_T(i, UNIQ))
  |  |  ------------------
  |  |  |  |  110|  4.55k|        for (Iterator i = ITERATOR_FIRST; set_iterate((s), &i, (void**)&(e)); )
  |  |  |  |  ------------------
  |  |  |  |  |  |   20|  2.03k|#define ITERATOR_FIRST ((Iterator) { .idx = _IDX_ITERATOR_FIRST, .next_key = NULL })
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   19|  2.03k|#define _IDX_ITERATOR_FIRST (UINT_MAX - 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (110:43): [True: 2.55k, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  278|  2.55k|                                if (!in_addr_is_localhost(a->family, &a->address)) {
  ------------------
  |  Branch (278:37): [True: 26, False: 2.52k]
  ------------------
  279|     26|                                        all_local_address = false;
  280|     26|                                        break;
  281|     26|                                }
  282|       |
  283|  2.03k|                        if (!all_local_address)
  ------------------
  |  Branch (283:29): [True: 26, False: 2.00k]
  ------------------
  284|     26|                                break;
  285|  2.03k|                }
  286|       |
  287|    217|                if (!all_local_address)
  ------------------
  |  Branch (287:21): [True: 26, False: 191]
  ------------------
  288|     26|                        continue;
  289|       |
  290|    191|                SET_FOREACH(name, item->names)
  ------------------
  |  |  112|    191|        _SET_FOREACH(e, s, UNIQ_T(i, UNIQ))
  |  |  ------------------
  |  |  |  |  110|  2.52k|        for (Iterator i = ITERATOR_FIRST; set_iterate((s), &i, (void**)&(e)); )
  |  |  |  |  ------------------
  |  |  |  |  |  |   20|    191|#define ITERATOR_FIRST ((Iterator) { .idx = _IDX_ITERATOR_FIRST, .next_key = NULL })
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   19|    191|#define _IDX_ITERATOR_FIRST (UINT_MAX - 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (110:43): [True: 2.33k, False: 191]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  291|  2.33k|                        etc_hosts_item_by_name_free(hashmap_remove(hosts->by_name, name));
  292|       |
  293|    191|                assert_se(hashmap_remove(hosts->by_address, local_in_addr) == item);
  ------------------
  |  |   65|    191|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    191|        do {                                                            \
  |  |  |  |   59|    191|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    191|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 191]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    191|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    191|        } while (false)
  |  |  ------------------
  ------------------
  294|    191|                etc_hosts_item_by_address_free(item);
  295|    191|        }
  296|  1.66k|}

dns_label_unescape:
   24|  19.1M|int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) {
   25|  19.1M|        const char *n;
   26|  19.1M|        char *d, last_char = 0;
   27|  19.1M|        int r = 0;
   28|       |
   29|  19.1M|        assert(name);
  ------------------
  |  |   72|  19.1M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  19.1M|        do {                                                            \
  |  |  |  |   59|  19.1M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  19.1M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 19.1M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  19.1M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  19.1M|        } while (false)
  |  |  ------------------
  ------------------
   30|  19.1M|        assert(*name);
  ------------------
  |  |   72|  19.1M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  19.1M|        do {                                                            \
  |  |  |  |   59|  19.1M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  19.1M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 19.1M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  19.1M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  19.1M|        } while (false)
  |  |  ------------------
  ------------------
   31|       |
   32|  19.1M|        n = *name;
   33|  19.1M|        d = dest;
   34|       |
   35|  85.1M|        for (;;) {
   36|  85.1M|                if (IN_SET(*n, 0, '.')) {
  ------------------
  |  |  361|  85.1M|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 19.0M, False: 66.0M]
  |  |  ------------------
  |  |  362|  85.1M|                bool _found = false;                                    \
  |  |  363|  85.1M|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  85.1M|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  85.1M|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  85.1M|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  85.1M|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  85.1M|                switch (x) {                                            \
  |  |  368|  19.0M|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|  12.7M|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|  12.7M|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|  12.7M|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|  19.0M|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|  19.0M|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 6.31M, False: 78.8M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 12.7M, False: 72.3M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|  19.0M|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|  19.0M|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|  19.0M|                        _found = true;                                  \
  |  |  370|  19.0M|                        break;                                          \
  |  |  371|  66.0M|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 66.0M, False: 19.0M]
  |  |  ------------------
  |  |  372|  66.0M|                        ;                                               \
  |  |  373|  85.1M|                }                                                       \
  |  |  374|  85.1M|                _found;                                                 \
  |  |  375|  85.1M|        })
  ------------------
   37|  19.0M|                        if (FLAGS_SET(flags, DNS_LABEL_LDH) && last_char == '-')
  ------------------
  |  |  414|  38.1M|        ((~(v) & (flags)) == 0)
  |  |  ------------------
  |  |  |  Branch (414:9): [True: 4.04M, False: 15.0M]
  |  |  ------------------
  ------------------
  |  Branch (37:64): [True: 340, False: 4.04M]
  ------------------
   38|       |                                /* Trailing dash */
   39|    340|                                return -EINVAL;
   40|       |
   41|  19.0M|                        if (n[0] == '.' && (n[1] != 0 || !FLAGS_SET(flags, DNS_LABEL_LEAVE_TRAILING_DOT)))
  ------------------
  |  |  414|  1.15M|        ((~(v) & (flags)) == 0)
  ------------------
  |  Branch (41:29): [True: 6.31M, False: 12.7M]
  |  Branch (41:45): [True: 5.15M, False: 1.15M]
  |  Branch (41:58): [True: 1.15M, False: 0]
  ------------------
   42|  6.31M|                                n++;
   43|       |
   44|  19.0M|                        break;
   45|  19.0M|                }
   46|       |
   47|  66.0M|                if (r >= DNS_LABEL_MAX)
  ------------------
  |  |    7|  66.0M|#define DNS_LABEL_MAX 63
  ------------------
  |  Branch (47:21): [True: 2.29k, False: 66.0M]
  ------------------
   48|  2.29k|                        return -EINVAL;
   49|       |
   50|  66.0M|                if (sz <= 0)
  ------------------
  |  Branch (50:21): [True: 0, False: 66.0M]
  ------------------
   51|      0|                        return -ENOBUFS;
   52|       |
   53|  66.0M|                if (*n == '\\') {
  ------------------
  |  Branch (53:21): [True: 245, False: 66.0M]
  ------------------
   54|       |                        /* Escaped character */
   55|    245|                        if (FLAGS_SET(flags, DNS_LABEL_NO_ESCAPES))
  ------------------
  |  |  414|    245|        ((~(v) & (flags)) == 0)
  |  |  ------------------
  |  |  |  Branch (414:9): [True: 245, False: 0]
  |  |  ------------------
  ------------------
   56|    245|                                return -EINVAL;
   57|       |
   58|      0|                        n++;
   59|       |
   60|      0|                        if (*n == 0)
  ------------------
  |  Branch (60:29): [True: 0, False: 0]
  ------------------
   61|       |                                /* Ending NUL */
   62|      0|                                return -EINVAL;
   63|       |
   64|      0|                        else if (IN_SET(*n, '\\', '.')) {
  ------------------
  |  |  361|      0|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  362|      0|                bool _found = false;                                    \
  |  |  363|      0|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|      0|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|      0|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|      0|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|      0|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|      0|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|      0|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  372|      0|                        ;                                               \
  |  |  373|      0|                }                                                       \
  |  |  374|      0|                _found;                                                 \
  |  |  375|      0|        })
  ------------------
   65|       |                                /* Escaped backslash or dot */
   66|       |
   67|      0|                                if (FLAGS_SET(flags, DNS_LABEL_LDH))
  ------------------
  |  |  414|      0|        ((~(v) & (flags)) == 0)
  |  |  ------------------
  |  |  |  Branch (414:9): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   68|      0|                                        return -EINVAL;
   69|       |
   70|      0|                                last_char = *n;
   71|      0|                                if (d)
  ------------------
  |  Branch (71:37): [True: 0, False: 0]
  ------------------
   72|      0|                                        *(d++) = *n;
   73|      0|                                sz--;
   74|      0|                                r++;
   75|      0|                                n++;
   76|       |
   77|      0|                        } else if (n[0] >= '0' && n[0] <= '9') {
  ------------------
  |  Branch (77:36): [True: 0, False: 0]
  |  Branch (77:51): [True: 0, False: 0]
  ------------------
   78|      0|                                unsigned k;
   79|       |
   80|       |                                /* Escaped literal ASCII character */
   81|       |
   82|      0|                                if (!(n[1] >= '0' && n[1] <= '9') ||
  ------------------
  |  Branch (82:39): [True: 0, False: 0]
  |  Branch (82:54): [True: 0, False: 0]
  ------------------
   83|      0|                                    !(n[2] >= '0' && n[2] <= '9'))
  ------------------
  |  Branch (83:39): [True: 0, False: 0]
  |  Branch (83:54): [True: 0, False: 0]
  ------------------
   84|      0|                                        return -EINVAL;
   85|       |
   86|      0|                                k = ((unsigned) (n[0] - '0') * 100) +
   87|      0|                                        ((unsigned) (n[1] - '0') * 10) +
   88|      0|                                        ((unsigned) (n[2] - '0'));
   89|       |
   90|       |                                /* Don't allow anything that doesn't fit in 8 bits. Note that we do allow
   91|       |                                 * control characters, as some servers (e.g. cloudflare) are happy to
   92|       |                                 * generate labels with them inside. */
   93|      0|                                if (k > 255)
  ------------------
  |  Branch (93:37): [True: 0, False: 0]
  ------------------
   94|      0|                                        return -EINVAL;
   95|       |
   96|      0|                                if (FLAGS_SET(flags, DNS_LABEL_LDH) &&
  ------------------
  |  |  414|      0|        ((~(v) & (flags)) == 0)
  |  |  ------------------
  |  |  |  Branch (414:9): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   97|      0|                                    !valid_ldh_char((char) k))
  ------------------
  |  Branch (97:37): [True: 0, False: 0]
  ------------------
   98|      0|                                        return -EINVAL;
   99|       |
  100|      0|                                last_char = (char) k;
  101|      0|                                if (d)
  ------------------
  |  Branch (101:37): [True: 0, False: 0]
  ------------------
  102|      0|                                        *(d++) = (char) k;
  103|      0|                                sz--;
  104|      0|                                r++;
  105|       |
  106|      0|                                n += 3;
  107|      0|                        } else
  108|      0|                                return -EINVAL;
  109|       |
  110|  66.0M|                } else if ((uint8_t) *n >= (uint8_t) ' ' && *n != 127) {
  ------------------
  |  Branch (110:28): [True: 66.0M, False: 22.2k]
  |  Branch (110:61): [True: 66.0M, False: 243]
  ------------------
  111|       |
  112|       |                        /* Normal character */
  113|       |
  114|  66.0M|                        if (FLAGS_SET(flags, DNS_LABEL_LDH)) {
  ------------------
  |  |  414|  66.0M|        ((~(v) & (flags)) == 0)
  |  |  ------------------
  |  |  |  Branch (414:9): [True: 15.5M, False: 50.4M]
  |  |  ------------------
  ------------------
  115|  15.5M|                                if (!valid_ldh_char(*n))
  ------------------
  |  Branch (115:37): [True: 31.7k, False: 15.5M]
  ------------------
  116|  31.7k|                                        return -EINVAL;
  117|  15.5M|                                if (r == 0 && *n == '-')
  ------------------
  |  Branch (117:37): [True: 2.61M, False: 12.9M]
  |  Branch (117:47): [True: 947, False: 2.60M]
  ------------------
  118|       |                                        /* Leading dash */
  119|    947|                                        return -EINVAL;
  120|  15.5M|                        }
  121|       |
  122|  65.9M|                        last_char = *n;
  123|  65.9M|                        if (d)
  ------------------
  |  Branch (123:29): [True: 65.9M, False: 0]
  ------------------
  124|  65.9M|                                *(d++) = *n;
  125|  65.9M|                        sz--;
  126|  65.9M|                        r++;
  127|  65.9M|                        n++;
  128|  65.9M|                } else
  129|  22.4k|                        return -EINVAL;
  130|  66.0M|        }
  131|       |
  132|       |        /* Empty label that is not at the end? */
  133|  19.0M|        if (r == 0 && *n)
  ------------------
  |  Branch (133:13): [True: 5.83M, False: 13.2M]
  |  Branch (133:23): [True: 6.89k, False: 5.82M]
  ------------------
  134|  6.89k|                return -EINVAL;
  135|       |
  136|       |        /* More than one trailing dot? */
  137|  19.0M|        if (n[0] == '.' && !FLAGS_SET(flags, DNS_LABEL_LEAVE_TRAILING_DOT))
  ------------------
  |  |  414|  2.03k|        ((~(v) & (flags)) == 0)
  ------------------
  |  Branch (137:13): [True: 2.03k, False: 19.0M]
  |  Branch (137:28): [True: 2.03k, False: 0]
  ------------------
  138|  2.03k|                return -EINVAL;
  139|       |
  140|  19.0M|        if (sz >= 1 && d)
  ------------------
  |  Branch (140:13): [True: 19.0M, False: 0]
  |  Branch (140:24): [True: 19.0M, False: 0]
  ------------------
  141|  19.0M|                *d = 0;
  142|       |
  143|  19.0M|        *name = n;
  144|  19.0M|        return r;
  145|  19.0M|}
dns_label_unescape_suffix:
  150|  4.56M|int dns_label_unescape_suffix(const char *name, const char **label_terminal, char *dest, size_t sz) {
  151|  4.56M|        const char *terminal;
  152|  4.56M|        int r;
  153|       |
  154|  4.56M|        assert(name);
  ------------------
  |  |   72|  4.56M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  4.56M|        do {                                                            \
  |  |  |  |   59|  4.56M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  4.56M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 4.56M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  4.56M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  4.56M|        } while (false)
  |  |  ------------------
  ------------------
  155|  4.56M|        assert(label_terminal);
  ------------------
  |  |   72|  4.56M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  4.56M|        do {                                                            \
  |  |  |  |   59|  4.56M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  4.56M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 4.56M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  4.56M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  4.56M|        } while (false)
  |  |  ------------------
  ------------------
  156|  4.56M|        assert(dest);
  ------------------
  |  |   72|  4.56M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  4.56M|        do {                                                            \
  |  |  |  |   59|  4.56M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  4.56M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 4.56M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  4.56M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  4.56M|        } while (false)
  |  |  ------------------
  ------------------
  157|       |
  158|       |        /* no more labels */
  159|  4.56M|        if (!*label_terminal) {
  ------------------
  |  Branch (159:13): [True: 6.12k, False: 4.55M]
  ------------------
  160|  6.12k|                if (sz >= 1)
  ------------------
  |  Branch (160:21): [True: 6.12k, False: 0]
  ------------------
  161|  6.12k|                        *dest = 0;
  162|       |
  163|  6.12k|                return 0;
  164|  6.12k|        }
  165|       |
  166|  4.55M|        terminal = *label_terminal;
  167|  4.55M|        assert(IN_SET(*terminal, 0, '.'));
  ------------------
  |  |   72|  4.55M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  4.55M|        do {                                                            \
  |  |  |  |   59|  4.55M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  4.55M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 4.55M]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 4.55M]
  |  |  |  |  |  |  |  Branch (95:44): [True: 555k, False: 4.00M]
  |  |  |  |  |  |  |  Branch (95:44): [True: 4.00M, False: 555k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  4.55M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  4.55M|        } while (false)
  |  |  ------------------
  ------------------
  168|       |
  169|       |        /* Skip current terminal character (and accept domain names ending it ".") */
  170|  4.55M|        if (*terminal == 0)
  ------------------
  |  Branch (170:13): [True: 4.00M, False: 555k]
  ------------------
  171|  4.00M|                terminal = PTR_SUB1(terminal, name);
  ------------------
  |  |  196|  4.00M|        ({                                               \
  |  |  197|  4.00M|                typeof(p) _q = (p);                      \
  |  |  198|  4.00M|                _q && _q > (base) ? &_q[-1] : NULL;      \
  |  |  ------------------
  |  |  |  Branch (198:17): [True: 4.00M, False: 0]
  |  |  |  Branch (198:23): [True: 4.00M, False: 467]
  |  |  ------------------
  |  |  199|  4.00M|        })
  ------------------
  172|  4.55M|        if (terminal >= name && *terminal == '.')
  ------------------
  |  Branch (172:13): [True: 4.55M, False: 467]
  |  Branch (172:33): [True: 1.25M, False: 3.30M]
  ------------------
  173|  1.25M|                terminal = PTR_SUB1(terminal, name);
  ------------------
  |  |  196|  1.25M|        ({                                               \
  |  |  197|  1.25M|                typeof(p) _q = (p);                      \
  |  |  198|  1.25M|                _q && _q > (base) ? &_q[-1] : NULL;      \
  |  |  ------------------
  |  |  |  Branch (198:17): [True: 1.25M, False: 0]
  |  |  |  Branch (198:23): [True: 589k, False: 666k]
  |  |  ------------------
  |  |  199|  1.25M|        })
  ------------------
  174|       |
  175|       |        /* Point name to the last label, and terminal to the preceding terminal symbol (or make it a NULL pointer) */
  176|  18.5M|        while (terminal) {
  ------------------
  |  Branch (176:16): [True: 15.3M, False: 3.20M]
  ------------------
  177|       |                /* Find the start of the last label */
  178|  15.3M|                if (*terminal == '.') {
  ------------------
  |  Branch (178:21): [True: 1.35M, False: 14.0M]
  ------------------
  179|  1.35M|                        const char *y;
  180|  1.35M|                        unsigned slashes = 0;
  181|       |
  182|  1.35M|                        for (y = PTR_SUB1(terminal, name); y && *y == '\\'; y = PTR_SUB1(y, name))
  ------------------
  |  |  196|  1.35M|        ({                                               \
  |  |  197|  1.35M|                typeof(p) _q = (p);                      \
  |  |  198|  1.35M|                _q && _q > (base) ? &_q[-1] : NULL;      \
  |  |  ------------------
  |  |  |  Branch (198:17): [True: 1.35M, False: 0]
  |  |  |  Branch (198:23): [True: 1.35M, False: 0]
  |  |  ------------------
  |  |  199|  1.35M|        })
  ------------------
                                      for (y = PTR_SUB1(terminal, name); y && *y == '\\'; y = PTR_SUB1(y, name))
  ------------------
  |  |  196|      0|        ({                                               \
  |  |  197|      0|                typeof(p) _q = (p);                      \
  |  |  198|      0|                _q && _q > (base) ? &_q[-1] : NULL;      \
  |  |  ------------------
  |  |  |  Branch (198:17): [True: 0, False: 0]
  |  |  |  Branch (198:23): [True: 0, False: 0]
  |  |  ------------------
  |  |  199|      0|        })
  ------------------
  |  Branch (182:60): [True: 1.35M, False: 0]
  |  Branch (182:65): [True: 0, False: 1.35M]
  ------------------
  183|      0|                                slashes++;
  184|       |
  185|  1.35M|                        if (slashes % 2 == 0) {
  ------------------
  |  Branch (185:29): [True: 1.35M, False: 0]
  ------------------
  186|       |                                /* The '.' was not escaped */
  187|  1.35M|                                name = terminal + 1;
  188|  1.35M|                                break;
  189|  1.35M|                        } else {
  190|      0|                                terminal = y;
  191|      0|                                continue;
  192|      0|                        }
  193|  1.35M|                }
  194|       |
  195|  14.0M|                terminal = PTR_SUB1(terminal, name);
  ------------------
  |  |  196|  14.0M|        ({                                               \
  |  |  197|  14.0M|                typeof(p) _q = (p);                      \
  |  |  198|  14.0M|                _q && _q > (base) ? &_q[-1] : NULL;      \
  |  |  ------------------
  |  |  |  Branch (198:17): [True: 14.0M, False: 0]
  |  |  |  Branch (198:23): [True: 11.5M, False: 2.53M]
  |  |  ------------------
  |  |  199|  14.0M|        })
  ------------------
  196|  14.0M|        }
  197|       |
  198|  4.55M|        r = dns_label_unescape(&name, dest, sz, 0);
  199|  4.55M|        if (r < 0)
  ------------------
  |  Branch (199:13): [True: 0, False: 4.55M]
  ------------------
  200|      0|                return r;
  201|       |
  202|  4.55M|        *label_terminal = terminal;
  203|       |
  204|  4.55M|        return r;
  205|  4.55M|}
dns_label_escape:
  207|  2.56M|int dns_label_escape(const char *p, size_t l, char *dest, size_t sz) {
  208|  2.56M|        char *q;
  209|       |
  210|       |        /* DNS labels must be between 1 and 63 characters long. A
  211|       |         * zero-length label does not exist. See RFC 2181, Section
  212|       |         * 11. */
  213|       |
  214|  2.56M|        if (l <= 0 || l > DNS_LABEL_MAX)
  ------------------
  |  |    7|  2.56M|#define DNS_LABEL_MAX 63
  ------------------
  |  Branch (214:13): [True: 0, False: 2.56M]
  |  Branch (214:23): [True: 0, False: 2.56M]
  ------------------
  215|      0|                return -EINVAL;
  216|  2.56M|        if (sz < 1)
  ------------------
  |  Branch (216:13): [True: 0, False: 2.56M]
  ------------------
  217|      0|                return -ENOBUFS;
  218|       |
  219|  2.56M|        assert(p);
  ------------------
  |  |   72|  2.56M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.56M|        do {                                                            \
  |  |  |  |   59|  2.56M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  2.56M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.56M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.56M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.56M|        } while (false)
  |  |  ------------------
  ------------------
  220|  2.56M|        assert(dest);
  ------------------
  |  |   72|  2.56M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.56M|        do {                                                            \
  |  |  |  |   59|  2.56M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  2.56M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.56M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.56M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.56M|        } while (false)
  |  |  ------------------
  ------------------
  221|       |
  222|  2.56M|        q = dest;
  223|  17.7M|        while (l > 0) {
  ------------------
  |  Branch (223:16): [True: 15.1M, False: 2.56M]
  ------------------
  224|       |
  225|  15.1M|                if (IN_SET(*p, '.', '\\')) {
  ------------------
  |  |  361|  15.1M|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 15.1M]
  |  |  ------------------
  |  |  362|  15.1M|                bool _found = false;                                    \
  |  |  363|  15.1M|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  15.1M|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  15.1M|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  15.1M|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  15.1M|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  15.1M|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 15.1M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 15.1M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|  15.1M|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 15.1M, False: 0]
  |  |  ------------------
  |  |  372|  15.1M|                        ;                                               \
  |  |  373|  15.1M|                }                                                       \
  |  |  374|  15.1M|                _found;                                                 \
  |  |  375|  15.1M|        })
  ------------------
  226|       |
  227|       |                        /* Dot or backslash */
  228|       |
  229|      0|                        if (sz < 3)
  ------------------
  |  Branch (229:29): [True: 0, False: 0]
  ------------------
  230|      0|                                return -ENOBUFS;
  231|       |
  232|      0|                        *(q++) = '\\';
  233|      0|                        *(q++) = *p;
  234|       |
  235|      0|                        sz -= 2;
  236|       |
  237|  15.1M|                } else if (IN_SET(*p, '_', '-') ||
  ------------------
  |  |  361|  30.3M|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 142k, False: 15.0M]
  |  |  ------------------
  |  |  362|  30.3M|                bool _found = false;                                    \
  |  |  363|  30.3M|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  30.3M|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  30.3M|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  30.3M|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  15.1M|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  30.3M|                switch (x) {                                            \
  |  |  368|   142k|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|   142k|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|   142k|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 142k, False: 15.0M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 15.1M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|   142k|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|   142k|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|   142k|                        _found = true;                                  \
  |  |  370|   142k|                        break;                                          \
  |  |  371|  15.0M|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 15.0M, False: 142k]
  |  |  ------------------
  |  |  372|  15.0M|                        ;                                               \
  |  |  373|  30.3M|                }                                                       \
  |  |  374|  30.3M|                _found;                                                 \
  |  |  375|  15.1M|        })
  ------------------
  238|  15.1M|                           ascii_isdigit(*p) ||
  ------------------
  |  Branch (238:28): [True: 739k, False: 14.2M]
  ------------------
  239|  15.1M|                           ascii_isalpha(*p)) {
  ------------------
  |  Branch (239:28): [True: 14.2M, False: 0]
  ------------------
  240|       |
  241|       |                        /* Proper character */
  242|       |
  243|  15.1M|                        if (sz < 2)
  ------------------
  |  Branch (243:29): [True: 0, False: 15.1M]
  ------------------
  244|      0|                                return -ENOBUFS;
  245|       |
  246|  15.1M|                        *(q++) = *p;
  247|  15.1M|                        sz -= 1;
  248|       |
  249|  15.1M|                } else {
  250|       |
  251|       |                        /* Everything else */
  252|       |
  253|      0|                        if (sz < 5)
  ------------------
  |  Branch (253:29): [True: 0, False: 0]
  ------------------
  254|      0|                                return -ENOBUFS;
  255|       |
  256|      0|                        *(q++) = '\\';
  257|      0|                        *(q++) = '0' + (char) ((uint8_t) *p / 100);
  258|      0|                        *(q++) = '0' + (char) (((uint8_t) *p / 10) % 10);
  259|      0|                        *(q++) = '0' + (char) ((uint8_t) *p % 10);
  260|       |
  261|      0|                        sz -= 4;
  262|      0|                }
  263|       |
  264|  15.1M|                p++;
  265|  15.1M|                l--;
  266|  15.1M|        }
  267|       |
  268|  2.56M|        *q = 0;
  269|  2.56M|        return (int) (q - dest);
  270|  2.56M|}
dns_name_concat:
  404|  1.53M|int dns_name_concat(const char *a, const char *b, DNSLabelFlags flags, char **ret) {
  405|  1.53M|        _cleanup_free_ char *result = NULL;
  ------------------
  |  |   82|  1.53M|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  1.53M|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  406|  1.53M|        size_t n_result = 0, n_unescaped = 0;
  407|  1.53M|        const char *p;
  408|  1.53M|        bool first = true;
  409|  1.53M|        int r;
  410|       |
  411|  1.53M|        if (a)
  ------------------
  |  Branch (411:13): [True: 1.53M, False: 0]
  ------------------
  412|  1.53M|                p = a;
  413|      0|        else if (b)
  ------------------
  |  Branch (413:18): [True: 0, False: 0]
  ------------------
  414|      0|                p = TAKE_PTR(b);
  ------------------
  |  |  388|      0|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|      0|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|      0|        ({                                                       \
  |  |  |  |  |  |  381|      0|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|      0|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|      0|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|      0|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|      0|                _var_;                                           \
  |  |  |  |  |  |  386|      0|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  415|      0|        else
  416|      0|                goto finish;
  417|       |
  418|  4.09M|        for (;;) {
  419|  4.09M|                char label[DNS_LABEL_MAX+1];
  420|       |
  421|  4.09M|                r = dns_label_unescape(&p, label, sizeof label, flags);
  422|  4.09M|                if (r < 0)
  ------------------
  |  Branch (422:21): [True: 67.0k, False: 4.03M]
  ------------------
  423|  67.0k|                        return r;
  424|  4.03M|                if (r == 0) {
  ------------------
  |  Branch (424:21): [True: 1.46M, False: 2.56M]
  ------------------
  425|  1.46M|                        if (*p != 0)
  ------------------
  |  Branch (425:29): [True: 0, False: 1.46M]
  ------------------
  426|      0|                                return -EINVAL;
  427|       |
  428|  1.46M|                        if (b) {
  ------------------
  |  Branch (428:29): [True: 0, False: 1.46M]
  ------------------
  429|       |                                /* Now continue with the second string, if there is one */
  430|      0|                                p = TAKE_PTR(b);
  ------------------
  |  |  388|      0|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|      0|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|      0|        ({                                                       \
  |  |  |  |  |  |  381|      0|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|      0|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|      0|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|      0|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|      0|                _var_;                                           \
  |  |  |  |  |  |  386|      0|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  431|      0|                                continue;
  432|      0|                        }
  433|       |
  434|  1.46M|                        break;
  435|  1.46M|                }
  436|  2.56M|                n_unescaped += r + !first; /* Count unescaped length to make max length determination below */
  437|       |
  438|  2.56M|                if (ret) {
  ------------------
  |  Branch (438:21): [True: 0, False: 2.56M]
  ------------------
  439|      0|                        if (!GREEDY_REALLOC(result, n_result + !first + DNS_LABEL_ESCAPED_MAX))
  ------------------
  |  |  139|      0|        greedy_realloc((void**) &(array), (need), sizeof((array)[0]))
  ------------------
  |  Branch (439:29): [True: 0, False: 0]
  ------------------
  440|      0|                                return -ENOMEM;
  441|       |
  442|      0|                        r = dns_label_escape(label, r, result + n_result + !first, DNS_LABEL_ESCAPED_MAX);
  ------------------
  |  |   10|      0|#define DNS_LABEL_ESCAPED_MAX (DNS_LABEL_MAX*4+1)
  |  |  ------------------
  |  |  |  |    7|      0|#define DNS_LABEL_MAX 63
  |  |  ------------------
  ------------------
  443|      0|                        if (r < 0)
  ------------------
  |  Branch (443:29): [True: 0, False: 0]
  ------------------
  444|      0|                                return r;
  445|       |
  446|      0|                        if (!first)
  ------------------
  |  Branch (446:29): [True: 0, False: 0]
  ------------------
  447|      0|                                result[n_result] = '.';
  448|  2.56M|                } else {
  449|  2.56M|                        char escaped[DNS_LABEL_ESCAPED_MAX];
  450|       |
  451|  2.56M|                        r = dns_label_escape(label, r, escaped, sizeof(escaped));
  452|  2.56M|                        if (r < 0)
  ------------------
  |  Branch (452:29): [True: 0, False: 2.56M]
  ------------------
  453|      0|                                return r;
  454|  2.56M|                }
  455|       |
  456|  2.56M|                n_result += r + !first;
  457|  2.56M|                first = false;
  458|  2.56M|        }
  459|       |
  460|  1.46M|finish:
  461|  1.46M|        if (n_unescaped == 0) {
  ------------------
  |  Branch (461:13): [True: 136k, False: 1.32M]
  ------------------
  462|       |                /* Nothing appended? If so, generate at least a single dot, to indicate the DNS root domain */
  463|       |
  464|   136k|                if (ret) {
  ------------------
  |  Branch (464:21): [True: 0, False: 136k]
  ------------------
  465|      0|                        if (!GREEDY_REALLOC(result, 2)) /* Room for dot, and already pre-allocate space for the trailing NUL byte at the same time */
  ------------------
  |  |  139|      0|        greedy_realloc((void**) &(array), (need), sizeof((array)[0]))
  ------------------
  |  Branch (465:29): [True: 0, False: 0]
  ------------------
  466|      0|                                return -ENOMEM;
  467|       |
  468|      0|                        result[n_result++] = '.';
  469|      0|                }
  470|       |
  471|   136k|                n_unescaped++;
  472|   136k|        }
  473|       |
  474|  1.46M|        if (n_unescaped > DNS_HOSTNAME_MAX) /* Enforce max length check on unescaped length */
  ------------------
  |  |   13|  1.46M|#define DNS_HOSTNAME_MAX 253
  ------------------
  |  Branch (474:13): [True: 249, False: 1.46M]
  ------------------
  475|    249|                return -EINVAL;
  476|       |
  477|  1.46M|        if (ret) {
  ------------------
  |  Branch (477:13): [True: 0, False: 1.46M]
  ------------------
  478|       |                /* Suffix with a NUL byte */
  479|      0|                if (!GREEDY_REALLOC(result, n_result + 1))
  ------------------
  |  |  139|      0|        greedy_realloc((void**) &(array), (need), sizeof((array)[0]))
  ------------------
  |  Branch (479:21): [True: 0, False: 0]
  ------------------
  480|      0|                        return -ENOMEM;
  481|       |
  482|      0|                result[n_result] = 0;
  483|      0|                *ret = TAKE_PTR(result);
  ------------------
  |  |  388|      0|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|      0|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|      0|        ({                                                       \
  |  |  |  |  |  |  381|      0|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|      0|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|      0|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|      0|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|      0|                _var_;                                           \
  |  |  |  |  |  |  386|      0|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  484|      0|        }
  485|       |
  486|  1.46M|        return 0;
  487|  1.46M|}
dns_name_hash_func:
  489|  3.69M|void dns_name_hash_func(const char *name, struct siphash *state) {
  490|  3.69M|        int r;
  491|       |
  492|  3.69M|        assert(name);
  ------------------
  |  |   72|  3.69M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  3.69M|        do {                                                            \
  |  |  |  |   59|  3.69M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  3.69M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 3.69M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  3.69M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  3.69M|        } while (false)
  |  |  ------------------
  ------------------
  493|       |
  494|  10.4M|        for (const char *p = name;;) {
  495|  10.4M|                char label[DNS_LABEL_MAX+1];
  496|       |
  497|  10.4M|                r = dns_label_unescape(&p, label, sizeof label, 0);
  498|  10.4M|                if (r < 0)
  ------------------
  |  Branch (498:21): [True: 0, False: 10.4M]
  ------------------
  499|      0|                        return string_hash_func(p, state); /* fallback for invalid DNS names */
  500|  10.4M|                if (r == 0)
  ------------------
  |  Branch (500:21): [True: 3.69M, False: 6.77M]
  ------------------
  501|  3.69M|                        break;
  502|       |
  503|  6.77M|                ascii_strlower_n(label, r);
  504|  6.77M|                siphash24_compress(label, r, state);
  505|  6.77M|                siphash24_compress_byte(0, state); /* make sure foobar and foo.bar result in different hashes */
  ------------------
  |  |   18|  6.77M|#define siphash24_compress_byte(byte, state) siphash24_compress((const uint8_t[]) { (byte) }, 1, (state))
  ------------------
  506|  6.77M|        }
  507|       |
  508|       |        /* enforce that all names are terminated by the empty label */
  509|  3.69M|        string_hash_func("", state);
  510|  3.69M|}
dns_name_compare_func:
  512|  2.00M|int dns_name_compare_func(const char *a, const char *b) {
  513|  2.00M|        const char *x, *y;
  514|  2.00M|        int r, q;
  515|       |
  516|  2.00M|        assert(a);
  ------------------
  |  |   72|  2.00M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.00M|        do {                                                            \
  |  |  |  |   59|  2.00M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  2.00M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.00M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.00M|        } while (false)
  |  |  ------------------
  ------------------
  517|  2.00M|        assert(b);
  ------------------
  |  |   72|  2.00M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.00M|        do {                                                            \
  |  |  |  |   59|  2.00M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  2.00M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.00M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.00M|        } while (false)
  |  |  ------------------
  ------------------
  518|       |
  519|  2.00M|        x = a + strlen(a);
  520|  2.00M|        y = b + strlen(b);
  521|       |
  522|  3.35M|        for (;;) {
  523|  3.35M|                char la[DNS_LABEL_MAX+1], lb[DNS_LABEL_MAX+1];
  524|       |
  525|  3.35M|                if (!x && !y)
  ------------------
  |  Branch (525:21): [True: 1.07M, False: 2.27M]
  |  Branch (525:27): [True: 1.06M, False: 2.31k]
  ------------------
  526|  1.06M|                        return 0;
  527|       |
  528|  2.28M|                r = dns_label_unescape_suffix(a, &x, la, sizeof(la));
  529|  2.28M|                q = dns_label_unescape_suffix(b, &y, lb, sizeof(lb));
  530|  2.28M|                if (r < 0 || q < 0)
  ------------------
  |  Branch (530:21): [True: 0, False: 2.28M]
  |  Branch (530:30): [True: 0, False: 2.28M]
  ------------------
  531|      0|                        return strcmp(a, b); /* if not valid DNS labels, then let's compare the whole strings as is */
  532|       |
  533|  2.28M|                r = ascii_strcasecmp_nn(la, r, lb, q);
  534|  2.28M|                if (r != 0)
  ------------------
  |  Branch (534:21): [True: 931k, False: 1.35M]
  ------------------
  535|   931k|                        return r;
  536|  2.28M|        }
  537|  2.00M|}

resolved-etc-hosts.c:dns_name_is_valid_ldh:
   43|  1.53M|static inline int dns_name_is_valid_ldh(const char *s) {
   44|  1.53M|        int r;
   45|       |
   46|  1.53M|        r = dns_name_concat(s, NULL, DNS_LABEL_LDH|DNS_LABEL_NO_ESCAPES, NULL);
   47|  1.53M|        if (r == -EINVAL)
  ------------------
  |  Branch (47:13): [True: 67.2k, False: 1.46M]
  ------------------
   48|  67.2k|                return 0;
   49|  1.46M|        if (r < 0)
  ------------------
  |  Branch (49:13): [True: 0, False: 1.46M]
  ------------------
   50|      0|                return r;
   51|  1.46M|        return 1;
   52|  1.46M|}

mempool_enabled:
    7|  87.4k|bool mempool_enabled(void) {
    8|  87.4k|        static int cache = -1;
    9|       |
   10|  87.4k|        if (!is_main_thread())
  ------------------
  |  Branch (10:13): [True: 0, False: 87.4k]
  ------------------
   11|      0|                return false;
   12|       |
   13|  87.4k|        if (cache < 0)
  ------------------
  |  Branch (13:13): [True: 1, False: 87.4k]
  ------------------
   14|      1|                cache = getenv_bool("SYSTEMD_MEMPOOL") != 0;
   15|       |
   16|  87.4k|        return cache;
   17|  87.4k|}

in_addr_port_ifindex_name_from_string_auto:
  210|  1.00M|                char **ret_server_name) {
  211|       |
  212|  1.00M|        _cleanup_free_ char *buf1 = NULL, *buf2 = NULL, *name = NULL;
  ------------------
  |  |   82|  1.00M|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  1.00M|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  213|  1.00M|        int family, ifindex = 0, r;
  214|  1.00M|        union in_addr_union a;
  215|  1.00M|        uint16_t port = 0;
  216|  1.00M|        const char *m;
  217|       |
  218|  1.00M|        assert(s);
  ------------------
  |  |   72|  1.00M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.00M|        do {                                                            \
  |  |  |  |   59|  1.00M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.00M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.00M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.00M|        } while (false)
  |  |  ------------------
  ------------------
  219|       |
  220|       |        /* This accepts the following:
  221|       |         * 192.168.0.1:53#example.com
  222|       |         * [2001:4860:4860::8888]:53%eth0#example.com
  223|       |         *
  224|       |         * If ret_port is NULL, then the port cannot be specified.
  225|       |         * If ret_ifindex is NULL, then the interface index cannot be specified.
  226|       |         * If ret_server_name is NULL, then server_name cannot be specified.
  227|       |         *
  228|       |         * ret_family is always AF_INET or AF_INET6.
  229|       |         */
  230|       |
  231|  1.00M|        m = strchr(s, '#');
  232|  1.00M|        if (m) {
  ------------------
  |  Branch (232:13): [True: 0, False: 1.00M]
  ------------------
  233|      0|                if (!ret_server_name)
  ------------------
  |  Branch (233:21): [True: 0, False: 0]
  ------------------
  234|      0|                        return -EINVAL;
  235|       |
  236|      0|                if (isempty(m + 1))
  ------------------
  |  Branch (236:21): [True: 0, False: 0]
  ------------------
  237|      0|                        return -EINVAL;
  238|       |
  239|      0|                name = strdup(m + 1);
  240|      0|                if (!name)
  ------------------
  |  Branch (240:21): [True: 0, False: 0]
  ------------------
  241|      0|                        return -ENOMEM;
  242|       |
  243|      0|                s = buf1 = strndup(s, m - s);
  244|      0|                if (!buf1)
  ------------------
  |  Branch (244:21): [True: 0, False: 0]
  ------------------
  245|      0|                        return -ENOMEM;
  246|      0|        }
  247|       |
  248|  1.00M|        m = strchr(s, '%');
  249|  1.00M|        if (m) {
  ------------------
  |  Branch (249:13): [True: 318, False: 1.00M]
  ------------------
  250|    318|                if (!ret_ifindex)
  ------------------
  |  Branch (250:21): [True: 318, False: 0]
  ------------------
  251|    318|                        return -EINVAL;
  252|       |
  253|      0|                if (isempty(m + 1))
  ------------------
  |  Branch (253:21): [True: 0, False: 0]
  ------------------
  254|      0|                        return -EINVAL;
  255|       |
  256|      0|                if (!ifname_valid_full(m + 1, IFNAME_VALID_ALTERNATIVE | IFNAME_VALID_NUMERIC))
  ------------------
  |  Branch (256:21): [True: 0, False: 0]
  ------------------
  257|      0|                        return -EINVAL; /* We want to return -EINVAL for syntactically invalid names,
  258|       |                                         * and -ENODEV for valid but nonexistent interfaces. */
  259|       |
  260|      0|                ifindex = rtnl_resolve_interface(NULL, m + 1);
  261|      0|                if (ifindex < 0)
  ------------------
  |  Branch (261:21): [True: 0, False: 0]
  ------------------
  262|      0|                        return ifindex;
  263|       |
  264|      0|                s = buf2 = strndup(s, m - s);
  265|      0|                if (!buf2)
  ------------------
  |  Branch (265:21): [True: 0, False: 0]
  ------------------
  266|      0|                        return -ENOMEM;
  267|      0|        }
  268|       |
  269|  1.00M|        m = strrchr(s, ':');
  270|  1.00M|        if (m) {
  ------------------
  |  Branch (270:13): [True: 34.8k, False: 972k]
  ------------------
  271|  34.8k|                if (*s == '[') {
  ------------------
  |  Branch (271:21): [True: 237, False: 34.5k]
  ------------------
  272|    237|                        _cleanup_free_ char *ip_str = NULL;
  ------------------
  |  |   82|    237|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|    237|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  273|       |
  274|    237|                        if (!ret_port)
  ------------------
  |  Branch (274:29): [True: 237, False: 0]
  ------------------
  275|    237|                                return -EINVAL;
  276|       |
  277|      0|                        if (*(m - 1) != ']')
  ------------------
  |  Branch (277:29): [True: 0, False: 0]
  ------------------
  278|      0|                                return -EINVAL;
  279|       |
  280|      0|                        family = AF_INET6;
  281|       |
  282|      0|                        r = parse_ip_port(m + 1, &port);
  283|      0|                        if (r < 0)
  ------------------
  |  Branch (283:29): [True: 0, False: 0]
  ------------------
  284|      0|                                return r;
  285|       |
  286|      0|                        ip_str = strndup(s + 1, m - s - 2);
  287|      0|                        if (!ip_str)
  ------------------
  |  Branch (287:29): [True: 0, False: 0]
  ------------------
  288|      0|                                return -ENOMEM;
  289|       |
  290|      0|                        r = in_addr_from_string(family, ip_str, &a);
  291|      0|                        if (r < 0)
  ------------------
  |  Branch (291:29): [True: 0, False: 0]
  ------------------
  292|      0|                                return r;
  293|  34.5k|                } else {
  294|       |                        /* First try to parse the string as IPv6 address without port number */
  295|  34.5k|                        r = in_addr_from_string(AF_INET6, s, &a);
  296|  34.5k|                        if (r < 0) {
  ------------------
  |  Branch (296:29): [True: 977, False: 33.6k]
  ------------------
  297|       |                                /* Then the input should be IPv4 address with port number */
  298|    977|                                _cleanup_free_ char *ip_str = NULL;
  ------------------
  |  |   82|    977|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|    977|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  299|       |
  300|    977|                                if (!ret_port)
  ------------------
  |  Branch (300:37): [True: 977, False: 0]
  ------------------
  301|    977|                                        return -EINVAL;
  302|       |
  303|      0|                                family = AF_INET;
  304|       |
  305|      0|                                ip_str = strndup(s, m - s);
  306|      0|                                if (!ip_str)
  ------------------
  |  Branch (306:37): [True: 0, False: 0]
  ------------------
  307|      0|                                        return -ENOMEM;
  308|       |
  309|      0|                                r = in_addr_from_string(family, ip_str, &a);
  310|      0|                                if (r < 0)
  ------------------
  |  Branch (310:37): [True: 0, False: 0]
  ------------------
  311|      0|                                        return r;
  312|       |
  313|      0|                                r = parse_ip_port(m + 1, &port);
  314|      0|                                if (r < 0)
  ------------------
  |  Branch (314:37): [True: 0, False: 0]
  ------------------
  315|      0|                                        return r;
  316|      0|                        } else
  317|  33.6k|                                family = AF_INET6;
  318|  34.5k|                }
  319|   972k|        } else {
  320|   972k|                family = AF_INET;
  321|   972k|                r = in_addr_from_string(family, s, &a);
  322|   972k|                if (r < 0)
  ------------------
  |  Branch (322:21): [True: 239k, False: 733k]
  ------------------
  323|   239k|                        return r;
  324|   972k|        }
  325|       |
  326|   766k|        if (ret_family)
  ------------------
  |  Branch (326:13): [True: 766k, False: 0]
  ------------------
  327|   766k|                *ret_family = family;
  328|   766k|        if (ret_address)
  ------------------
  |  Branch (328:13): [True: 766k, False: 0]
  ------------------
  329|   766k|                *ret_address = a;
  330|   766k|        if (ret_port)
  ------------------
  |  Branch (330:13): [True: 0, False: 766k]
  ------------------
  331|      0|                *ret_port = port;
  332|   766k|        if (ret_ifindex)
  ------------------
  |  Branch (332:13): [True: 0, False: 766k]
  ------------------
  333|      0|                *ret_ifindex = ifindex;
  334|   766k|        if (ret_server_name)
  ------------------
  |  Branch (334:13): [True: 0, False: 766k]
  ------------------
  335|      0|                *ret_server_name = TAKE_PTR(name);
  ------------------
  |  |  388|      0|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|      0|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|      0|        ({                                                       \
  |  |  |  |  |  |  381|      0|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|      0|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|      0|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|      0|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|      0|                _var_;                                           \
  |  |  |  |  |  |  386|      0|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  336|       |
  337|   766k|        return r;
  338|  1.00M|}

resolved-etc-hosts.c:in_addr_ifindex_from_string_auto:
   26|  1.00M|static inline int in_addr_ifindex_from_string_auto(const char *s, int *family, union in_addr_union *ret, int *ifindex) {
   27|  1.00M|        return in_addr_ifindex_name_from_string_auto(s, family, ret, ifindex, NULL);
   28|  1.00M|}
resolved-etc-hosts.c:in_addr_ifindex_name_from_string_auto:
   23|  1.00M|static inline int in_addr_ifindex_name_from_string_auto(const char *s, int *family, union in_addr_union *ret, int *ifindex, char **server_name) {
   24|  1.00M|        return in_addr_port_ifindex_name_from_string_auto(s, family, ret, NULL, ifindex, server_name);
   25|  1.00M|}

